Add RailsAdmin
This commit is contained in:
parent
f7b0c9efaa
commit
d2ef315ade
2
Gemfile
2
Gemfile
|
@ -1,7 +1,9 @@
|
|||
source 'http://rubygems.org'
|
||||
|
||||
gem 'rails', '3.1.0.rc5'
|
||||
gem 'arel', '2.1.4'
|
||||
gem 'devise'
|
||||
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
|
||||
gem 'geokit'
|
||||
gem 'haml', '~> 3.2.0.alpha'
|
||||
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
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
|
@ -64,7 +73,7 @@ GEM
|
|||
rack (1.3.2)
|
||||
rack-cache (1.0.2)
|
||||
rack (>= 0.4)
|
||||
rack-mount (0.8.1)
|
||||
rack-mount (0.8.2)
|
||||
rack (>= 1.0.0)
|
||||
rack-ssl (1.3.2)
|
||||
rack
|
||||
|
@ -119,12 +128,14 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
ZenTest
|
||||
arel (= 2.1.4)
|
||||
devise
|
||||
geokit
|
||||
haml (~> 3.2.0.alpha)
|
||||
jruby-openssl
|
||||
pg
|
||||
rails (= 3.1.0.rc5)
|
||||
rails_admin!
|
||||
simplecov
|
||||
sqlite3
|
||||
therubyracer
|
||||
|
|
|
@ -9,5 +9,6 @@ AdoptAHydrant::Application.routes.draw do
|
|||
get 'sitemap' => 'sitemaps#index', :as => 'sitemap'
|
||||
resource :hydrants
|
||||
resource :reminders
|
||||
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
|
||||
root :to => 'main#index'
|
||||
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.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 3) do
|
||||
ActiveRecord::Schema.define(:version => 20110809190528) do
|
||||
|
||||
create_table "hydrants", :force => true do |t|
|
||||
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
|
||||
|
||||
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|
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
|
|
Loading…
Reference in New Issue