Add RailsAdmin
This commit is contained in:
parent
f7b0c9efaa
commit
d2ef315ade
2
Gemfile
2
Gemfile
|
@ -1,7 +1,9 @@
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '3.1.0.rc5'
|
gem 'rails', '3.1.0.rc5'
|
||||||
|
gem 'arel', '2.1.4'
|
||||||
gem 'devise'
|
gem 'devise'
|
||||||
|
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
|
||||||
gem 'geokit'
|
gem 'geokit'
|
||||||
gem 'haml', '~> 3.2.0.alpha'
|
gem 'haml', '~> 3.2.0.alpha'
|
||||||
gem 'therubyracer', :platforms => :ruby
|
gem 'therubyracer', :platforms => :ruby
|
||||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -1,3 +1,12 @@
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/sferik/rails_admin.git
|
||||||
|
revision: 8256083a05491255d3a010c1af9a79f55b003bff
|
||||||
|
specs:
|
||||||
|
rails_admin (0.0.1)
|
||||||
|
builder (~> 3.0.0)
|
||||||
|
haml (>= 3.1.0, < 3.3.0)
|
||||||
|
rails (~> 3.1.0.rc1)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
@ -64,7 +73,7 @@ GEM
|
||||||
rack (1.3.2)
|
rack (1.3.2)
|
||||||
rack-cache (1.0.2)
|
rack-cache (1.0.2)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-mount (0.8.1)
|
rack-mount (0.8.2)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-ssl (1.3.2)
|
rack-ssl (1.3.2)
|
||||||
rack
|
rack
|
||||||
|
@ -119,12 +128,14 @@ PLATFORMS
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
ZenTest
|
ZenTest
|
||||||
|
arel (= 2.1.4)
|
||||||
devise
|
devise
|
||||||
geokit
|
geokit
|
||||||
haml (~> 3.2.0.alpha)
|
haml (~> 3.2.0.alpha)
|
||||||
jruby-openssl
|
jruby-openssl
|
||||||
pg
|
pg
|
||||||
rails (= 3.1.0.rc5)
|
rails (= 3.1.0.rc5)
|
||||||
|
rails_admin!
|
||||||
simplecov
|
simplecov
|
||||||
sqlite3
|
sqlite3
|
||||||
therubyracer
|
therubyracer
|
||||||
|
|
|
@ -9,5 +9,6 @@ AdoptAHydrant::Application.routes.draw do
|
||||||
get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
|
get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
|
||||||
resource :hydrants
|
resource :hydrants
|
||||||
resource :reminders
|
resource :reminders
|
||||||
|
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
|
||||||
root :to => 'main#index'
|
root :to => 'main#index'
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
create_table :rails_admin_histories do |t|
|
||||||
|
t.string :message # title, name, or object_id
|
||||||
|
t.string :username
|
||||||
|
t.integer :item
|
||||||
|
t.string :table
|
||||||
|
t.integer :month, :limit => 2
|
||||||
|
t.integer :year, :limit => 5
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' )
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
drop_table :rails_admin_histories
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,18 @@
|
||||||
|
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
create_table :rails_admin_histories do |t|
|
||||||
|
t.string :message # title, name, or object_id
|
||||||
|
t.string :username
|
||||||
|
t.integer :item
|
||||||
|
t.string :table
|
||||||
|
t.integer :month, :limit => 2
|
||||||
|
t.integer :year, :limit => 5
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' )
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
drop_table :rails_admin_histories
|
||||||
|
end
|
||||||
|
end
|
15
db/schema.rb
15
db/schema.rb
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 3) do
|
ActiveRecord::Schema.define(:version => 20110809190528) do
|
||||||
|
|
||||||
create_table "hydrants", :force => true do |t|
|
create_table "hydrants", :force => true do |t|
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
@ -24,6 +24,19 @@ ActiveRecord::Schema.define(:version => 3) do
|
||||||
|
|
||||||
add_index "hydrants", ["city_id"], :name => "index_hydrants_on_city_id", :unique => true
|
add_index "hydrants", ["city_id"], :name => "index_hydrants_on_city_id", :unique => true
|
||||||
|
|
||||||
|
create_table "rails_admin_histories", :force => true do |t|
|
||||||
|
t.string "message"
|
||||||
|
t.string "username"
|
||||||
|
t.integer "item"
|
||||||
|
t.string "table"
|
||||||
|
t.integer "month", :limit => 2
|
||||||
|
t.integer "year", :limit => 8
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "rails_admin_histories", ["item", "table", "month", "year"], :name => "index_rails_admin_histories"
|
||||||
|
|
||||||
create_table "reminders", :force => true do |t|
|
create_table "reminders", :force => true do |t|
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
|
Loading…
Reference in New Issue