1. RailsAdmin
The right way of doing data administration
FOSDEM 2011
Bogdan Gaza
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
2. $ whoami
Student at Faculty of Computer Science, Iasi, Romania
Developer at MojoTech
RubySOC 2010 student
@hurrycane
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
3. Data administration is ________*
* talking in the context of a web app
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
4. ... the way you organize and control
your data
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
11. RubySOC 2010
Project
mentors
Erik Michaels-Ober,
Yehuda Katz,
Rodrigo Rosenfeld Rosas,
Luke van der Hoeven and
Rein Henrichs.
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
12. Began as Erik’s
MerbAdmin and then
got ported to Rails 3
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
13. RailsAdmin is a Rails Engine
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
14. Basic Engines
controllers
require 'rails_admin/abstract_model'
module RailsAdmin
class ApplicationController < ::ApplicationController
end
end
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
15. Basic Engines
models
module RailsAdmin
class History < ActiveRecord::Base
end
end
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
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 @hurrycane
Sunday, February 6, 2011
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 @hurrycane
Sunday, February 6, 2011
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 @hurrycane
Sunday, February 6, 2011
19. With Rails 3.1 Rails Admin
will be mountable. (Thanks
to Piotr!)
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
21. DEMO
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
22. RailsAdmin 1.0 in a few weeks.
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
23. RailsAdmin - configuration DSL
RailsAdmin.config do |config|
config.model Team do
navigation do
visible false
end
end
end
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011
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 @hurrycane
Sunday, February 6, 2011
25. Thanks!
FOSDEM 2011 @hurrycane
Sunday, February 6, 2011