diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index 4d059cae6..62ff427ef 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -24,6 +24,6 @@ class StatsController < ApplicationController private def daily_cache(key, &block) - Rails.cache.fetch("public_stats/#{Time.current.strftime('%Y-%m-%d')}/#{key}", &block) + Rails.cache.fetch("public_stats/#{Time.current.strftime("%Y-%m-%d")}/#{key}", &block) end end diff --git a/app/helpers/documentables_helper.rb b/app/helpers/documentables_helper.rb index b277ae3eb..b17278019 100644 --- a/app/helpers/documentables_helper.rb +++ b/app/helpers/documentables_helper.rb @@ -18,7 +18,7 @@ module DocumentablesHelper def accepted_content_types_extensions(documentable_class) documentable_class.accepted_content_types - .collect{ |content_type| ".#{content_type.split('/').last}" } + .collect{ |content_type| ".#{content_type.split("/").last}" } .join(",") end diff --git a/app/helpers/imageables_helper.rb b/app/helpers/imageables_helper.rb index 04c48d6c3..768578f75 100644 --- a/app/helpers/imageables_helper.rb +++ b/app/helpers/imageables_helper.rb @@ -22,7 +22,7 @@ module ImageablesHelper def imageable_accepted_content_types_extensions Image::ACCEPTED_CONTENT_TYPE - .collect{ |content_type| ".#{content_type.split('/').last}" } + .collect{ |content_type| ".#{content_type.split("/").last}" } .join(",") end diff --git a/app/helpers/map_locations_helper.rb b/app/helpers/map_locations_helper.rb index d05f2c722..4d17efb2d 100644 --- a/app/helpers/map_locations_helper.rb +++ b/app/helpers/map_locations_helper.rb @@ -57,9 +57,9 @@ module MapLocationsHelper map_tiles_provider_attribution: Rails.application.secrets.map_tiles_provider_attribution, marker_editable: editable, marker_remove_selector: "##{map_location_remove_marker_link_id(map_location)}", - latitude_input_selector: "##{map_location_input_id(parent_class, 'latitude')}", - longitude_input_selector: "##{map_location_input_id(parent_class, 'longitude')}", - zoom_input_selector: "##{map_location_input_id(parent_class, 'zoom')}", + latitude_input_selector: "##{map_location_input_id(parent_class, "latitude")}", + longitude_input_selector: "##{map_location_input_id(parent_class, "longitude")}", + zoom_input_selector: "##{map_location_input_id(parent_class, "zoom")}", marker_investments_coordinates: investments_coordinates } options[:marker_latitude] = map_location.latitude if map_location.latitude.present? diff --git a/app/helpers/valuation_helper.rb b/app/helpers/valuation_helper.rb index 56b1dd079..9f2f27528 100644 --- a/app/helpers/valuation_helper.rb +++ b/app/helpers/valuation_helper.rb @@ -18,7 +18,7 @@ module ValuationHelper when 0 t("valuation.budget_investments.index.no_valuators_assigned") when 1 - "".html_safe + + "".html_safe + valuators.first.name + "".html_safe else diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index eded65fb8..f7928ff7e 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,5 +1,5 @@ class ApplicationMailer < ActionMailer::Base helper :settings - default from: "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>" + default from: "#{Setting["mailer_from_name"]} <#{Setting["mailer_from_address"]}>" layout "mailer" end diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index 0021755dc..f2095c746 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -218,7 +218,7 @@ class Budget end def code - "#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") + "#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") end def send_unfeasible_email diff --git a/app/models/legislation/proposal.rb b/app/models/legislation/proposal.rb index cbf25bccf..0e1a39c90 100644 --- a/app/models/legislation/proposal.rb +++ b/app/models/legislation/proposal.rb @@ -120,7 +120,7 @@ class Legislation::Proposal < ActiveRecord::Base end def code - "#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}" + "#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}" end def after_commented diff --git a/app/models/proposal.rb b/app/models/proposal.rb index cfaf197d1..dfba48df1 100644 --- a/app/models/proposal.rb +++ b/app/models/proposal.rb @@ -163,7 +163,7 @@ class Proposal < ActiveRecord::Base end def code - "#{Setting['proposal_code_prefix']}-#{created_at.strftime('%Y-%m')}-#{id}" + "#{Setting["proposal_code_prefix"]}-#{created_at.strftime("%Y-%m")}-#{id}" end def after_commented diff --git a/app/models/spending_proposal.rb b/app/models/spending_proposal.rb index 3bd753476..2b6b9fd67 100644 --- a/app/models/spending_proposal.rb +++ b/app/models/spending_proposal.rb @@ -109,7 +109,7 @@ class SpendingProposal < ActiveRecord::Base end def code - "#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") + "#{created_at.strftime("%Y")}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") end def send_unfeasible_email diff --git a/app/models/user.rb b/app/models/user.rb index e02c93d99..e62b55273 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -238,7 +238,7 @@ class User < ActiveRecord::Base Poll::Voter.where(user_id: other_user.id).update_all(user_id: id) Budget::Ballot.where(user_id: other_user.id).update_all(user_id: id) Vote.where("voter_id = ? AND voter_type = ?", other_user.id, "User").update_all(voter_id: id) - data_log = "id: #{other_user.id} - #{Time.current.strftime('%Y-%m-%d %H:%M:%S')}" + data_log = "id: #{other_user.id} - #{Time.current.strftime("%Y-%m-%d %H:%M:%S")}" update(former_users_data_log: "#{former_users_data_log} | #{data_log}") end diff --git a/app/views/admin/homepage/_setting.html.erb b/app/views/admin/homepage/_setting.html.erb index 1398f6951..dc95a5f9c 100644 --- a/app/views/admin/homepage/_setting.html.erb +++ b/app/views/admin/homepage/_setting.html.erb @@ -4,8 +4,8 @@ <%= f.hidden_field :value, value: (setting.enabled? ? "" : "active") %> - <%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? 'disable' : 'enable'}"), - class: "button #{setting.enabled? ? 'hollow alert' : 'success'}", + <%= f.submit(t("admin.settings.index.features.#{setting.enabled? ? "disable" : "enable"}"), + class: "button #{setting.enabled? ? "hollow alert" : "success"}", data: {confirm: t("admin.actions.confirm")}) %> <% end %> diff --git a/app/views/admin/legislation/draft_versions/index.html.erb b/app/views/admin/legislation/draft_versions/index.html.erb index 5ebafd837..0abbf128d 100644 --- a/app/views/admin/legislation/draft_versions/index.html.erb +++ b/app/views/admin/legislation/draft_versions/index.html.erb @@ -38,7 +38,7 @@
@@ -37,7 +37,7 @@