mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
commit
be38648b87
6
Gemfile
6
Gemfile
@ -57,13 +57,11 @@ gem 'redcarpet' #markdown formatting
|
||||
# Analytics
|
||||
gem 'mixpanel-ruby'
|
||||
gem 'barnes'
|
||||
|
||||
# Sharing
|
||||
gem 'social-share-button'
|
||||
gem 'skylight'
|
||||
|
||||
# Apps
|
||||
#gem 'easy_translate'
|
||||
gem 'levenshtein-ffi'
|
||||
#gem 'levenshtein-ffi'
|
||||
|
||||
# Forum
|
||||
gem 'thredded'
|
||||
|
||||
11
Gemfile.lock
11
Gemfile.lock
@ -236,8 +236,6 @@ GEM
|
||||
kaminari-core (= 1.1.1)
|
||||
kaminari-core (1.1.1)
|
||||
kramdown (1.17.0)
|
||||
levenshtein-ffi (1.1.0)
|
||||
ffi (~> 1.9)
|
||||
libv8 (6.7.288.46.1)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
@ -460,9 +458,11 @@ GEM
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
skylight (3.1.2)
|
||||
skylight-core (= 3.1.2)
|
||||
skylight-core (3.1.2)
|
||||
activesupport (>= 4.2.0)
|
||||
slack-notifier (2.3.2)
|
||||
social-share-button (1.1.0)
|
||||
coffee-rails
|
||||
sprockets (3.7.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
@ -562,7 +562,6 @@ DEPENDENCIES
|
||||
guard
|
||||
guard-minitest
|
||||
guard-rubocop
|
||||
levenshtein-ffi
|
||||
material_icons
|
||||
medium-editor-rails
|
||||
memory_profiler
|
||||
@ -596,8 +595,8 @@ DEPENDENCIES
|
||||
serendipitous!
|
||||
shoulda-matchers (~> 3.1)
|
||||
simplecov
|
||||
skylight
|
||||
slack-notifier
|
||||
social-share-button
|
||||
sqlite3
|
||||
stackprof
|
||||
stripe
|
||||
|
||||
@ -40,7 +40,8 @@ class ContentController < ApplicationController
|
||||
def show
|
||||
content_type = content_type_from_controller(self.class)
|
||||
return redirect_to root_path unless valid_content_types.map(&:name).include?(content_type.name)
|
||||
@content = content_type.find(params[:id])
|
||||
@content = content_type.find_by(id: params[:id])
|
||||
return redirect_to(root_path, notice: "You don't have permission to view that content.") if @content.nil?
|
||||
@serialized_content = ContentSerializer.new(@content)
|
||||
|
||||
return redirect_to(root_path) if @content.user.nil? # deleted user's content
|
||||
|
||||
@ -4,7 +4,9 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
@user = User.find(params[:id])
|
||||
@user = User.find_by(id: params[:id])
|
||||
return redirect_to(root_path, notice: 'That user does not exist.') if @user.nil?
|
||||
|
||||
@content = @user.public_content.select { |type, list| list.any? }
|
||||
@tabs = @content.keys
|
||||
@stream = @user.content_change_events.order('updated_at desc').limit(100).group_by do |cce|
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
SocialShareButton.configure do |config|
|
||||
config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark
|
||||
delicious tumblr pinterest email linkedin wechat vkontakte
|
||||
xing reddit hacker_news telegram odnoklassniki)
|
||||
end
|
||||
4
config/skylight.yml
Normal file
4
config/skylight.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
# The authentication token for the application.
|
||||
# I think this is actually ignored if the ENV var is set, but this is fine for reference / dummy data.
|
||||
authentication: ENV['SKYLIGHT_AUTHENTICATION']
|
||||
Loading…
Reference in New Issue
Block a user