File tree Expand file tree Collapse file tree 6 files changed +16
-17
lines changed Expand file tree Collapse file tree 6 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,11 @@ gem 'redcarpet' #markdown formatting
57
57
# Analytics
58
58
gem 'mixpanel-ruby'
59
59
gem 'barnes'
60
-
61
- # Sharing
62
- gem 'social-share-button'
60
+ gem 'skylight'
63
61
64
62
# Apps
65
63
#gem 'easy_translate'
66
- gem 'levenshtein-ffi'
64
+ # gem 'levenshtein-ffi'
67
65
68
66
# Forum
69
67
gem 'thredded'
Original file line number Diff line number Diff line change 236
236
kaminari-core (= 1.1.1 )
237
237
kaminari-core (1.1.1 )
238
238
kramdown (1.17.0 )
239
- levenshtein-ffi (1.1.0 )
240
- ffi (~> 1.9 )
241
239
libv8 (6.7.288.46.1 )
242
240
listen (3.1.5 )
243
241
rb-fsevent (~> 0.9 , >= 0.9.4 )
460
458
json (>= 1.8 , < 3 )
461
459
simplecov-html (~> 0.10.0 )
462
460
simplecov-html (0.10.2 )
461
+ skylight (3.1.2 )
462
+ skylight-core (= 3.1.2 )
463
+ skylight-core (3.1.2 )
464
+ activesupport (>= 4.2.0 )
463
465
slack-notifier (2.3.2 )
464
- social-share-button (1.1.0 )
465
- coffee-rails
466
466
sprockets (3.7.2 )
467
467
concurrent-ruby (~> 1.0 )
468
468
rack (> 1 , < 3 )
@@ -562,7 +562,6 @@ DEPENDENCIES
562
562
guard
563
563
guard-minitest
564
564
guard-rubocop
565
- levenshtein-ffi
566
565
material_icons
567
566
medium-editor-rails
568
567
memory_profiler
@@ -596,8 +595,8 @@ DEPENDENCIES
596
595
serendipitous !
597
596
shoulda-matchers (~> 3.1 )
598
597
simplecov
598
+ skylight
599
599
slack-notifier
600
- social-share-button
601
600
sqlite3
602
601
stackprof
603
602
stripe
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ def index
40
40
def show
41
41
content_type = content_type_from_controller ( self . class )
42
42
return redirect_to root_path unless valid_content_types . map ( &:name ) . include? ( content_type . name )
43
- @content = content_type . find ( params [ :id ] )
43
+ @content = content_type . find_by ( id : params [ :id ] )
44
+ return redirect_to ( root_path , notice : "You don't have permission to view that content." ) if @content . nil?
44
45
@serialized_content = ContentSerializer . new ( @content )
45
46
46
47
return redirect_to ( root_path ) if @content . user . nil? # deleted user's content
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ def index
4
4
end
5
5
6
6
def show
7
- @user = User . find ( params [ :id ] )
7
+ @user = User . find_by ( id : params [ :id ] )
8
+ return redirect_to ( root_path , notice : 'That user does not exist.' ) if @user . nil?
9
+
8
10
@content = @user . public_content . select { |type , list | list . any? }
9
11
@tabs = @content . keys
10
12
@stream = @user . content_change_events . order ( 'updated_at desc' ) . limit ( 100 ) . group_by do |cce |
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ---
2
+ # The authentication token for the application.
3
+ # I think this is actually ignored if the ENV var is set, but this is fine for reference / dummy data.
4
+ authentication : ENV['SKYLIGHT_AUTHENTICATION']
You can’t perform that action at this time.
0 commit comments