diff --git a/Gemfile b/Gemfile index fa2490b..b4a1d52 100644 --- a/Gemfile +++ b/Gemfile @@ -46,3 +46,4 @@ end # Use debugger gem 'debugger', group: [:development, :test] gem 'pry-nav', group: :development +gem 'rails_admin' diff --git a/Gemfile.lock b/Gemfile.lock index 990bc99..65ad728 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,6 +52,10 @@ GEM warden (~> 1.2.3) erubis (2.7.0) execjs (2.0.2) + font-awesome-rails (4.0.3.1) + railties (>= 3.2, < 5.0) + haml (4.0.5) + tilt hike (1.2.3) i18n (0.6.9) jbuilder (1.5.3) @@ -60,14 +64,23 @@ GEM jquery-rails (3.1.0) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) + jquery-ui-rails (4.1.1) + railties (>= 3.1.0) json (1.8.1) + kaminari (0.15.1) + actionpack (>= 3.0.0) + activesupport (>= 3.0.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) method_source (0.8.2) mime-types (1.25.1) + mini_portile (0.5.2) minitest (4.7.5) multi_json (1.8.4) + nested_form (0.3.2) + nokogiri (1.6.1) + mini_portile (~> 0.5.0) orm_adapter (0.5.0) polyglot (0.3.3) pry (0.9.12.6) @@ -77,6 +90,9 @@ GEM pry-nav (0.2.3) pry (~> 0.9.10) rack (1.5.2) + rack-pjax (0.7.0) + nokogiri (~> 1.5) + rack (~> 1.3) rack-test (0.6.2) rack (>= 1.0) rails (4.0.2) @@ -87,6 +103,20 @@ GEM bundler (>= 1.3.0, < 2.0) railties (= 4.0.2) sprockets-rails (~> 2.0.0) + rails_admin (0.6.1) + builder (~> 3.1) + coffee-rails (~> 4.0) + font-awesome-rails (>= 3.0) + haml (~> 4.0) + jquery-rails (~> 3.0) + jquery-ui-rails (~> 4.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) railties (4.0.2) actionpack (= 4.0.2) activesupport (= 4.0.2) @@ -95,6 +125,8 @@ GEM rake (10.1.1) rdoc (4.1.1) json (~> 1.4) + remotipart (1.2.1) + safe_yaml (1.0.1) sass (3.2.14) sass-rails (4.0.1) railties (>= 4.0.0, < 5.0) @@ -141,6 +173,7 @@ DEPENDENCIES jquery-rails pry-nav rails (= 4.0.2) + rails_admin sass-rails (~> 4.0.0) sdoc sqlite3 diff --git a/config/initializers/rails_admin.rb b/config/initializers/rails_admin.rb new file mode 100644 index 0000000..ca52321 --- /dev/null +++ b/config/initializers/rails_admin.rb @@ -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 diff --git a/config/routes.rb b/config/routes.rb index 39e973a..352959f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,5 @@ Insight2::Application.routes.draw do + mount RailsAdmin::Engine => '/admin', :as => 'rails_admin' devise_for :users get '/wel', to: 'welcome#index' get '/req_list', to: 'welcome#request_list', as: "request_list"