rails_admin; i do what i want
This commit is contained in:
parent
a0ea8c8542
commit
ecc1a84b42
6 changed files with 1203 additions and 1 deletions
1
Gemfile
1
Gemfile
|
|
@ -25,6 +25,7 @@ gem 'omniauth-tumblr'
|
|||
gem 'omniauth-twitter'
|
||||
|
||||
gem 'twitter', '2.0.2'
|
||||
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
|
||||
|
||||
# mail
|
||||
|
||||
|
|
|
|||
38
Gemfile.lock
38
Gemfile.lock
|
|
@ -44,6 +44,24 @@ GIT
|
|||
rspec (>= 1.3.1)
|
||||
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
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
|
|
@ -93,6 +111,7 @@ GEM
|
|||
asset_sync (0.3.1)
|
||||
activemodel
|
||||
fog
|
||||
bbenezech-nested_form (0.0.6)
|
||||
bcrypt-ruby (3.0.1)
|
||||
bootstrap-sass (2.0.2)
|
||||
builder (3.0.0)
|
||||
|
|
@ -119,6 +138,13 @@ GEM
|
|||
ffi (~> 1.0.6)
|
||||
chronic (0.6.7)
|
||||
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)
|
||||
cookiejar (0.3.0)
|
||||
crack (0.3.1)
|
||||
|
|
@ -221,6 +247,7 @@ GEM
|
|||
highline (1.6.11)
|
||||
hike (1.2.1)
|
||||
hodel_3000_compliant_logger (0.1.0)
|
||||
hpricot (0.8.6)
|
||||
http_accept_language (1.0.2)
|
||||
http_parser.rb (0.5.3)
|
||||
i18n (0.6.0)
|
||||
|
|
@ -234,9 +261,16 @@ GEM
|
|||
jquery-rails (1.0.19)
|
||||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
jquery-ui-rails (0.2.2)
|
||||
jquery-rails
|
||||
railties (>= 3.1.0)
|
||||
json (1.6.6)
|
||||
jwt (0.1.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)
|
||||
launchy (2.0.3)
|
||||
linecache (0.46)
|
||||
|
|
@ -316,6 +350,9 @@ GEM
|
|||
rack-mount (0.8.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-piwik (0.1.2)
|
||||
rack-pjax (0.5.9)
|
||||
hpricot (~> 0.8.6)
|
||||
rack (~> 1.3)
|
||||
rack-protection (1.2.0)
|
||||
rack
|
||||
rack-rewrite (1.2.1)
|
||||
|
|
@ -533,6 +570,7 @@ DEPENDENCIES
|
|||
rack-ssl
|
||||
rails (= 3.1.4)
|
||||
rails-i18n
|
||||
rails_admin!
|
||||
rails_autolink
|
||||
redcarpet (= 2.0.1)
|
||||
remotipart (~> 1.0)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base
|
|||
:open_publisher
|
||||
|
||||
def ensure_http_referer_is_set
|
||||
request.env['HTTP_REFERER'] ||= root_path
|
||||
request.env['HTTP_REFERER'] ||= '/'
|
||||
end
|
||||
|
||||
# Overwriting the sign_out redirect path method
|
||||
|
|
|
|||
1143
config/initializers/rails_admin.rb
Normal file
1143
config/initializers/rails_admin.rb
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -3,6 +3,8 @@
|
|||
# the COPYRIGHT file.
|
||||
|
||||
Diaspora::Application.routes.draw do
|
||||
mount RailsAdmin::Engine => '/admin_panel', :as => 'rails_admin'
|
||||
|
||||
# Posting and Reading
|
||||
resources :reshares
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in a new issue