Rails Admin: The right way of doing data administration with Rails 3
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 64 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/45947 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 20112 / 64
3
7
10
11
17
19
21
28
33
34
35
37
40
44
48
49
52
55
57
59
62
63
64
00:00
Student's t-testFaculty (division)ComputerSoftware developerProjective planeStudent's t-testSoftware developerCodePresentation of a groupTwitterComputer animation
00:41
Web 2.0Web applicationWeb-DesignerComputer animation
01:01
Control flowCartesian coordinate systemLogicType theoryGame controllerComputer animation
01:21
QuicksortType theoryComputer animation
01:33
Error messageAddress spaceCodeCanadian Mathematical SocietySoftware testingMultiplication signComputer animation
02:58
CollaborationismProjective planeFilm editingRuby on RailsComputer animationLecture/Conference
03:25
Computer animation
03:41
Row (database)InformationMobile appGame controllerFlip-flop (electronics)Price indexMultiplicationAuthenticationGroup actionFiber bundleInstallation artDemo (music)Cartesian coordinate systemRoutingModule (mathematics)CodeLogicEndliche ModelltheorieGame controllerView (database)Mobile appForm (programming)WritingComputer configurationValidity (statistics)NamespaceAuthenticationLine (geometry)Computer fileElectric generatorQuicksortRight angleRatsche <Physik>Different (Kate Ryan album)Computer animation
06:08
Web 2.0Computer animation
06:21
8 (number)MIDIWeb 2.0Web applicationCartesian coordinate systemComputer animation
06:42
10 (number)Perfect groupComputer animation
07:02
Execution unitDebuggerLine (geometry)CodeAssociative propertyWeb 2.0Cartesian coordinate systemServer (computing)Task (computing)Drill commandsWeb applicationEndliche ModelltheoriePasswordValidity (statistics)MappingDifferent (Kate Ryan album)Computer animation
08:27
Maxima and minimaQuadrilateralEndliche ModelltheorieValidity (statistics)Computer animation
08:50
Table (information)Military baseComputer animation
09:34
Configuration spaceFormal languageWeb-DesignerSoftware testingCartesian coordinate systemSoftware frameworkRight anglePlug-in (computing)Associative propertyMoment (mathematics)Patch (Unix)Configuration spaceNormal (geometry)Projective planeQuicksortNumbering schemeCodeAuthenticationEndliche ModelltheorieSampling (statistics)Repository (publishing)Product (business)Polymorphism (materials science)Point (geometry)Key (cryptography)Modal logicComputer animation
13:00
XML
Transcript: English(auto-generated)
00:07
Hello Today I'm going to talk to you as he said about Rails admin, but first a little about me I'm a student from Romania. I'm a developer from OrgoTech. I've been a student in the Ruby Summer of Code of 2010 and
00:25
The Rails admin is the project as my project for the Ruby Summer of Code If you have any questions Feel free to ask at the end of my presentation and you can find me of course on Twitter at at Hurricane with an I
00:40
so What is data administration? Every web developer sometimes in the past when he wrote his first web app thought about how to do data administration, how to manage and control his data, so data administration differs from web app to web app, but and
01:03
The way you organize your data is and you control the data is The way you do data administration, so you organize your data That's the logic of your application and the way you control it. That is the data administration. So
01:20
Usually you do this via an admin panel. So there are a lot of types of admin panels out there You can do data administration in all sorts of way but how to do it in Secure and fast way usually many people write their own admin panels
01:42
So this is a little error prone because you have to test it very well it's definitely not fast because you have to waste a lot of time and It's not always very very simple Other people use CMS's so
02:01
This is usually fast. This is usually not fast Because you have to learn how the CMS works and everything, but it's usually secure But it's not and it's flexible somehow Also The rails way of doing it is using a plug-in or now in rails 3 an engine and
02:27
This is all of three so it's secure because You plug in you plug the you know the plug-in that it's very well written or it has a lot of tests running on it
02:43
so it's In the engine and when it works and it's also very very simple So introducing the rails admin you can find a code on github at that address As I said, it's a Ruby summer of code 2010 project my main mentor was a Eric Michael Alberts over so
03:07
It was a very very nice collaboration between us also a lot of important people from the Ruby on Rails community contributed to to disband to this project as mentoring and everything like you who the cuts and
03:22
all the people mentioned The history of the rails admin is that Eric coded the mer badman that is a port of The well-known Django admin and I had to port mer badman to two rails three so
03:42
The Rails admin is in fact rails engine that is a feature introduced in rails 2 and Continuing to rails 3 so you have basic Ruby on Rails application and You can run that application
04:00
in a different ribbon or else application just Structuring your code a little different so you have you keep your main logic with controllers models and views and you just name space your application and
04:21
Through many through magic everything works. So it's it's very very simple to write an engine So this is a controller that is just name space and it works also Oh You can do that with the module also and
04:42
That's the the basic of rails engines also the routes that is a pretty important thing in the rails you can also do this and you're in your app and Everything works out of magic. So it's it's very nice to write
05:02
Rails engine So rails admin does the crud thing very very well it does automatic form validation Of course you want to have your data Protected by some sort of authentication. So we we use device you can do column search history. It's a pretty pretty
05:25
full option admin panel So, how do you install it you just write in your gem file two lines of code you run bundle update and After I after that you just another line of
05:40
Generators and that's it. Your admin is plug into your rails app also an important feature that is going to be available in rails 3.1 is Mountable apps so I have my rails engine that is not installed via gem and I only say
06:01
Mount an application and it all works Okay, so I'm going to do a short demo to show you how The rails admin works okay, so
06:21
this is my typical web sorry web application and I have put the Sorry, I don't know if it's it's very nice to see but
06:41
Okay
07:02
Okay, perfect so You just put this two lines of code and everything works and you run the the basic installation so you start the web server and
07:23
It works in fact Sorry, that's there was there because It's a basic rails application does not have the the basic path
07:42
set out so You run this if you have a clean web application installed you have the rails admin asks asked you for a username and password that is on via device and This is how the main panel looks like I have a simple
08:01
post small Model and I can view multiple columns. I can edit Different Entry I can create a new one also It maps validations. So you have you have one too many or many too many
08:22
Associations sorry does that you can put in Let's say we do a quick Model
08:41
Title I think so I put a validation there and I hope that I Okay, so if I do this it says
09:01
It could not update the post because it has a blank title So this is the basic rails admin also you can do searches You can rotate you can select different Entries to delete and You have a history that is row based. So every modification to your
09:26
Table is mapped to the history table So this is the basics of the rails admin So we're going to launch the rails admin 1.0 in a few weeks
09:46
That's the main milestone for the rails admin. But if you pull the the code from the git repository It's production ready. We have a lot of tests written so you can run those tests and see that everything passes
10:03
Also since I've stopped working on On the Ruby summer of code in September. We had we have now 1,200 Watchers and github it has been translated into 12 languages and Configuration DSL has been written by the community. So a lot of people contribute to our application and
10:29
This is a sample of the configuration DSL if you want to hide model in your application you just do this and the model disappears
10:44
Okay, so If you have any questions, feel free to ask there is a lot of debate on our issue tracker and github because People don't want a rails admin to use device Because it's normal in some way because
11:05
because There every people every web developer wants to write his own Authentication scheme so it's not very very used device by the community, but
11:21
We use it and the project as the rels admin has starting to have a lot of users Permissions we haven't set up some sort of permission framework for the application. So the user has just one super the
11:41
Plug-in has one super user that does everything the configuration is being done through the DSL any questions Please can you repeat the question, please?
12:10
No Okay, so he asked that for the rails 1.0. We support polymorphic associations. That's right. Okay for the moment now, but
12:22
if you really need the polymorphic associations your fee to pull a request and get and do that yourself and We have a lot of contributors that are going to accept your patch as quickly as we can so we have Now seven month since we started the project. We're pretty young and we accept as many contributors as we can
12:47
another question No, okay. Thank you very much You