Fosdem2011

1,424 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,424
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Fosdem2011

  1. 1. RailsAdmin The right way of doing data administration FOSDEM 2011 Bogdan Gaza FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  2. 2. $ whoami Student at Faculty of Computer Science, Iasi, Romania Developer at MojoTech RubySOC 2010 student @hurrycane FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  3. 3. Data administration is ________* * talking in the context of a web app FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  4. 4. ... the way you organize and control your data FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  5. 5. Data administration means the admin panel. FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  6. 6. HOW? Both simple, secure and fast FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  7. 7. Most people write custom admin panels. prone to errors definitely NOT fast not very simple FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  8. 8. Other use CMSs usually secure NOT fast simple but not flexible FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  9. 9. The Rails way of doing it is using a plugin engine. usually secure fast simple FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  10. 10. Introducing RailsAdmin http://github.com/sferik/rails_admin/ FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  11. 11. RubySOC 2010 Project mentors Erik Michaels-Ober, Yehuda Katz, Rodrigo Rosenfeld Rosas, Luke van der Hoeven and Rein Henrichs. FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  12. 12. Began as Erik’s MerbAdmin and then got ported to Rails 3 FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  13. 13. RailsAdmin is a Rails Engine FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  14. 14. Basic Engines controllers require rails_admin/abstract_model module RailsAdmin   class ApplicationController < ::ApplicationController   end end FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  15. 15. Basic Engines models module RailsAdmin   class History < ActiveRecord::Base   end end FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  16. 16. 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. FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  17. 17. 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) FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  18. 18. 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 FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  19. 19. With Rails 3.1 Rails Admin will be mountable. (Thanks to Piotr!) FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  20. 20. Rails.application.routes.draw do mount Admin::Engine => "/admin" end FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  21. 21. DEMO FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  22. 22. RailsAdmin 1.0 in a few weeks. FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  23. 23. RailsAdmin - configuration DSL RailsAdmin.config do |config| config.model Team do navigation do visible false end end end FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  24. 24. 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 FOSDEM 2011 @hurrycaneSunday, February 6, 2011
  25. 25. Thanks! FOSDEM 2011 @hurrycaneSunday, February 6, 2011

×