The document discusses RailsAdmin, an open source Ruby on Rails engine that provides an easy to use interface for data administration. It provides features like CRUD (create, read, update, delete) operations, validation, authentication, searching, and an action history in an interface that is simple, secure and fast compared to writing a custom admin panel or using a CMS. The talk provides an overview of RailsAdmin and demonstrates its installation and use.
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. Began
as
Erik’s
MerbAdmin
and
then
got
ported
to
Rails
3
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
17. RailsAdmin
is
a
Rails
Engine
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
18. Basic Engines
controllers
require 'rails_admin/abstract_model'
module RailsAdmin
class ApplicationController < ::ApplicationController
end
end
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
19. Basic Engines
models
module RailsAdmin
class History < ActiveRecord::Base
end
end
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
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. 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. 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. With
Rails
3.1
Rails
Admin
will
be
mountable.
(Thanks
to
Piotr!)
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
26. Rails
3.1
and
RailsAdmin
1.0
around
the
end
of
the
year.
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010
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. Configuration DSL
experimental
Thanks to kappa (Petteri Kääpä)!
http://gist.github.com/638153
RubyAndRails 2010 @hurrycane
Thursday, October 21, 2010