Merge pull request #3795 from consul/rubocop_empty_lines
Add and apply rubocop rules for empty lines
This commit is contained in:
@@ -31,6 +31,33 @@ Capybara/FeatureMethods:
|
|||||||
FactoryBot/AttributeDefinedStatically:
|
FactoryBot/AttributeDefinedStatically:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLineAfterGuardClause:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLineBetweenDefs:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundAccessModifier:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundBlockBody:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundClassBody:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundMethodBody:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/EmptyLinesAroundModuleBody:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/ExtraSpacing:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/SpaceAroundEqualsInParameterDefault:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Layout/IndentationConsistency:
|
Layout/IndentationConsistency:
|
||||||
EnforcedStyle: indented_internal_methods
|
EnforcedStyle: indented_internal_methods
|
||||||
|
|
||||||
|
|||||||
@@ -32,5 +32,4 @@ class AccountController < ApplicationController
|
|||||||
end
|
end
|
||||||
params.require(:account).permit(*attributes)
|
params.require(:account).permit(*attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,5 +5,4 @@ class Admin::ActivityController < Admin::BaseController
|
|||||||
@activity = Activity.for_render.send(@current_filter)
|
@activity = Activity.for_render.send(@current_filter)
|
||||||
.order(created_at: :desc).page(params[:page])
|
.order(created_at: :desc).page(params[:page])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Api::StatsController < Admin::Api::BaseController
|
class Admin::Api::StatsController < Admin::Api::BaseController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
unless params[:event].present? ||
|
unless params[:event].present? ||
|
||||||
params[:visits].present? ||
|
params[:visits].present? ||
|
||||||
|
|||||||
@@ -10,5 +10,4 @@ class Admin::BaseController < ApplicationController
|
|||||||
def verify_administrator
|
def verify_administrator
|
||||||
raise CanCan::AccessDenied unless current_user&.administrator?
|
raise CanCan::AccessDenied unless current_user&.administrator?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -61,5 +61,4 @@ class Admin::BudgetGroupsController < Admin::BaseController
|
|||||||
valid_attributes = [:max_votable_headings]
|
valid_attributes = [:max_votable_headings]
|
||||||
params.require(:budget_group).permit(*valid_attributes, translation_params(Budget::Group))
|
params.require(:budget_group).permit(*valid_attributes, translation_params(Budget::Group))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -66,5 +66,4 @@ class Admin::BudgetHeadingsController < Admin::BaseController
|
|||||||
valid_attributes = [:price, :population, :allow_custom_content, :latitude, :longitude]
|
valid_attributes = [:price, :population, :allow_custom_content, :latitude, :longitude]
|
||||||
params.require(:budget_heading).permit(*valid_attributes, translation_params(Budget::Heading))
|
params.require(:budget_heading).permit(*valid_attributes, translation_params(Budget::Heading))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,5 +25,4 @@ class Admin::BudgetPhasesController < Admin::BaseController
|
|||||||
valid_attributes = [:starts_at, :ends_at, :enabled]
|
valid_attributes = [:starts_at, :ends_at, :enabled]
|
||||||
params.require(:budget_phase).permit(*valid_attributes, translation_params(Budget::Phase))
|
params.require(:budget_phase).permit(*valid_attributes, translation_params(Budget::Phase))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class Admin::BudgetsController < Admin::BaseController
|
|||||||
|
|
||||||
def calculate_winners
|
def calculate_winners
|
||||||
return unless @budget.balloting_process?
|
return unless @budget.balloting_process?
|
||||||
|
|
||||||
@budget.headings.each { |heading| Budget::Result.new(@budget, heading).delay.calculate_winners }
|
@budget.headings.each { |heading| Budget::Result.new(@budget, heading).delay.calculate_winners }
|
||||||
redirect_to admin_budget_budget_investments_path(
|
redirect_to admin_budget_budget_investments_path(
|
||||||
budget_id: @budget.id,
|
budget_id: @budget.id,
|
||||||
@@ -109,5 +110,4 @@ class Admin::BudgetsController < Admin::BaseController
|
|||||||
def load_valuators
|
def load_valuators
|
||||||
@valuators = Valuator.includes(:user).all.order(description: :asc).order("users.email ASC")
|
@valuators = Valuator.includes(:user).all.order(description: :asc).order("users.email ASC")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::CommentsController < Admin::BaseController
|
class Admin::CommentsController < Admin::BaseController
|
||||||
|
|
||||||
include DownloadSettingsHelper
|
include DownloadSettingsHelper
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@@ -16,5 +15,4 @@ class Admin::CommentsController < Admin::BaseController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
class Admin::DashboardController < Admin::BaseController
|
class Admin::DashboardController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,5 +16,4 @@ class Admin::DebatesController < Admin::BaseController
|
|||||||
def resource_model
|
def resource_model
|
||||||
Debate
|
Debate
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::GeozonesController < Admin::BaseController
|
class Admin::GeozonesController < Admin::BaseController
|
||||||
|
|
||||||
respond_to :html
|
respond_to :html
|
||||||
|
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
|
|||||||
@@ -30,5 +30,4 @@ class Admin::HiddenBudgetInvestmentsController < Admin::BaseController
|
|||||||
def load_investment
|
def load_investment
|
||||||
@investment = Budget::Investment.with_hidden.find(params[:id])
|
@investment = Budget::Investment.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,5 +25,4 @@ class Admin::HiddenCommentsController < Admin::BaseController
|
|||||||
def load_comment
|
def load_comment
|
||||||
@comment = Comment.not_valuations.with_hidden.find(params[:id])
|
@comment = Comment.not_valuations.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -28,5 +28,4 @@ class Admin::HiddenDebatesController < Admin::BaseController
|
|||||||
def load_debate
|
def load_debate
|
||||||
@debate = Debate.with_hidden.find(params[:id])
|
@debate = Debate.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,5 +29,4 @@ class Admin::HiddenProposalsController < Admin::BaseController
|
|||||||
def load_proposal
|
def load_proposal
|
||||||
@proposal = Proposal.with_hidden.find(params[:id])
|
@proposal = Proposal.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,5 +29,4 @@ class Admin::HiddenUsersController < Admin::BaseController
|
|||||||
def load_user
|
def load_user
|
||||||
@user = User.with_hidden.find(params[:id])
|
@user = User.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::HomepageController < Admin::BaseController
|
class Admin::HomepageController < Admin::BaseController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
load_header
|
load_header
|
||||||
load_feeds
|
load_feeds
|
||||||
@@ -24,5 +23,4 @@ class Admin::HomepageController < Admin::BaseController
|
|||||||
def load_feeds
|
def load_feeds
|
||||||
@feeds = Widget::Feed.order("created_at")
|
@feeds = Widget::Feed.order("created_at")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,5 +10,4 @@ class Admin::Legislation::BaseController < Admin::BaseController
|
|||||||
def namespace
|
def namespace
|
||||||
"admin"
|
"admin"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Legislation::ProposalsController < Admin::Legislation::BaseController
|
class Admin::Legislation::ProposalsController < Admin::Legislation::BaseController
|
||||||
|
|
||||||
has_orders %w[id title supports], only: :index
|
has_orders %w[id title supports], only: :index
|
||||||
|
|
||||||
load_and_authorize_resource :process, class: "Legislation::Process"
|
load_and_authorize_resource :process, class: "Legislation::Process"
|
||||||
|
|||||||
@@ -6,5 +6,4 @@ class Admin::LocalCensusRecords::BaseController < Admin::BaseController
|
|||||||
def namespace
|
def namespace
|
||||||
"admin"
|
"admin"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::MilestoneStatusesController < Admin::BaseController
|
class Admin::MilestoneStatusesController < Admin::BaseController
|
||||||
|
|
||||||
before_action :load_status, only: [:edit, :update, :destroy]
|
before_action :load_status, only: [:edit, :update, :destroy]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::NewslettersController < Admin::BaseController
|
class Admin::NewslettersController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@newsletters = Newsletter.all
|
@newsletters = Newsletter.all
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::OfficialsController < Admin::BaseController
|
class Admin::OfficialsController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@officials = User.officials.page(params[:page]).for_render
|
@officials = User.officials.page(params[:page]).for_render
|
||||||
end
|
end
|
||||||
@@ -29,5 +28,4 @@ class Admin::OfficialsController < Admin::BaseController
|
|||||||
def user_params
|
def user_params
|
||||||
params.require(:user).permit(:official_position, :official_level)
|
params.require(:user).permit(:official_position, :official_level)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,5 +26,4 @@ class Admin::OrganizationsController < Admin::BaseController
|
|||||||
@organization.reject
|
@organization.reject
|
||||||
redirect_to request.query_parameters.merge(action: :index)
|
redirect_to request.query_parameters.merge(action: :index)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,5 +31,4 @@ class Admin::Poll::ActivePollsController < Admin::Poll::BaseController
|
|||||||
def active_poll_params
|
def active_poll_params
|
||||||
params.require(:active_poll).permit(translation_params(ActivePoll))
|
params.require(:active_poll).permit(translation_params(ActivePoll))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,5 +6,4 @@ class Admin::Poll::BaseController < Admin::BaseController
|
|||||||
def namespace
|
def namespace
|
||||||
"admin"
|
"admin"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
|
class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_poll, except: [:create, :destroy]
|
before_action :load_poll, except: [:create, :destroy]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@@ -74,5 +73,4 @@ class Admin::Poll::BoothAssignmentsController < Admin::Poll::BaseController
|
|||||||
def load_search
|
def load_search
|
||||||
@search = search_params[:search]
|
@search = search_params[:search]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -41,5 +41,4 @@ class Admin::Poll::BoothsController < Admin::Poll::BaseController
|
|||||||
def booth_params
|
def booth_params
|
||||||
params.require(:poll_booth).permit(:name, :location)
|
params.require(:poll_booth).permit(:name, :location)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Poll::OfficerAssignmentsController < Admin::Poll::BaseController
|
class Admin::Poll::OfficerAssignmentsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_poll
|
before_action :load_poll
|
||||||
before_action :redirect_if_blank_required_params, only: [:by_officer]
|
before_action :redirect_if_blank_required_params, only: [:by_officer]
|
||||||
before_action :load_booth_assignment, only: [:create]
|
before_action :load_booth_assignment, only: [:create]
|
||||||
@@ -66,5 +65,4 @@ class Admin::Poll::OfficerAssignmentsController < Admin::Poll::BaseController
|
|||||||
def load_search
|
def load_search
|
||||||
@search = search_params[:search]
|
@search = search_params[:search]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -29,5 +29,4 @@ class Admin::Poll::OfficersController < Admin::Poll::BaseController
|
|||||||
@officer.destroy!
|
@officer.destroy!
|
||||||
redirect_to admin_officers_path
|
redirect_to admin_officers_path
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Poll::ShiftsController < Admin::Poll::BaseController
|
class Admin::Poll::ShiftsController < Admin::Poll::BaseController
|
||||||
|
|
||||||
before_action :load_booth
|
before_action :load_booth
|
||||||
before_action :load_officer
|
before_action :load_officer
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::ProposalNotificationsController < Admin::BaseController
|
class Admin::ProposalNotificationsController < Admin::BaseController
|
||||||
|
|
||||||
has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index
|
has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index
|
||||||
|
|
||||||
before_action :load_proposal, only: [:confirm_hide, :restore]
|
before_action :load_proposal, only: [:confirm_hide, :restore]
|
||||||
@@ -28,5 +27,4 @@ class Admin::ProposalNotificationsController < Admin::BaseController
|
|||||||
def load_proposal
|
def load_proposal
|
||||||
@proposal_notification = ProposalNotification.with_hidden.find(params[:id])
|
@proposal_notification = ProposalNotification.with_hidden.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -38,5 +38,4 @@ class Admin::ProposalsController < Admin::BaseController
|
|||||||
def proposal_params
|
def proposal_params
|
||||||
params.require(:proposal).permit(:selected)
|
params.require(:proposal).permit(:selected)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class Admin::SettingsController < Admin::BaseController
|
|||||||
|
|
||||||
def request_referer
|
def request_referer
|
||||||
return request.referer + params[:setting][:tab] if params[:setting][:tab]
|
return request.referer + params[:setting][:tab] if params[:setting][:tab]
|
||||||
|
|
||||||
request.referer
|
request.referer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::SignatureSheetsController < Admin::BaseController
|
class Admin::SignatureSheetsController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@signature_sheets = SignatureSheet.all.order(created_at: :desc)
|
@signature_sheets = SignatureSheet.all.order(created_at: :desc)
|
||||||
end
|
end
|
||||||
@@ -29,5 +28,4 @@ class Admin::SignatureSheetsController < Admin::BaseController
|
|||||||
def signature_sheet_params
|
def signature_sheet_params
|
||||||
params.require(:signature_sheet).permit(:signable_type, :signable_id, :required_fields_to_verify)
|
params.require(:signature_sheet).permit(:signable_type, :signable_id, :required_fields_to_verify)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,5 +6,4 @@ class Admin::SiteCustomization::BaseController < Admin::BaseController
|
|||||||
def namespace
|
def namespace
|
||||||
"admin"
|
"admin"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,5 +5,4 @@ class Admin::SiteCustomization::CardsController < Admin::SiteCustomization::Base
|
|||||||
@page = ::SiteCustomization::Page.find(params[:page_id])
|
@page = ::SiteCustomization::Page.find(params[:page_id])
|
||||||
@cards = @page.cards
|
@cards = @page.cards
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::SiteCustomization::DocumentsController < Admin::SiteCustomization::BaseController
|
class Admin::SiteCustomization::DocumentsController < Admin::SiteCustomization::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@documents = Document.admin.page(params[:page])
|
@documents = Document.admin.page(params[:page])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to admin_site_customization_information_texts_path,
|
redirect_to admin_site_customization_information_texts_path,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::StatsController < Admin::BaseController
|
class Admin::StatsController < Admin::BaseController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@event_types = Ahoy::Event.pluck(:name).uniq.sort
|
@event_types = Ahoy::Event.pluck(:name).uniq.sort
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::SystemEmailsController < Admin::BaseController
|
class Admin::SystemEmailsController < Admin::BaseController
|
||||||
|
|
||||||
before_action :load_system_email, only: [:view, :preview_pending, :moderate_pending]
|
before_action :load_system_email, only: [:view, :preview_pending, :moderate_pending]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|||||||
@@ -27,5 +27,4 @@ class Admin::TagsController < Admin::BaseController
|
|||||||
def find_tag
|
def find_tag
|
||||||
@tag = Tag.category.find(params[:id])
|
@tag = Tag.category.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class Admin::TrackersController < Admin::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_tracker
|
def set_tracker
|
||||||
@tracker = Tracker.find(params[:id])
|
@tracker = Tracker.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::ValuatorGroupsController < Admin::BaseController
|
class Admin::ValuatorGroupsController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@groups = ValuatorGroup.all.page(params[:page])
|
@groups = ValuatorGroup.all.page(params[:page])
|
||||||
end
|
end
|
||||||
@@ -48,5 +47,4 @@ class Admin::ValuatorGroupsController < Admin::BaseController
|
|||||||
def group_params
|
def group_params
|
||||||
params.require(:valuator_group).permit(:name)
|
params.require(:valuator_group).permit(:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -50,5 +50,4 @@ class Admin::ValuatorsController < Admin::BaseController
|
|||||||
params.require(:valuator).permit(:user_id, :description, :valuator_group_id,
|
params.require(:valuator).permit(:user_id, :description, :valuator_group_id,
|
||||||
:can_comment, :can_edit_dossier)
|
:can_comment, :can_edit_dossier)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::VerificationsController < Admin::BaseController
|
class Admin::VerificationsController < Admin::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@users = User.incomplete_verification.page(params[:page])
|
@users = User.incomplete_verification.page(params[:page])
|
||||||
end
|
end
|
||||||
@@ -10,5 +9,4 @@ class Admin::VerificationsController < Admin::BaseController
|
|||||||
.for_render
|
.for_render
|
||||||
render :index
|
render :index
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,5 +6,4 @@ class Admin::Widget::BaseController < Admin::BaseController
|
|||||||
def namespace
|
def namespace
|
||||||
"admin"
|
"admin"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Admin::Widget::FeedsController < Admin::BaseController
|
class Admin::Widget::FeedsController < Admin::BaseController
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@feed = ::Widget::Feed.find(params[:id])
|
@feed = ::Widget::Feed.find(params[:id])
|
||||||
@feed.update!(feed_params)
|
@feed.update!(feed_params)
|
||||||
@@ -12,5 +11,4 @@ class Admin::Widget::FeedsController < Admin::BaseController
|
|||||||
def feed_params
|
def feed_params
|
||||||
params.require(:widget_feed).permit(:limit)
|
params.require(:widget_feed).permit(:limit)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ module Budgets
|
|||||||
end
|
end
|
||||||
@map_location = MapLocation.load_from_heading(@heading)
|
@map_location = MapLocation.load_from_heading(@heading)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,6 +26,5 @@ module Budgets
|
|||||||
def store_referer
|
def store_referer
|
||||||
session[:ballot_referer] = request.referer
|
session[:ballot_referer] = request.referer
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ module Budgets
|
|||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def investments_by_heading
|
def investments_by_heading
|
||||||
base = @budget.investments.winners
|
base = @budget.investments.winners
|
||||||
base = base.joins(milestones: :translations).includes(:milestones)
|
base = base.joins(milestones: :translations).includes(:milestones)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
module Budgets
|
module Budgets
|
||||||
class InvestmentsController < ApplicationController
|
class InvestmentsController < ApplicationController
|
||||||
|
|
||||||
include FeatureFlags
|
include FeatureFlags
|
||||||
include CommentableActions
|
include CommentableActions
|
||||||
include FlagActions
|
include FlagActions
|
||||||
@@ -187,7 +186,5 @@ module Budgets
|
|||||||
def load_map
|
def load_map
|
||||||
@map_location = MapLocation.load_from_heading(@heading)
|
@map_location = MapLocation.load_from_heading(@heading)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,6 +34,5 @@ module Budgets
|
|||||||
@heading = headings.find_by_slug_or_id(params[:heading_id]) || headings.first
|
@heading = headings.find_by_slug_or_id(params[:heading_id]) || headings.first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
module Budgets
|
module Budgets
|
||||||
class StatsController < ApplicationController
|
class StatsController < ApplicationController
|
||||||
|
|
||||||
before_action :load_budget
|
before_action :load_budget
|
||||||
load_and_authorize_resource :budget
|
load_and_authorize_resource :budget
|
||||||
|
|
||||||
@@ -15,6 +14,5 @@ module Budgets
|
|||||||
def load_budget
|
def load_budget
|
||||||
@budget = Budget.find_by_slug_or_id! params[:budget_id]
|
@budget = Budget.find_by_slug_or_id! params[:budget_id]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,5 +25,4 @@ class BudgetsController < ApplicationController
|
|||||||
def load_budget
|
def load_budget
|
||||||
@budget = Budget.find_by_slug_or_id! params[:id]
|
@budget = Budget.find_by_slug_or_id! params[:id]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class CommunitiesController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
raise ActionController::RoutingError, "Not Found" unless communitable_exists?
|
raise ActionController::RoutingError, "Not Found" unless communitable_exists?
|
||||||
|
|
||||||
redirect_to root_path if Setting["feature.community"].blank?
|
redirect_to root_path if Setting["feature.community"].blank?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ module Dashboard::ExpectsDateRange
|
|||||||
|
|
||||||
def start_date(fallback_date = proposal.created_at.to_date)
|
def start_date(fallback_date = proposal.created_at.to_date)
|
||||||
return Date.parse(params[:start_date]) unless params[:start_date].blank?
|
return Date.parse(params[:start_date]) unless params[:start_date].blank?
|
||||||
|
|
||||||
fallback_date
|
fallback_date
|
||||||
end
|
end
|
||||||
|
|
||||||
def end_date
|
def end_date
|
||||||
return Date.parse(params[:end_date]) unless params[:end_date].blank?
|
return Date.parse(params[:end_date]) unless params[:end_date].blank?
|
||||||
|
|
||||||
Date.current
|
Date.current
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ module Dashboard::GroupSupports
|
|||||||
def interval
|
def interval
|
||||||
return 1.week if params[:group_by] == "week"
|
return 1.week if params[:group_by] == "week"
|
||||||
return 1.month if params[:group_by] == "month"
|
return 1.month if params[:group_by] == "month"
|
||||||
|
|
||||||
1.day
|
1.day
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,5 +30,4 @@ module FlagActions
|
|||||||
instance_variable_get("@#{resource_model.to_s.downcase}")
|
instance_variable_get("@#{resource_model.to_s.downcase}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,5 +4,4 @@ module ImageAttributes
|
|||||||
def image_attributes
|
def image_attributes
|
||||||
[:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
[:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,10 +20,8 @@ module ModerateActions
|
|||||||
|
|
||||||
if params[:hide_resources].present?
|
if params[:hide_resources].present?
|
||||||
@resources.accessible_by(current_ability, :hide).each { |resource| hide_resource resource }
|
@resources.accessible_by(current_ability, :hide).each { |resource| hide_resource resource }
|
||||||
|
|
||||||
elsif params[:ignore_flags].present?
|
elsif params[:ignore_flags].present?
|
||||||
@resources.accessible_by(current_ability, :ignore_flag).each(&:ignore_flag)
|
@resources.accessible_by(current_ability, :ignore_flag).each(&:ignore_flag)
|
||||||
|
|
||||||
elsif params[:block_authors].present?
|
elsif params[:block_authors].present?
|
||||||
author_ids = @resources.pluck(author_id)
|
author_ids = @resources.pluck(author_id)
|
||||||
User.where(id: author_ids).accessible_by(current_ability, :block).each { |user| block_user user }
|
User.where(id: author_ids).accessible_by(current_ability, :block).each { |user| block_user user }
|
||||||
@@ -56,5 +54,4 @@ module ModerateActions
|
|||||||
def author_id
|
def author_id
|
||||||
:author_id
|
:author_id
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
module Polymorphic
|
module Polymorphic
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def resource
|
def resource
|
||||||
@@ -31,5 +30,4 @@ module Polymorphic
|
|||||||
def strong_params
|
def strong_params
|
||||||
send("#{resource_name}_params")
|
send("#{resource_name}_params")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
module RemotelyTranslatable
|
module RemotelyTranslatable
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def detect_remote_translations(*args)
|
def detect_remote_translations(*args)
|
||||||
@@ -25,5 +24,4 @@ module RemotelyTranslatable
|
|||||||
|
|
||||||
args.compact - [feeds] + feeds.map(&:items)
|
args.compact - [feeds] + feeds.map(&:items)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ module Search
|
|||||||
|
|
||||||
def parse_search_date
|
def parse_search_date
|
||||||
return unless search_by_date?
|
return unless search_by_date?
|
||||||
|
|
||||||
params[:advanced_search][:date_range] = search_date_range
|
params[:advanced_search][:date_range] = search_date_range
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -53,5 +54,4 @@ module Search
|
|||||||
params[:order] = "relevance"
|
params[:order] = "relevance"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -73,5 +73,4 @@ class DebatesController < ApplicationController
|
|||||||
@recommended_debates = Debate.recommendations(current_user).sort_by_random.limit(3)
|
@recommended_debates = Debate.recommendations(current_user).sort_by_random.limit(3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -44,5 +44,4 @@ class DirectUploadsController < ApplicationController
|
|||||||
.permit(:resource, :resource_type, :resource_id, :resource_relation,
|
.permit(:resource, :resource_type, :resource_id, :resource_relation,
|
||||||
:attachment, :cached_attachment, attachment_attributes: [])
|
:attachment, :cached_attachment, attachment_attributes: [])
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,5 +22,4 @@ class DocumentsController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,5 +24,4 @@ class FollowsController < ApplicationController
|
|||||||
def followable_translation_key(followable)
|
def followable_translation_key(followable)
|
||||||
followable.class.name.parameterize(separator: "_")
|
followable.class.name.parameterize(separator: "_")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ class GraphqlController < ApplicationController
|
|||||||
def query
|
def query
|
||||||
begin
|
begin
|
||||||
if query_string.nil? then raise GraphqlController::QueryStringError end
|
if query_string.nil? then raise GraphqlController::QueryStringError end
|
||||||
|
|
||||||
response = consul_schema.execute query_string, variables: query_variables
|
response = consul_schema.execute query_string, variables: query_variables
|
||||||
render json: response, status: :ok
|
render json: response, status: :ok
|
||||||
rescue GraphqlController::QueryStringError
|
rescue GraphqlController::QueryStringError
|
||||||
|
|||||||
@@ -22,5 +22,4 @@ class ImagesController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class InstallationController < ApplicationController
|
class InstallationController < ApplicationController
|
||||||
|
|
||||||
skip_authorization_check
|
skip_authorization_check
|
||||||
|
|
||||||
def details
|
def details
|
||||||
@@ -19,5 +18,4 @@ class InstallationController < ApplicationController
|
|||||||
def settings_feature_flags
|
def settings_feature_flags
|
||||||
Setting.where("key LIKE 'feature.%'").each_with_object({}) { |x, n| n[x.key.remove("feature.")] = x.value }
|
Setting.where("key LIKE 'feature.%'").each_with_object({}) { |x, n| n[x.key.remove("feature.")] = x.value }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -108,5 +108,4 @@ class Legislation::AnnotationsController < Legislation::BaseController
|
|||||||
end
|
end
|
||||||
rescue JSON::ParserError
|
rescue JSON::ParserError
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -36,5 +36,4 @@ class Legislation::DraftVersionsController < Legislation::BaseController
|
|||||||
@process.draft_versions.published
|
@process.draft_versions.published
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ class Legislation::ProcessesController < Legislation::BaseController
|
|||||||
|
|
||||||
def set_process
|
def set_process
|
||||||
return if member_method?
|
return if member_method?
|
||||||
|
|
||||||
@process = ::Legislation::Process.find(params[:process_id])
|
@process = ::Legislation::Process.find(params[:process_id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -70,5 +70,4 @@ class Legislation::ProposalsController < Legislation::BaseController
|
|||||||
def load_successful_proposals
|
def load_successful_proposals
|
||||||
@proposal_successful_exists = Legislation::Proposal.successful.exists?
|
@proposal_successful_exists = Legislation::Proposal.successful.exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Management::AccountController < Management::BaseController
|
class Management::AccountController < Management::BaseController
|
||||||
|
|
||||||
before_action :only_verified_users
|
before_action :only_verified_users
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@@ -30,5 +29,4 @@ class Management::AccountController < Management::BaseController
|
|||||||
def only_verified_users
|
def only_verified_users
|
||||||
check_verified_user t("management.account.alert.unverified_user")
|
check_verified_user t("management.account.alert.unverified_user")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -61,5 +61,4 @@ class Management::BaseController < ActionController::Base
|
|||||||
@manager_logged_in = User.find_by_manager_login(session[:manager]["login"])
|
@manager_logged_in = User.find_by_manager_login(session[:manager]["login"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -69,5 +69,4 @@ class Management::Budgets::InvestmentsController < Management::BaseController
|
|||||||
def load_categories
|
def load_categories
|
||||||
@categories = Tag.category.order(:name)
|
@categories = Tag.category.order(:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,5 +31,4 @@ class Management::BudgetsController < Management::BaseController
|
|||||||
def current_manager_administrator?
|
def current_manager_administrator?
|
||||||
session[:manager]["login"].match("admin")
|
session[:manager]["login"].match("admin")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
class Management::DashboardController < Management::BaseController
|
class Management::DashboardController < Management::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Management::DocumentVerificationsController < Management::BaseController
|
class Management::DocumentVerificationsController < Management::BaseController
|
||||||
|
|
||||||
before_action :clean_document_number, only: :check
|
before_action :clean_document_number, only: :check
|
||||||
before_action :set_document, only: :check
|
before_action :set_document, only: :check
|
||||||
|
|
||||||
@@ -46,7 +45,7 @@ class Management::DocumentVerificationsController < Management::BaseController
|
|||||||
|
|
||||||
def clean_document_number
|
def clean_document_number
|
||||||
return if params[:document_verification][:document_number].blank?
|
return if params[:document_verification][:document_number].blank?
|
||||||
|
|
||||||
params[:document_verification][:document_number] = params[:document_verification][:document_number].gsub(/[^a-z0-9]+/i, "").upcase
|
params[:document_verification][:document_number] = params[:document_verification][:document_number].gsub(/[^a-z0-9]+/i, "").upcase
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Management::EmailVerificationsController < Management::BaseController
|
class Management::EmailVerificationsController < Management::BaseController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@email_verification = Verification::Management::Email.new(email_verification_params)
|
@email_verification = Verification::Management::Email.new(email_verification_params)
|
||||||
end
|
end
|
||||||
@@ -19,5 +18,4 @@ class Management::EmailVerificationsController < Management::BaseController
|
|||||||
def email_verification_params
|
def email_verification_params
|
||||||
params.require(:email_verification).permit(:document_type, :document_number, :email)
|
params.require(:email_verification).permit(:document_type, :document_number, :email)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -74,5 +74,4 @@ class Management::ProposalsController < Management::BaseController
|
|||||||
def set_comment_flags(comments)
|
def set_comment_flags(comments)
|
||||||
@comment_flags = managed_user ? managed_user.comment_flags(comments) : {}
|
@comment_flags = managed_user ? managed_user.comment_flags(comments) : {}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -43,5 +43,4 @@ class Management::SessionsController < ActionController::Base
|
|||||||
manager = ManagerAuthenticator.new(params).auth
|
manager = ManagerAuthenticator.new(params).auth
|
||||||
session[:manager] = manager if manager.present?
|
session[:manager] = manager if manager.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Management::UserInvitesController < Management::BaseController
|
class Management::UserInvitesController < Management::BaseController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -9,5 +8,4 @@ class Management::UserInvitesController < Management::BaseController
|
|||||||
Mailer.user_invite(email).deliver_later
|
Mailer.user_invite(email).deliver_later
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Management::UsersController < Management::BaseController
|
class Management::UsersController < Management::BaseController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@user = User.new(user_params)
|
@user = User.new(user_params)
|
||||||
end
|
end
|
||||||
@@ -66,5 +65,4 @@ class Management::UsersController < Management::BaseController
|
|||||||
def user_with_email
|
def user_with_email
|
||||||
@user.skip_password_validation = true
|
@user.skip_password_validation = true
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,5 +11,4 @@ class Moderation::BaseController < ApplicationController
|
|||||||
def verify_moderator
|
def verify_moderator
|
||||||
raise CanCan::AccessDenied unless current_user&.moderator? || current_user&.administrator?
|
raise CanCan::AccessDenied unless current_user&.moderator? || current_user&.administrator?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -20,5 +20,4 @@ class Moderation::Budgets::InvestmentsController < Moderation::BaseController
|
|||||||
def resource_model
|
def resource_model
|
||||||
Budget::Investment
|
Budget::Investment
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
class Moderation::DashboardController < Moderation::BaseController
|
class Moderation::DashboardController < Moderation::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,5 +16,4 @@ class Moderation::DebatesController < Moderation::BaseController
|
|||||||
def resource_model
|
def resource_model
|
||||||
Debate
|
Debate
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Moderation::UsersController < Moderation::BaseController
|
class Moderation::UsersController < Moderation::BaseController
|
||||||
|
|
||||||
before_action :load_users, only: :index
|
before_action :load_users, only: :index
|
||||||
|
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
@@ -29,5 +28,4 @@ class Moderation::UsersController < Moderation::BaseController
|
|||||||
@user.block
|
@user.block
|
||||||
Activity.log(current_user, :block, @user)
|
Activity.log(current_user, :block, @user)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -42,5 +42,4 @@ class NotificationsController < ApplicationController
|
|||||||
polymorphic_hierarchy_path(notification.linkable_resource)
|
polymorphic_hierarchy_path(notification.linkable_resource)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Officing::BallotSheetsController < Officing::BaseController
|
class Officing::BallotSheetsController < Officing::BaseController
|
||||||
|
|
||||||
before_action :verify_booth
|
before_action :verify_booth
|
||||||
before_action :load_poll
|
before_action :load_poll
|
||||||
before_action :load_officer_assignments, only: [:new, :create]
|
before_action :load_officer_assignments, only: [:new, :create]
|
||||||
@@ -66,5 +65,4 @@ class Officing::BallotSheetsController < Officing::BaseController
|
|||||||
def ballot_sheet_params
|
def ballot_sheet_params
|
||||||
params.permit(:data, :poll_id, :officer_assignment_id)
|
params.permit(:data, :poll_id, :officer_assignment_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class Officing::BaseController < ApplicationController
|
|||||||
|
|
||||||
def verify_booth
|
def verify_booth
|
||||||
return unless current_booth.blank?
|
return unless current_booth.blank?
|
||||||
|
|
||||||
booths = current_user.poll_officer.todays_booths
|
booths = current_user.poll_officer.todays_booths
|
||||||
case booths.count
|
case booths.count
|
||||||
when 0
|
when 0
|
||||||
|
|||||||
@@ -20,5 +20,4 @@ class Officing::BoothController < Officing::BaseController
|
|||||||
def set_booth(booth)
|
def set_booth(booth)
|
||||||
session[:booth_id] = booth.id
|
session[:booth_id] = booth.id
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
class Officing::DashboardController < Officing::BaseController
|
class Officing::DashboardController < Officing::BaseController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,5 +15,4 @@ class Officing::PollsController < Officing::BaseController
|
|||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
class Officing::ResidenceController < Officing::BaseController
|
class Officing::ResidenceController < Officing::BaseController
|
||||||
|
|
||||||
before_action :load_officer_assignment
|
before_action :load_officer_assignment
|
||||||
before_action :verify_officer_assignment
|
before_action :verify_officer_assignment
|
||||||
before_action :verify_booth
|
before_action :verify_booth
|
||||||
@@ -23,5 +22,4 @@ class Officing::ResidenceController < Officing::BaseController
|
|||||||
params.require(:residence).permit(:document_number, :document_type, :year_of_birth,
|
params.require(:residence).permit(:document_number, :document_type, :year_of_birth,
|
||||||
:date_of_birth, :postal_code)
|
:date_of_birth, :postal_code)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user