rails_admin; i do what i want

This commit is contained in:
Maxwell Salzberg 2012-04-13 18:07:56 -07:00
parent a0ea8c8542
commit ecc1a84b42
6 changed files with 1203 additions and 1 deletions

View file

@ -25,6 +25,7 @@ gem 'omniauth-tumblr'
gem 'omniauth-twitter' gem 'omniauth-twitter'
gem 'twitter', '2.0.2' gem 'twitter', '2.0.2'
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
# mail # mail

View file

@ -44,6 +44,24 @@ GIT
rspec (>= 1.3.1) rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3) selenium-webdriver (>= 0.1.3)
GIT
remote: git://github.com/sferik/rails_admin.git
revision: e17434dab04d9ffbb574862d9c2a06fe9013c756
specs:
rails_admin (0.0.1)
bbenezech-nested_form (~> 0.0.6)
bootstrap-sass (~> 2.0)
builder (~> 3.0)
coffee-rails (~> 3.1)
haml (~> 3.1)
jquery-rails (>= 1.0)
jquery-ui-rails (~> 0.2.2)
kaminari (~> 0.12)
rack-pjax (~> 0.5)
rails (~> 3.1)
remotipart (~> 1.0)
sass-rails (~> 3.1)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
@ -93,6 +111,7 @@ GEM
asset_sync (0.3.1) asset_sync (0.3.1)
activemodel activemodel
fog fog
bbenezech-nested_form (0.0.6)
bcrypt-ruby (3.0.1) bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.2) bootstrap-sass (2.0.2)
builder (3.0.0) builder (3.0.0)
@ -119,6 +138,13 @@ GEM
ffi (~> 1.0.6) ffi (~> 1.0.6)
chronic (0.6.7) chronic (0.6.7)
client_side_validations (3.1.4) client_side_validations (3.1.4)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.1)
columnize (0.3.6) columnize (0.3.6)
cookiejar (0.3.0) cookiejar (0.3.0)
crack (0.3.1) crack (0.3.1)
@ -221,6 +247,7 @@ GEM
highline (1.6.11) highline (1.6.11)
hike (1.2.1) hike (1.2.1)
hodel_3000_compliant_logger (0.1.0) hodel_3000_compliant_logger (0.1.0)
hpricot (0.8.6)
http_accept_language (1.0.2) http_accept_language (1.0.2)
http_parser.rb (0.5.3) http_parser.rb (0.5.3)
i18n (0.6.0) i18n (0.6.0)
@ -234,9 +261,16 @@ GEM
jquery-rails (1.0.19) jquery-rails (1.0.19)
railties (~> 3.0) railties (~> 3.0)
thor (~> 0.14) thor (~> 0.14)
jquery-ui-rails (0.2.2)
jquery-rails
railties (>= 3.1.0)
json (1.6.6) json (1.6.6)
jwt (0.1.4) jwt (0.1.4)
json (>= 1.2.4) json (>= 1.2.4)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
kgio (2.7.4) kgio (2.7.4)
launchy (2.0.3) launchy (2.0.3)
linecache (0.46) linecache (0.46)
@ -316,6 +350,9 @@ GEM
rack-mount (0.8.3) rack-mount (0.8.3)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-piwik (0.1.2) rack-piwik (0.1.2)
rack-pjax (0.5.9)
hpricot (~> 0.8.6)
rack (~> 1.3)
rack-protection (1.2.0) rack-protection (1.2.0)
rack rack
rack-rewrite (1.2.1) rack-rewrite (1.2.1)
@ -533,6 +570,7 @@ DEPENDENCIES
rack-ssl rack-ssl
rails (= 3.1.4) rails (= 3.1.4)
rails-i18n rails-i18n
rails_admin!
rails_autolink rails_autolink
redcarpet (= 2.0.1) redcarpet (= 2.0.1)
remotipart (~> 1.0) remotipart (~> 1.0)

View file

@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
:open_publisher :open_publisher
def ensure_http_referer_is_set def ensure_http_referer_is_set
request.env['HTTP_REFERER'] ||= root_path request.env['HTTP_REFERER'] ||= '/'
end end
# Overwriting the sign_out redirect path method # Overwriting the sign_out redirect path method

File diff suppressed because it is too large Load diff

View file

@ -3,6 +3,8 @@
# the COPYRIGHT file. # the COPYRIGHT file.
Diaspora::Application.routes.draw do Diaspora::Application.routes.draw do
mount RailsAdmin::Engine => '/admin_panel', :as => 'rails_admin'
# Posting and Reading # Posting and Reading
resources :reshares resources :reshares

View file

@ -0,0 +1,18 @@
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
def self.up
create_table :rails_admin_histories do |t|
t.text :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