We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Rails Admin: The right way of doing data administration with Rails 3

00:00

Formal Metadata

Title
Rails Admin: The right way of doing data administration with Rails 3
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
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
My presentation focuses on Rails Admin, the project which I have developed under the auspices of the Ruby Summer of Code initiative. My involvement in the Ruby Summer of Code project departed from the goal I have shared with both my coworkers and my mentor - that of further increasing the ease and speed of Ruby web application development.
Student's t-testFaculty (division)ComputerSoftware developerProjective planeStudent's t-testSoftware developerCodePresentation of a groupTwitterComputer animation
Web 2.0Web applicationWeb-DesignerComputer animation
Control flowCartesian coordinate systemLogicType theoryGame controllerComputer animation
QuicksortType theoryComputer animation
Error messageAddress spaceCodeCanadian Mathematical SocietySoftware testingMultiplication signComputer animation
CollaborationismProjective planeFilm editingRuby on RailsComputer animationLecture/Conference
Computer animation
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
Web 2.0Computer animation
8 (number)MIDIWeb 2.0Web applicationCartesian coordinate systemComputer animation
10 (number)Perfect groupComputer animation
Execution unitDebuggerLine (geometry)CodeAssociative propertyWeb 2.0Cartesian coordinate systemServer (computing)Task (computing)Drill commandsWeb applicationEndliche ModelltheoriePasswordValidity (statistics)MappingDifferent (Kate Ryan album)Computer animation
Maxima and minimaQuadrilateralEndliche ModelltheorieValidity (statistics)Computer animation
Table (information)Military baseComputer animation
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
XML
Transcript: English(auto-generated)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Okay
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
It works in fact Sorry, that's there was there because It's a basic rails application does not have the the basic path
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
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
Associations sorry does that you can put in Let's say we do a quick Model
Title I think so I put a validation there and I hope that I Okay, so if I do this it says
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
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
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
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
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
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
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
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
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?
No Okay, so he asked that for the rails 1.0. We support polymorphic associations. That's right. Okay for the moment now, but
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
another question No, okay. Thank you very much You