File tree 7 files changed +28
-21
lines changed
7 files changed +28
-21
lines changed Original file line number Diff line number Diff line change 18
18
19
19
.byebug_history
20
20
21
- /db-data /*
21
+ /db-data * /*
22
22
/public /uploads
23
+ /public /assets
23
24
24
- docker-compose.production.yml
25
- docker-compose.staging .yml
25
+ Dockerfile. *
26
+ docker-compose. * .yml
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ gem 'geocoder'
56
56
57
57
# Localization
58
58
gem 'gettext_i18n_rails'
59
- gem 'gettext_i18n_rails_js' , '~> 1.0 .0'
59
+ gem 'gettext_i18n_rails_js' , '~> 1.2 .0'
60
60
gem 'i18n_data'
61
61
# From branch master to work with Rails 5
62
62
gem 'globalize' , git : 'https://github.com/globalize/globalize'
@@ -77,7 +77,7 @@ gem 'mini_magick'
77
77
gem 'simple_form_fancy_uploads'
78
78
79
79
# random names
80
- gem 'namey'
80
+ # gem 'namey'
81
81
82
82
group :development , :test do
83
83
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
Original file line number Diff line number Diff line change 113
113
text (>= 1.3.0 )
114
114
gettext_i18n_rails (1.8.0 )
115
115
fast_gettext (>= 0.9.0 )
116
- gettext_i18n_rails_js (1.0.4 )
116
+ gettext_i18n_rails_js (1.2.0 )
117
117
gettext (>= 3.0.2 )
118
118
gettext_i18n_rails (>= 0.7.1 )
119
119
po_to_json (>= 1.0.0 )
157
157
mini_portile2 (2.2.0 )
158
158
minitest (5.10.3 )
159
159
multi_json (1.12.1 )
160
- namey (0.0.12 )
161
- sequel (~> 4.48 )
162
- sqlite3
163
160
nio4r (2.1.0 )
164
161
nokogiri (1.8.0 )
165
162
mini_portile2 (~> 2.2.0 )
236
233
selenium-webdriver (3.5.1 )
237
234
childprocess (~> 0.5 )
238
235
rubyzip (~> 1.0 )
239
- sequel (4.49.0 )
240
236
simple_form (3.5.0 )
241
237
actionpack (> 4 , < 5.2 )
242
238
activemodel (> 4 , < 5.2 )
257
253
actionpack (>= 4.0 )
258
254
activesupport (>= 4.0 )
259
255
sprockets (>= 3.0.0 )
260
- sqlite3 (1.3.13 )
261
256
text (1.3.1 )
262
257
thor (0.20.0 )
263
258
thread_safe (0.3.6 )
@@ -302,7 +297,7 @@ DEPENDENCIES
302
297
font-awesome-rails
303
298
geocoder
304
299
gettext_i18n_rails
305
- gettext_i18n_rails_js (~> 1.0 .0 )
300
+ gettext_i18n_rails_js (~> 1.2 .0 )
306
301
globalize !
307
302
high_voltage (~> 3.0.0 )
308
303
i18n_data
@@ -312,7 +307,6 @@ DEPENDENCIES
312
307
listen (>= 3.0.5 , < 3.2 )
313
308
lograge
314
309
mini_magick
315
- namey
316
310
pg (~> 0.18 )
317
311
pry-rails
318
312
puma (~> 3.7 )
Original file line number Diff line number Diff line change 1
1
class PagesController < ApplicationController
2
2
include HighVoltage ::StaticPage
3
3
4
+ before_action :home
4
5
# before_filter :authenticate
5
6
# layout :layout_for_page
6
7
@@ -14,4 +15,10 @@ def layout_for_page
14
15
'application'
15
16
end
16
17
end
18
+
19
+ def home
20
+ if params [ :id ] == 'home'
21
+ @featured_stories = Story . last ( 10 )
22
+ end
23
+ end
17
24
end
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def after_sign_up_path_for(resource)
63
63
private
64
64
65
65
def generate_name
66
- name = [ Namey :: Generator . new . name ( :common , false ) , rand ( 100 ..999 ) ] . join
66
+ name = [ ( 'a' .. 'z' ) . to_a . shuffle [ 0 , 8 ] . join , rand ( 100 ..999 ) ] . join
67
67
if Commoner . exists? ( [ "lower(name) = ?" , name . downcase ] )
68
68
generate_name
69
69
else
Original file line number Diff line number Diff line change 2
2
< div class ="row justify-content-center ">
3
3
< div class ="col ">
4
4
< div class ="logo-container ">
5
- <%= inline_svg 'logo' , id : 'logo-svg' %>
5
+ <%= inline_svg 'logo.svg ' , id : 'logo-svg' %>
6
6
</ div >
7
7
</ div >
8
8
</ div >
18
18
<% end %>
19
19
</ p >
20
20
</ div >
21
- < h2 class ="text-center "> Latest Stories</ h2 >
22
- < div class ="row ">
23
- <% Story . last ( 10 ) . each do |story | %>
24
- < div class ="col-lg-4 col-md-6 ">
25
- <%= render 'stories/card' , story : story %>
21
+ <% if @featured_stories . any? %>
22
+ < h2 class ="text-center "> Latest Stories</ h2 >
23
+ < div class ="row ">
24
+ <% @featured_stories . each do |story | %>
25
+ < div class ="col-lg-4 col-md-6 ">
26
+ <%= render 'stories/card' , story : story %>
27
+ </ div >
28
+ <% end %>
26
29
</ div >
27
30
<% end %>
28
- </ div >
Original file line number Diff line number Diff line change 28
28
# Or, use `bin/rails secrets:setup` to configure encrypted secrets
29
29
# and move the `production:` environment over there.
30
30
31
+ staging :
32
+ secret_key_base : <%= ENV["SECRET_KEY_BASE"] %>
33
+
31
34
production :
32
35
secret_key_base : <%= ENV["SECRET_KEY_BASE"] %>
You can’t perform that action at this time.
0 commit comments