Rubocop autocorrections
This commit is contained in:
@@ -26,8 +26,8 @@ class UsersController < ApplicationController
|
||||
when "proposals" then load_proposals
|
||||
when "debates" then load_debates
|
||||
when "budget_investments" then load_budget_investments
|
||||
when "comments" then load_comments
|
||||
when "follows" then load_follows
|
||||
when "comments" then load_comments
|
||||
when "follows" then load_follows
|
||||
else load_available_activity
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ module FollowablesHelper
|
||||
end
|
||||
|
||||
def followable_class_name(followable)
|
||||
followable.class.to_s.parameterize.gsub('-', '_')
|
||||
followable.class.to_s.parameterize('_')
|
||||
end
|
||||
|
||||
def find_or_build_follow(user, followable)
|
||||
|
||||
@@ -7,7 +7,7 @@ module Followable
|
||||
end
|
||||
|
||||
def followed_by?(user)
|
||||
followers.include?(user)
|
||||
followers.include?(user)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -5,5 +5,4 @@ class Follow < ActiveRecord::Base
|
||||
validates :user_id, presence: true
|
||||
validates :followable_id, presence: true
|
||||
validates :followable_type, presence: true
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user