Skip to content

Commit c53263d

Browse files
Setup rails_admin and remove turbolinks from application javascript
1 parent 2d711be commit c53263d

File tree

5 files changed

+121
-1
lines changed

5 files changed

+121
-1
lines changed

Diff for: Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ gem 'jbuilder', '~> 2.5'
2323
# Use Capistrano for deployment
2424
# gem 'capistrano-rails', group: :development
2525

26+
gem 'rails_admin_rollincode', '~> 1.0'
27+
gem 'rails_admin', git: 'https://github.com/sferik/rails_admin.git'
28+
gem 'haml-rails'
29+
2630
group :development, :test do
2731
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
2832
gem 'capybara', '~> 2.13.0'

Diff for: Gemfile.lock

+75
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
GIT
2+
remote: https://github.com/sferik/rails_admin.git
3+
revision: 66f3dbd4584282d568fb709e3be95e0fa615b6d0
4+
specs:
5+
rails_admin (1.1.1)
6+
builder (~> 3.1)
7+
coffee-rails (~> 4.0)
8+
font-awesome-rails (>= 3.0, < 5)
9+
haml (>= 4.0, < 6)
10+
jquery-rails (>= 3.0, < 5)
11+
jquery-ui-rails (~> 5.0)
12+
kaminari (>= 0.14, < 2.0)
13+
nested_form (~> 0.3)
14+
rack-pjax (>= 0.7)
15+
rails (>= 4.0, < 6)
16+
remotipart (~> 1.3)
17+
sass-rails (>= 4.0, < 6)
18+
119
GIT
220
remote: https://github.com/thoughtbot/shoulda-matchers.git
321
revision: ead87017a6c15adce66a87dce8ee2ece91d0d27c
@@ -64,6 +82,13 @@ GEM
6482
xpath (~> 2.0)
6583
cliver (0.3.2)
6684
coderay (1.1.1)
85+
coffee-rails (4.2.1)
86+
coffee-script (>= 2.2.0)
87+
railties (>= 4.0.0, < 5.2.x)
88+
coffee-script (2.4.1)
89+
coffee-script-source
90+
execjs
91+
coffee-script-source (1.12.2)
6792
concurrent-ruby (1.0.5)
6893
database_cleaner (1.5.3)
6994
diff-lcs (1.3)
@@ -73,6 +98,7 @@ GEM
7398
dotenv (= 2.2.1)
7499
railties (>= 3.2, < 5.2)
75100
erubi (1.6.0)
101+
erubis (2.7.0)
76102
execjs (2.7.0)
77103
factory_girl (4.8.0)
78104
activesupport (>= 3.0.0)
@@ -81,13 +107,48 @@ GEM
81107
railties (>= 3.0.0)
82108
ffaker (2.5.0)
83109
ffi (1.9.18)
110+
font-awesome-rails (3.1.1.0)
111+
railties (>= 3.1)
84112
globalid (0.4.0)
85113
activesupport (>= 4.2.0)
114+
haml (5.0.0)
115+
temple (>= 0.8.0)
116+
tilt
117+
haml-rails (1.0.0)
118+
actionpack (>= 4.0.1)
119+
activesupport (>= 4.0.1)
120+
haml (>= 4.0.6, < 6.0)
121+
html2haml (>= 1.0.1)
122+
railties (>= 4.0.1)
123+
hpricot (0.8.6)
124+
html2haml (1.0.1)
125+
erubis (~> 2.7.0)
126+
haml (>= 4.0.0.rc.1)
127+
hpricot (~> 0.8.6)
128+
ruby_parser (~> 3.1.1)
86129
i18n (0.8.1)
87130
jbuilder (2.6.3)
88131
activesupport (>= 3.0.0, < 5.2)
89132
multi_json (~> 1.2)
133+
jquery-rails (4.3.1)
134+
rails-dom-testing (>= 1, < 3)
135+
railties (>= 4.2.0)
136+
thor (>= 0.14, < 2.0)
137+
jquery-ui-rails (5.0.5)
138+
railties (>= 3.2.16)
90139
json (2.1.0)
140+
kaminari (1.0.1)
141+
activesupport (>= 4.1.0)
142+
kaminari-actionview (= 1.0.1)
143+
kaminari-activerecord (= 1.0.1)
144+
kaminari-core (= 1.0.1)
145+
kaminari-actionview (1.0.1)
146+
actionview
147+
kaminari-core (= 1.0.1)
148+
kaminari-activerecord (1.0.1)
149+
activerecord
150+
kaminari-core (= 1.0.1)
151+
kaminari-core (1.0.1)
91152
listen (3.1.5)
92153
rb-fsevent (~> 0.9, >= 0.9.4)
93154
rb-inotify (~> 0.9, >= 0.9.7)
@@ -103,6 +164,7 @@ GEM
103164
mini_portile2 (2.1.0)
104165
minitest (5.10.1)
105166
multi_json (1.12.1)
167+
nested_form (0.3.2)
106168
nio4r (2.0.0)
107169
nokogiri (1.7.1)
108170
mini_portile2 (~> 2.1.0)
@@ -121,6 +183,9 @@ GEM
121183
public_suffix (2.0.5)
122184
puma (3.8.2)
123185
rack (2.0.1)
186+
rack-pjax (1.0.0)
187+
nokogiri (~> 1.5)
188+
rack (>= 1.1)
124189
rack-test (0.6.3)
125190
rack (>= 1.0)
126191
rails (5.1.0)
@@ -140,6 +205,8 @@ GEM
140205
nokogiri (~> 1.6)
141206
rails-html-sanitizer (1.0.3)
142207
loofah (~> 2.0)
208+
rails_admin_rollincode (1.2.1)
209+
rails (>= 4.0, < 6)
143210
railties (5.1.0)
144211
actionpack (= 5.1.0)
145212
activesupport (= 5.1.0)
@@ -150,6 +217,7 @@ GEM
150217
rb-fsevent (0.9.8)
151218
rb-inotify (0.9.8)
152219
ffi (>= 0.5.0)
220+
remotipart (1.3.1)
153221
rspec-core (3.5.4)
154222
rspec-support (~> 3.5.0)
155223
rspec-expectations (3.5.0)
@@ -168,13 +236,16 @@ GEM
168236
rspec-support (~> 3.5.0)
169237
rspec-support (3.5.0)
170238
ruby_dep (1.5.0)
239+
ruby_parser (3.1.3)
240+
sexp_processor (~> 4.1)
171241
sass (3.4.23)
172242
sass-rails (5.0.6)
173243
railties (>= 4.0.0, < 6)
174244
sass (~> 3.1)
175245
sprockets (>= 2.8, < 4.0)
176246
sprockets-rails (>= 2.0, < 4.0)
177247
tilt (>= 1.1, < 3)
248+
sexp_processor (4.9.0)
178249
simplecov (0.14.1)
179250
docile (~> 1.1.0)
180251
json (>= 1.8, < 3)
@@ -193,6 +264,7 @@ GEM
193264
actionpack (>= 4.0)
194265
activesupport (>= 4.0)
195266
sprockets (>= 3.0.0)
267+
temple (0.8.0)
196268
thor (0.19.4)
197269
thread_safe (0.3.6)
198270
tilt (2.0.7)
@@ -227,13 +299,16 @@ DEPENDENCIES
227299
dotenv-rails
228300
factory_girl_rails
229301
ffaker
302+
haml-rails
230303
jbuilder (~> 2.5)
231304
listen (>= 3.0.5, < 3.2)
232305
pg
233306
poltergeist
234307
pry-byebug
235308
puma (~> 3.7)
236309
rails (~> 5.1.0)
310+
rails_admin!
311+
rails_admin_rollincode (~> 1.0)
237312
rspec-rails (~> 3.5)
238313
sass-rails (~> 5.0)
239314
shoulda-matchers!

Diff for: app/assets/javascripts/application.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
// about supported directives.
1212
//
1313
//= require rails-ujs
14-
//= require turbolinks
1514
//= require_tree .

Diff for: config/initializers/rails_admin.rb

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
RailsAdmin.config do |config|
2+
3+
### Popular gems integration
4+
5+
## == Devise ==
6+
# config.authenticate_with do
7+
# warden.authenticate! scope: :user
8+
# end
9+
# config.current_user_method(&:current_user)
10+
11+
## == Cancan ==
12+
# config.authorize_with :cancan
13+
14+
## == Pundit ==
15+
# config.authorize_with :pundit
16+
17+
## == PaperTrail ==
18+
# config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0
19+
20+
### More at https://github.com/sferik/rails_admin/wiki/Base-configuration
21+
22+
## == Gravatar integration ==
23+
## To disable Gravatar integration in Navigation Bar set to false
24+
# config.show_gravatar = true
25+
26+
config.actions do
27+
dashboard # mandatory
28+
index # mandatory
29+
new
30+
export
31+
bulk_delete
32+
show
33+
edit
34+
delete
35+
show_in_app
36+
37+
## With an audit adapter, you can add:
38+
# history_index
39+
# history_show
40+
end
41+
end

Diff for: config/routes.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Rails.application.routes.draw do
2+
mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
23
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
34
end

0 commit comments

Comments
 (0)