added rails_admin gem as an alternative for activescaffold
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
|
||||
gem 'rails_admin'
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rails', '4.2.0'
|
||||
# Use postgresql as the database for Active Record
|
||||
|
||||
@@ -68,8 +68,12 @@ GEM
|
||||
debugger-linecache (1.2.0)
|
||||
erubis (2.7.0)
|
||||
execjs (2.2.2)
|
||||
font-awesome-rails (4.3.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
globalid (0.3.0)
|
||||
activesupport (>= 4.1.0)
|
||||
haml (4.0.6)
|
||||
tilt
|
||||
hike (1.2.3)
|
||||
i18n (0.7.0)
|
||||
jbuilder (2.2.6)
|
||||
@@ -82,6 +86,9 @@ GEM
|
||||
jquery-ui-rails (5.0.3)
|
||||
railties (>= 3.2.16)
|
||||
json (1.8.2)
|
||||
kaminari (0.16.3)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
loofah (2.0.1)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.6.3)
|
||||
@@ -90,6 +97,7 @@ GEM
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.5.1)
|
||||
multi_json (1.10.1)
|
||||
nested_form (0.3.2)
|
||||
netrc (0.10.2)
|
||||
nokogiri (1.6.5)
|
||||
mini_portile (~> 0.6.0)
|
||||
@@ -97,6 +105,9 @@ GEM
|
||||
puma (2.10.2)
|
||||
rack (>= 1.1, < 2.0)
|
||||
rack (1.6.0)
|
||||
rack-pjax (0.8.0)
|
||||
nokogiri (~> 1.5)
|
||||
rack (~> 1.1)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rails (4.2.0)
|
||||
@@ -118,6 +129,20 @@ GEM
|
||||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.1)
|
||||
loofah (~> 2.0)
|
||||
rails_admin (0.6.6)
|
||||
builder (~> 3.1)
|
||||
coffee-rails (~> 4.0)
|
||||
font-awesome-rails (>= 3.0, < 5)
|
||||
haml (~> 4.0)
|
||||
jquery-rails (>= 3.0, < 5)
|
||||
jquery-ui-rails (~> 5.0)
|
||||
kaminari (~> 0.14)
|
||||
nested_form (~> 0.3)
|
||||
rack-pjax (~> 0.7)
|
||||
rails (~> 4.0)
|
||||
remotipart (~> 1.0)
|
||||
safe_yaml (~> 1.0)
|
||||
sass-rails (>= 4.0, < 6)
|
||||
railties (4.2.0)
|
||||
actionpack (= 4.2.0)
|
||||
activesupport (= 4.2.0)
|
||||
@@ -126,9 +151,11 @@ GEM
|
||||
rake (10.4.2)
|
||||
rdoc (4.2.0)
|
||||
json (~> 1.4)
|
||||
remotipart (1.2.1)
|
||||
rest-client (1.7.2)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.4.9)
|
||||
sass-rails (5.0.1)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
@@ -180,6 +207,7 @@ DEPENDENCIES
|
||||
pg
|
||||
puma
|
||||
rails (= 4.2.0)
|
||||
rails_admin
|
||||
sass-rails (~> 5.0)
|
||||
sdoc (~> 0.4.0)
|
||||
spring
|
||||
|
||||
34
back-office/config/initializers/rails_admin.rb
Normal file
34
back-office/config/initializers/rails_admin.rb
Normal file
@@ -0,0 +1,34 @@
|
||||
RailsAdmin.config do |config|
|
||||
|
||||
### Popular gems integration
|
||||
|
||||
## == Devise ==
|
||||
# config.authenticate_with do
|
||||
# warden.authenticate! scope: :user
|
||||
# end
|
||||
# config.current_user_method(&:current_user)
|
||||
|
||||
## == Cancan ==
|
||||
# config.authorize_with :cancan
|
||||
|
||||
## == PaperTrail ==
|
||||
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
|
||||
|
||||
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
|
||||
|
||||
config.actions do
|
||||
dashboard # mandatory
|
||||
index # mandatory
|
||||
new
|
||||
export
|
||||
bulk_delete
|
||||
show
|
||||
edit
|
||||
delete
|
||||
show_in_app
|
||||
|
||||
## With an audit adapter, you can add:
|
||||
# history_index
|
||||
# history_show
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,6 @@
|
||||
Rails.application.routes.draw do
|
||||
|
||||
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
|
||||
resources :filter_criteria_values do as_routes end
|
||||
resources :filter_criteria do as_routes end
|
||||
resources :item_in_carts do as_routes end
|
||||
|
||||
Reference in New Issue
Block a user