Apply IndentationConsistency rubocop rule

This commit is contained in:
Javi Martín
2019-06-18 02:34:40 +02:00
parent e252d82cdb
commit 47b2c42a1d
36 changed files with 425 additions and 425 deletions

View File

@@ -13,27 +13,27 @@ class CommunitiesController < ApplicationController
private
def set_order
@order = valid_order? ? params[:order] : "newest"
end
def set_order
@order = valid_order? ? params[:order] : "newest"
end
def set_community
@community = Community.find(params[:id])
end
def set_community
@community = Community.find(params[:id])
end
def load_topics
@topics = @community.topics.send("sort_by_#{@order}").page(params[:page])
end
def load_topics
@topics = @community.topics.send("sort_by_#{@order}").page(params[:page])
end
def load_participants
@participants = @community.participants
end
def load_participants
@participants = @community.participants
end
def valid_order?
params[:order].present? && TOPIC_ORDERS.include?(params[:order])
end
def valid_order?
params[:order].present? && TOPIC_ORDERS.include?(params[:order])
end
def communitable_exists?
@community.proposal.present? || @community.investment.present?
end
def communitable_exists?
@community.proposal.present? || @community.investment.present?
end
end