Rubocop autocorrections

This commit is contained in:
Bertocq
2017-07-25 12:48:23 +02:00
parent 58331e6425
commit 7d406cae76
12 changed files with 36 additions and 31 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -7,7 +7,7 @@ module Followable
end
def followed_by?(user)
followers.include?(user)
followers.include?(user)
end
end

View File

@@ -5,5 +5,4 @@ class Follow < ActiveRecord::Base
validates :user_id, presence: true
validates :followable_id, presence: true
validates :followable_type, presence: true
end