diff --git a/.erb-lint.yml b/.erb-lint.yml
index 895a9d79939..71b368cee5a 100644
--- a/.erb-lint.yml
+++ b/.erb-lint.yml
@@ -2,10 +2,12 @@
linters:
FinalNewline:
enabled: true
- SpaceAroundErbTag:
- enabled: true
SelfClosingTag:
enabled: false
+ SpaceAroundErbTag:
+ enabled: true
+ SpaceInHtmlTag:
+ enabled: true
Rubocop:
enabled: true
only:
diff --git a/.rubocop.yml b/.rubocop.yml
index 91b73e7f739..b1c79a16c8c 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -93,9 +93,6 @@ Rails/Blank:
Rails/CreateTableWithTimestamps:
Enabled: true
-Rails/Date:
- Enabled: true
-
Rails/Delegate:
Enabled: true
@@ -177,9 +174,6 @@ Rails/ScopeArgs:
Rails/SkipsModelValidations:
Enabled: true
-Rails/TimeZone:
- Enabled: true
-
Rails/UniqBeforePluck:
Enabled: true
diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml
index bc737cd7762..bfeedbc27fc 100644
--- a/.rubocop_basic.yml
+++ b/.rubocop_basic.yml
@@ -56,12 +56,18 @@ Rails/ApplicationJob:
Rails/ApplicationRecord:
Enabled: true
+Rails/Date:
+ Enabled: true
+
Rails/HttpPositionalArguments:
Enabled: true
Rails/RelativeDateConstant:
Enabled: true
+Rails/TimeZone:
+ Enabled: true
+
RSpec/NotToNot:
Enabled: true
diff --git a/Gemfile b/Gemfile
index 79990e62817..b3c510745e6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -82,6 +82,7 @@ end
group :test do
gem "capybara", "~> 2.17.0"
+ gem "capybara-webmock", "~> 0.5.3"
gem "coveralls", "~> 0.8.22", require: false
gem "database_cleaner", "~> 1.7.0"
gem "email_spec", "~> 2.1.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index f49a1b035e7..c5e84d629ad 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -123,6 +123,11 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
+ capybara-webmock (0.5.3)
+ capybara (>= 2.4, < 4)
+ rack (>= 1.4)
+ rack-proxy (>= 0.6.0)
+ selenium-webdriver (~> 3.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
@@ -389,6 +394,8 @@ GEM
rack (>= 0.4)
rack-attack (5.0.1)
rack
+ rack-proxy (0.6.5)
+ rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.7.2)
@@ -584,6 +591,7 @@ DEPENDENCIES
capistrano-rails (~> 1.4.0)
capistrano3-delayed-job (~> 1.7.3)
capybara (~> 2.17.0)
+ capybara-webmock (~> 0.5.3)
ckeditor (~> 4.2.3)
cocoon (~> 1.2.9)
coffee-rails (~> 4.2.2)
diff --git a/app/controllers/admin/dashboard/administrator_tasks_controller.rb b/app/controllers/admin/dashboard/administrator_tasks_controller.rb
index 1450e24aa1b..88e77153e30 100644
--- a/app/controllers/admin/dashboard/administrator_tasks_controller.rb
+++ b/app/controllers/admin/dashboard/administrator_tasks_controller.rb
@@ -15,7 +15,7 @@ def edit
def update
authorize! :update, administrator_task
- administrator_task.update(user: current_user, executed_at: Time.now)
+ administrator_task.update(user: current_user, executed_at: Time.current)
redirect_to admin_dashboard_administrator_tasks_path,
{ flash: { notice: t("admin.dashboard.administrator_tasks.update.success") } }
end
diff --git a/app/controllers/concerns/commentable_actions.rb b/app/controllers/concerns/commentable_actions.rb
index 2c6d1da8110..bb610d4a670 100644
--- a/app/controllers/concerns/commentable_actions.rb
+++ b/app/controllers/concerns/commentable_actions.rb
@@ -16,7 +16,7 @@ def index
@resources = @resources.page(params[:page]).send("sort_by_#{@current_order}")
- index_customization if index_customization.present?
+ index_customization
@tag_cloud = tag_cloud
@banners = Banner.in_section(section(resource_model.name)).with_active
diff --git a/app/controllers/concerns/dashboard/expects_date_range.rb b/app/controllers/concerns/dashboard/expects_date_range.rb
index b20f327f96f..e6755d141bd 100644
--- a/app/controllers/concerns/dashboard/expects_date_range.rb
+++ b/app/controllers/concerns/dashboard/expects_date_range.rb
@@ -10,6 +10,6 @@ def start_date(fallback_date = proposal.created_at.to_date)
def end_date
return Date.parse(params[:end_date]) unless params[:end_date].blank?
- Date.today
+ Date.current
end
end
diff --git a/app/controllers/dashboard/actions_controller.rb b/app/controllers/dashboard/actions_controller.rb
index 32495f0fa50..6ef73265e73 100644
--- a/app/controllers/dashboard/actions_controller.rb
+++ b/app/controllers/dashboard/actions_controller.rb
@@ -12,7 +12,7 @@ def create_request
source_params = {
proposal: proposal,
action: dashboard_action,
- executed_at: Time.now
+ executed_at: Time.current
}
@dashboard_executed_action = Dashboard::ExecutedAction.new(source_params)
@@ -31,7 +31,7 @@ def execute
authorize! :dashboard, proposal
Dashboard::ExecutedAction.create(proposal: proposal, action: dashboard_action,
- executed_at: Time.now)
+ executed_at: Time.current)
redirect_to request.referer
end
diff --git a/app/controllers/legislation/processes_controller.rb b/app/controllers/legislation/processes_controller.rb
index 9dd60055d4e..85374f27a22 100644
--- a/app/controllers/legislation/processes_controller.rb
+++ b/app/controllers/legislation/processes_controller.rb
@@ -112,7 +112,7 @@ def resume
@phase = :resume
respond_to do |format|
format.html
- format.xlsx {render xlsx: "resume_to_xlsx", filename: ("resume-" + Date.today.to_s + ".xlsx")}
+ format.xlsx {render xlsx: "resume_to_xlsx", filename: ("resume-" + Date.current.to_s + ".xlsx")}
end
end
diff --git a/app/controllers/management/proposals_controller.rb b/app/controllers/management/proposals_controller.rb
index 93e20f69082..f4176c8c034 100644
--- a/app/controllers/management/proposals_controller.rb
+++ b/app/controllers/management/proposals_controller.rb
@@ -14,7 +14,7 @@ class Management::ProposalsController < Management::BaseController
def create
@resource = resource_model.new(strong_params.merge(author: current_user,
- published_at: Time.now))
+ published_at: Time.current))
if @resource.save
track_event
diff --git a/app/helpers/images_helper.rb b/app/helpers/images_helper.rb
index 1998e63f577..1508d1a4398 100644
--- a/app/helpers/images_helper.rb
+++ b/app/helpers/images_helper.rb
@@ -65,9 +65,9 @@ def render_image_attachment(builder, imageable, image)
def render_image(image, version, show_caption = true)
version = image.persisted? ? version : :original
- render partial: "images/image", locals: { image: image,
- version: version,
- show_caption: show_caption }
+ render "images/image", image: image,
+ version: version,
+ show_caption: show_caption
end
def image_direct_upload_url(imageable)
diff --git a/app/helpers/settings.rb b/app/helpers/settings.rb
deleted file mode 100644
index 209237f9941..00000000000
--- a/app/helpers/settings.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module SettingsHelper
-
- def setting_for_widget(widget)
- Setting.where(key: "feature.user.recommendations").first
- end
-
-end
diff --git a/app/models/dashboard/action.rb b/app/models/dashboard/action.rb
index 4dea153a788..701d790d570 100644
--- a/app/models/dashboard/action.rb
+++ b/app/models/dashboard/action.rb
@@ -44,10 +44,10 @@ class Dashboard::Action < ApplicationRecord
}
def self.active_for(proposal)
- published_at = proposal.published_at&.to_date || Date.today
+ published_at = proposal.published_at&.to_date || Date.current
active.where("required_supports <= ?", proposal.cached_votes_up)
- .where("day_offset <= ?", (Date.today - published_at).to_i)
+ .where("day_offset <= ?", (Date.current - published_at).to_i)
.by_proposal(proposal)
end
@@ -59,9 +59,9 @@ def self.course_for(proposal)
end
def active_for?(proposal)
- published_at = proposal.published_at&.to_date || Date.today
+ published_at = proposal.published_at&.to_date || Date.current
- required_supports <= proposal.cached_votes_up && day_offset <= (Date.today - published_at).to_i
+ required_supports <= proposal.cached_votes_up && day_offset <= (Date.current - published_at).to_i
end
def requested_for?(proposal)
@@ -95,7 +95,7 @@ def self.detect_new_actions_since(date, proposal)
private
def self.get_actions_for_today(proposal)
proposal_votes = proposal.cached_votes_up
- day_offset = calculate_day_offset(proposal, Date.today)
+ day_offset = calculate_day_offset(proposal, Date.current)
calculate_actions(proposal_votes, day_offset, proposal)
end
diff --git a/app/models/direct_message.rb b/app/models/direct_message.rb
index 4f3b0848274..442d565340d 100644
--- a/app/models/direct_message.rb
+++ b/app/models/direct_message.rb
@@ -8,7 +8,7 @@ class DirectMessage < ApplicationRecord
validates :receiver, presence: true
validate :max_per_day
- scope :today, lambda { where("DATE(created_at) = DATE(?)", Time.current) }
+ scope :today, lambda { where(created_at: Date.current.beginning_of_day..Date.current.end_of_day) }
def max_per_day
return if errors.any?
diff --git a/app/models/geozone.rb b/app/models/geozone.rb
index 345e040d143..667ec98f7b1 100644
--- a/app/models/geozone.rb
+++ b/app/models/geozone.rb
@@ -13,10 +13,6 @@ def self.names
Geozone.pluck(:name)
end
- def self.city
- where(name: "city").first
- end
-
def safe_to_destroy?
Geozone.reflect_on_all_associations(:has_many).all? do |association|
association.klass.where(geozone: self).empty?
diff --git a/app/models/proposal.rb b/app/models/proposal.rb
index 497d8181e8a..79be7eaaa07 100644
--- a/app/models/proposal.rb
+++ b/app/models/proposal.rb
@@ -96,7 +96,7 @@ def url
end
def publish
- update(published_at: Time.now)
+ update(published_at: Time.current)
send_new_actions_notification_on_published
end
diff --git a/app/views/admin/admin_notifications/show.html.erb b/app/views/admin/admin_notifications/show.html.erb
index 2fc79cf0e02..ad2445edf04 100644
--- a/app/views/admin/admin_notifications/show.html.erb
+++ b/app/views/admin/admin_notifications/show.html.erb
@@ -55,7 +55,7 @@
title: @admin_notification.title,
body: @admin_notification.body,
timestamp: Time.current } %>
- <% link_text = render partial: "/notifications/notification_body", locals: locals %>
+ <% link_text = render "/notifications/notification_body", locals %>
<%= link_to_if @admin_notification.link.present?, link_text, @admin_notification.link %>
diff --git a/app/views/admin/budget_investments/_investments.html.erb b/app/views/admin/budget_investments/_investments.html.erb
index d0464ad3be1..59044bb55d2 100644
--- a/app/views/admin/budget_investments/_investments.html.erb
+++ b/app/views/admin/budget_investments/_investments.html.erb
@@ -19,8 +19,8 @@
<% if @investments.any? %>
<%= page_entries_info @investments %>
- <%= render partial: "admin/shared/columns_selector",
- locals: { cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] } %>
+ <%= render "admin/shared/columns_selector",
+ cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %>
<%= render "filters_description", i18n_namespace: "admin.budget_investments.index" %>
diff --git a/app/views/admin/budget_investments/show.html.erb b/app/views/admin/budget_investments/show.html.erb
index 2f6f3fbcee7..6b628f30471 100644
--- a/app/views/admin/budget_investments/show.html.erb
+++ b/app/views/admin/budget_investments/show.html.erb
@@ -17,7 +17,7 @@
-<%= render partial: "/budgets/investments/investment_detail", locals: {investment: @investment, preview: true} %>
+<%= render "/budgets/investments/investment_detail", investment: @investment, preview: true %>
<%= t("admin.budget_investments.show.classification") %>
diff --git a/app/views/admin/dashboard/actions/_form.html.erb b/app/views/admin/dashboard/actions/_form.html.erb
index 8060b671921..b069d74b717 100644
--- a/app/views/admin/dashboard/actions/_form.html.erb
+++ b/app/views/admin/dashboard/actions/_form.html.erb
@@ -34,7 +34,9 @@
<%= f.text_field :short_description, label: false %>
- <%= f.cktext_area :description, ckeditor: { language: I18n.locale } %>
+
+ <%= f.cktext_area :description, ckeditor: { language: I18n.locale } %>
+
diff --git a/app/views/admin/local_census_records/imports/show.html.erb b/app/views/admin/local_census_records/imports/show.html.erb
index eede90e3807..ba66a87f896 100644
--- a/app/views/admin/local_census_records/imports/show.html.erb
+++ b/app/views/admin/local_census_records/imports/show.html.erb
@@ -8,12 +8,12 @@
<%= t("admin.local_census_records.imports.show.subtitle") %>
-<%= render partial: "local_census_records", locals: {
+<%= render "local_census_records",
title: t("admin.local_census_records.imports.show.errored"),
id: "invalid-local-census-records",
- local_census_records: @import.invalid_records } %>
+ local_census_records: @import.invalid_records %>
-<%= render partial: "local_census_records", locals: {
+<%= render "local_census_records",
title: t("admin.local_census_records.imports.show.created"),
id: "created-local-census-records",
- local_census_records: @import.created_records } %>
+ local_census_records: @import.created_records %>
diff --git a/app/views/admin/poll/booth_assignments/manage.html.erb b/app/views/admin/poll/booth_assignments/manage.html.erb
index 449037b9e70..63ef6c49a5f 100644
--- a/app/views/admin/poll/booth_assignments/manage.html.erb
+++ b/app/views/admin/poll/booth_assignments/manage.html.erb
@@ -17,7 +17,7 @@
<% @booths.each do |booth| %>
- <%= render partial: "booth_assignment", locals: { booth: booth, booth_assignment: booth.assignment_on_poll(@poll) } %>
+ <%= render "booth_assignment", booth: booth, booth_assignment: booth.assignment_on_poll(@poll) %>
<% end %>
diff --git a/app/views/admin/poll/booths/index.html.erb b/app/views/admin/poll/booths/index.html.erb
index f1a21d06ed1..6a03b38fa89 100644
--- a/app/views/admin/poll/booths/index.html.erb
+++ b/app/views/admin/poll/booths/index.html.erb
@@ -20,7 +20,7 @@
<% @booths.each do |booth| %>
- <%= render partial: "booth", locals: { booth: booth } %>
+ <%= render "booth", booth: booth %>
<% end %>
diff --git a/app/views/admin/settings/_configuration_settings_tab.html.erb b/app/views/admin/settings/_configuration_settings_tab.html.erb
index 84f21559b1f..b33fa9371a5 100644
--- a/app/views/admin/settings/_configuration_settings_tab.html.erb
+++ b/app/views/admin/settings/_configuration_settings_tab.html.erb
@@ -1,3 +1,3 @@
-<%= t("admin.settings.index.title") %>
+<%= t("admin.settings.index.general") %>
<%= render "settings_table", settings: @configuration_settings, setting_name: "setting", tab: "#tab-configuration" %>
diff --git a/app/views/admin/settings/_filter_subnav.html.erb b/app/views/admin/settings/_filter_subnav.html.erb
index 09d2d240ba2..cdd095d0d00 100644
--- a/app/views/admin/settings/_filter_subnav.html.erb
+++ b/app/views/admin/settings/_filter_subnav.html.erb
@@ -7,7 +7,7 @@
data-tabs>
<%= link_to "#tab-configuration" do %>
- <%= t("admin.settings.index.title") %>
+ <%= t("admin.settings.index.general") %>
<% end %>
diff --git a/app/views/admin/settings/index.html.erb b/app/views/admin/settings/index.html.erb
index 56d727887ee..9e417dc0ef9 100644
--- a/app/views/admin/settings/index.html.erb
+++ b/app/views/admin/settings/index.html.erb
@@ -1,4 +1,4 @@
-Settings
+<%= t("admin.settings.index.title") %>
<%= render "filter_subnav" %>
diff --git a/app/views/admin/shared/_columns_selector.html.erb b/app/views/admin/shared/_columns_selector.html.erb
index a48a17f3fe7..dfae1d80811 100644
--- a/app/views/admin/shared/_columns_selector.html.erb
+++ b/app/views/admin/shared/_columns_selector.html.erb
@@ -1,11 +1,11 @@
">
- Columns
+ <%= t("admin.budget_investments.index.columns") %>
diff --git a/app/views/admin/system_emails/preview_pending.html.erb b/app/views/admin/system_emails/preview_pending.html.erb
index 6de1c993fde..de08052477f 100644
--- a/app/views/admin/system_emails/preview_pending.html.erb
+++ b/app/views/admin/system_emails/preview_pending.html.erb
@@ -8,8 +8,8 @@
<%= t("admin.system_emails.#{@system_email}.preview_detail") %>
<% @previews.each do |preview| %>
- <%= render partial: "admin/system_emails/preview_pending/#{@system_email}",
- locals: { preview: preview } %>
+ <%= render "admin/system_emails/preview_pending/#{@system_email}",
+ preview: preview %>
<% end %>
diff --git a/app/views/admin/trackers/_form.html.erb b/app/views/admin/trackers/_form.html.erb
deleted file mode 100644
index f9385c65a3f..00000000000
--- a/app/views/admin/trackers/_form.html.erb
+++ /dev/null
@@ -1,32 +0,0 @@
-<%= form_for(tracker) do |f| %>
- <% if tracker.errors.any? %>
-
-
<%= pluralize(tracker.errors.count, "error") %> prohibited this tracker from being saved:
-
-
- <% tracker.errors.full_messages.each do |message| %>
- - <%= message %>
- <% end %>
-
-
- <% end %>
-
-
- <%= f.label :user_id %>
- <%= f.text_field :user_id %>
-
-
-
- <%= f.label :description %>
- <%= f.text_field :description %>
-
-
-
- <%= f.label :budget_investment_count %>
- <%= f.number_field :budget_investment_count %>
-
-
-
- <%= f.submit %>
-
-<% end %>
diff --git a/app/views/admin/valuators/_valuators.html.erb b/app/views/admin/valuators/_valuators.html.erb
index 49ef87fdca3..cd80dc7f23b 100644
--- a/app/views/admin/valuators/_valuators.html.erb
+++ b/app/views/admin/valuators/_valuators.html.erb
@@ -10,11 +10,11 @@
<% valuators.each do |valuator| %>
<% if valuator.is_a?(Valuator) %>
- <%= render partial: 'valuator_row', locals: {valuator: valuator} %>
+ <%= render "valuator_row", valuator: valuator %>
<% elsif valuator.valuator? %>
- <%= render partial: 'valuator_row', locals: {valuator: valuator.valuator} %>
+ <%= render "valuator_row", valuator: valuator.valuator %>
<% else %>
- <%= render partial: 'user_row', locals: {user: valuator} %>
+ <%= render "user_row", user: valuator %>
<% end %>
<% end %>
diff --git a/app/views/admin/valuators/index.html.erb b/app/views/admin/valuators/index.html.erb
index 50bd7b1ca85..7f9489722bc 100644
--- a/app/views/admin/valuators/index.html.erb
+++ b/app/views/admin/valuators/index.html.erb
@@ -8,7 +8,7 @@
<% if @valuators.any? %>
<%= page_entries_info @valuators %>
- <%= render partial: "valuators", locals: {valuators: @valuators} %>
+ <%= render "valuators", valuators: @valuators %>
<%= paginate @valuators %>
<% else %>
diff --git a/app/views/admin/valuators/search.html.erb b/app/views/admin/valuators/search.html.erb
index b90a7c58fbe..faa999c31e0 100644
--- a/app/views/admin/valuators/search.html.erb
+++ b/app/views/admin/valuators/search.html.erb
@@ -5,7 +5,7 @@
<% if @users.any? %>
<%= page_entries_info @users %>
- <%= render partial: "valuators", locals: {valuators: @users} %>
+ <%= render "valuators", valuators: @users %>
<% else %>
<%= t("admin.shared.no_search_results") %>
diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb
index a1664bfbc1f..0a2bcea8458 100644
--- a/app/views/budgets/investments/_investment.html.erb
+++ b/app/views/budgets/investments/_investment.html.erb
@@ -60,11 +60,11 @@
>
- <%= render partial: "/budgets/investments/votes", locals: {
+ <%= render "/budgets/investments/votes",
investment: investment,
investment_votes: investment_votes,
vote_url: namespaced_budget_investment_vote_path(investment, value: "yes")
- } %>
+ %>
<% elsif investment.should_show_vote_count? %>
>
- <%= render partial: "/budgets/investments/ballot", locals: {
+ <%= render "/budgets/investments/ballot",
investment: investment,
investment_ids: investment_ids,
ballot: ballot
- } %>
+ %>
<% elsif investment.should_show_price? %>
<%= back_link_to budget_investments_path(investment.budget, heading_id: investment.heading) %>
- <%= render partial: "/budgets/investments/investment_detail", locals: {investment: investment} %>
+ <%= render "/budgets/investments/investment_detail", investment: investment %>
diff --git a/app/views/budgets/investments/index.html.erb b/app/views/budgets/investments/index.html.erb
index 83e06cf0058..34a6ff711cb 100644
--- a/app/views/budgets/investments/index.html.erb
+++ b/app/views/budgets/investments/index.html.erb
@@ -73,19 +73,17 @@
<% if investments_default_view? %>
<% @investments.each do |investment| %>
- <%= render partial: "/budgets/investments/investment",
- locals: {
- investment: investment,
- investment_ids: @investment_ids,
- investment_votes: @investment_votes,
- ballot: @ballot
- } %>
+ <%= render "/budgets/investments/investment",
+ investment: investment,
+ investment_ids: @investment_ids,
+ investment_votes: @investment_votes,
+ ballot: @ballot %>
<% end %>
<% else %>
<% @investments.each do |investment| %>
- <%= render partial: "/budgets/investments/investment_minimal",
- locals: { investment: investment } %>
+ <%= render "/budgets/investments/investment_minimal",
+ investment: investment %>
<% end %>
<% end %>
diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb
index ca6223639eb..de38661a543 100644
--- a/app/views/budgets/investments/show.html.erb
+++ b/app/views/budgets/investments/show.html.erb
@@ -3,12 +3,12 @@
<%= render "shared/canonical", href: budget_investment_url %>
<% end %>
-<%= render partial: "/budgets/investments/investment_show", locals: {
+<%= render "/budgets/investments/investment_show",
investment: @investment,
investment_ids: @investment_ids,
investment_votes: @investment_votes,
ballot: @ballot
-} %>
+%>
@@ -18,9 +18,9 @@
<%= render "milestones/milestones", milestoneable: @investment %>
diff --git a/app/views/dashboard/mailer/new_actions_notification_rake_published.html.erb b/app/views/dashboard/mailer/new_actions_notification_rake_published.html.erb
index daea3d0a6ff..f8d7b0d7d1e 100644
--- a/app/views/dashboard/mailer/new_actions_notification_rake_published.html.erb
+++ b/app/views/dashboard/mailer/new_actions_notification_rake_published.html.erb
@@ -26,7 +26,7 @@
Setting["months_to_archive_proposals"].to_i.months %>
<%= t("mailers.new_actions_notification_rake_published.text_3",
- days_count: (limit_to_archive_proposal - Date.today).to_i,
+ days_count: (limit_to_archive_proposal - Date.current).to_i,
max_votes_count: Setting["votes_for_proposal_success"]) %>
diff --git a/app/views/dashboard/mailing/index.html.erb b/app/views/dashboard/mailing/index.html.erb
index 3b1519159ba..17805e50d87 100644
--- a/app/views/dashboard/mailing/index.html.erb
+++ b/app/views/dashboard/mailing/index.html.erb
@@ -32,10 +32,10 @@
<%= t("dashboard.mailer.forward.share_in") %>
- <%= render partial: 'shared/social_share', locals: {
+ <%= render "shared/social_share",
title: @proposal.title,
url: proposal_url(@proposal),
- description: @proposal.summary } %>
+ description: @proposal.summary %>
diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb
index 9a93e95ebb6..6653ffd0278 100644
--- a/app/views/debates/index.html.erb
+++ b/app/views/debates/index.html.erb
@@ -71,7 +71,7 @@
<%= render @debates %>
<% else %>
<% @debates.each do |debate| %>
- <%= render partial: "debates/debate_minimal", locals: { debate: debate } %>
+ <%= render "debates/debate_minimal", debate: debate %>
<% end %>
<% end %>
<% else %>
diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb
index 01e3664b1f9..b8814d75b2d 100644
--- a/app/views/debates/show.html.erb
+++ b/app/views/debates/show.html.erb
@@ -56,13 +56,13 @@
<%= render "debates/votes", debate: @debate %>
- <%= render partial: "shared/social_share", locals: {
+ <%= render "shared/social_share",
share_title: t("debates.show.share"),
title: @debate.title,
url: debate_url(@debate),
description: @debate.title,
mobile: @debate.title
- } %>
+ %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 78157920c0e..173974a5874 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -22,7 +22,7 @@
<%= setting["org_name"] %>
- <%= render partial: "layouts/header", locals: { with_subnavigation: true } %>
+ <%= render "layouts/header", with_subnavigation: true %>