RailsAdmin
                             The right way of doing data administration




                                   ...
$	
  whoami
                  Student at Faculty of Computer Science, Iasi, Romania

                                Freel...
Data administration is ________*
                                          SPEAK UP!




  * talking in the context of a w...
...	
  the	
  way	
  you	
  organize	
  and	
  control	
  your	
  data

RubyAndRails 2010                                 ...
Data administration means the admin panel.

RubyAndRails 2010                                               @hurrycane
Thu...
HOW?
                             Both	
  simple,	
  secure	
  and	
  fast




RubyAndRails 2010                          ...
Most people write custom
                          admin panels.

                               prone	
  to	
  errors
   ...
Other use CMSs

                                  usually	
  secure
                                       NOT	
  fast
   ...
The Rails way of doing it
                using a plugin engine.
                             usually	
  secure
          ...
And the choices are:



RubyAndRails 2010                                   @hurrycane
Thursday, October 21, 2010
lipsiaAdmin




                             ExtJS | permissions | Rails 2.x
                                      www.lip...
ActiveScaffold




                 Embed-able | Third-Party-Plugins | Rails 2.x
                               http://www...
Hobo




                        WebAppBuilder | Permissions | Rails 3.x
                                      http://hobo...
Introducing

                                 RailsAdmin

                             http://github.com/sferik/rails_admi...
RubySOC	
  2010	
  Project
                                     mentors
                               Erik Michaels-Ober,...
Began	
  as	
  Erik’s	
  MerbAdmin	
  
                    and	
  then	
  got	
  ported	
  to	
  
                        ...
RailsAdmin	
  is	
  a	
  Rails	
  Engine

RubyAndRails 2010                                                       @hurryca...
Basic Engines
                                 controllers



    require 'rails_admin/abstract_model'

    module RailsAd...
Basic Engines
                                  models




     module RailsAdmin
       class History < ActiveRecord::Bas...
Basic Engines
                                        routes



                  Rails.application.routes.draw do

      ...
RailsAdmin



                                                 }
                             C   Create new
             ...
RailsAdmin	
  -­‐	
  simple	
  to	
  install

  Add in your Gemfile
 gem 'devise' # Devise must be required before RailsAdm...
With	
  Rails	
  3.1	
  Rails	
  Admin	
  will	
  be	
  
            mountable.	
  (Thanks	
  to	
  Piotr!)




RubyAndRai...
Rails.application.routes.draw do
    mount Admin::Engine => "/admin"
  end




RubyAndRails 2010               @hurrycane
...
DEMO


RubyAndRails 2010                   @hurrycane
Thursday, October 21, 2010
Rails	
  3.1	
  and	
  RailsAdmin	
  1.0	
  around	
  the
                                       end	
  of	
  the	
  year....
e?        Do
                                      vi s       hav es it
                                    De            ...
Configuration DSL
                                   experimental


                             Thanks to kappa (Petteri K...
Thanks!



RubyAndRails 2010                      @hurrycane
Thursday, October 21, 2010
Upcoming SlideShare
Loading in …5
×

RailsAdmin - the right way of doing data administration with Rails 3

13,851 views

Published on

From RubyAndRails Europe 2010

Published in: Technology, Education

RailsAdmin - the right way of doing data administration with Rails 3

  1. 1. RailsAdmin The right way of doing data administration RubyAndRails 2010 Bogdan Gaza RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  2. 2. $  whoami Student at Faculty of Computer Science, Iasi, Romania Freelance web developer RubySOC 2010 student bogdan.gaza@info.uaic.ro @hurrycane RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  3. 3. Data administration is ________* SPEAK UP! * talking in the context of a web app RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  4. 4. ...  the  way  you  organize  and  control  your  data RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  5. 5. Data administration means the admin panel. RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  6. 6. HOW? Both  simple,  secure  and  fast RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  7. 7. Most people write custom admin panels. prone  to  errors definitely  NOT  fast not  very  simple RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  8. 8. Other use CMSs usually  secure NOT  fast simple  but  not  flexible RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  9. 9. The Rails way of doing it using a plugin engine. usually  secure fast simple RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  10. 10. And the choices are: RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  11. 11. lipsiaAdmin ExtJS | permissions | Rails 2.x www.lipsiadmin.com RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  12. 12. ActiveScaffold Embed-able | Third-Party-Plugins | Rails 2.x http://www.activescaffold.com/ RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  13. 13. Hobo WebAppBuilder | Permissions | Rails 3.x http://hobocentral.net/ RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  14. 14. Introducing RailsAdmin http://github.com/sferik/rails_admin/ RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  15. 15. RubySOC  2010  Project mentors Erik Michaels-Ober, Yehuda Katz, Rodrigo Rosenfeld Rosas, Luke van der Hoeven and Rein Henrichs. RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  16. 16. Began  as  Erik’s  MerbAdmin   and  then  got  ported  to   Rails  3 RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  17. 17. RailsAdmin  is  a  Rails  Engine RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  18. 18. Basic Engines controllers require 'rails_admin/abstract_model' module RailsAdmin   class ApplicationController < ::ApplicationController   end end RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  19. 19. Basic Engines models module RailsAdmin   class History < ActiveRecord::Base   end end RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  20. 20. Basic Engines routes Rails.application.routes.draw do     # Routes for rails_admin controller     controller "main" do       match "/", :to => :index, :as => "dashboard"       match "/:model_name", :to => :list, :as => "list"       ...     end end For more info checkout the mountable apps RubySOC project. RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  21. 21. RailsAdmin } C Create new R Show U Easily Update Your  Data D Safely Delete Automatic form validation Authentication (using Devise) Multi-column-search Use Action History (per row) RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  22. 22. RailsAdmin  -­‐  simple  to  install Add in your Gemfile gem 'devise' # Devise must be required before RailsAdmin gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git' Run $ bundle update Also run: $ rails generate rails_admin:install_admin RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  23. 23. With  Rails  3.1  Rails  Admin  will  be   mountable.  (Thanks  to  Piotr!) RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  24. 24. Rails.application.routes.draw do mount Admin::Engine => "/admin" end RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  25. 25. DEMO RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  26. 26. Rails  3.1  and  RailsAdmin  1.0  around  the end  of  the  year. RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  27. 27. e? Do vi s hav es it De e au nee hy the ntic d to W QA atio n? Con figur ns atio i ssio n? Perm RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  28. 28. Configuration DSL experimental Thanks to kappa (Petteri Kääpä)! http://gist.github.com/638153 RubyAndRails 2010 @hurrycane Thursday, October 21, 2010
  29. 29. Thanks! RubyAndRails 2010 @hurrycane Thursday, October 21, 2010

×