From 2b4e1cf3587cfd33e57fb930f3e0db3f051defeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 25 Mar 2019 13:22:35 +0100 Subject: [PATCH 1/4] Add missing double quotes We overlooked a few single quotes while we changed thousands of them. --- app/controllers/concerns/has_orders.rb | 2 +- app/helpers/followables_helper.rb | 2 +- app/helpers/proposals_helper.rb | 4 +- .../legislation/proposals/_form.html.erb | 2 +- .../legislation/proposals/_proposals.html.erb | 2 +- .../legislation/proposals/index.html.erb | 6 +- .../annotations/_comment_header.html.erb | 2 +- config/database-docker.yml.example | 2 +- config/initializers/ckeditor.rb | 2 +- spec/controllers/graphql_controller_spec.rb | 6 +- spec/factories/budgets.rb | 64 ++-- spec/features/budgets/budgets_spec.rb | 100 +++--- spec/features/budgets/investments_spec.rb | 322 +++++++++--------- .../management/budget_investments_spec.rb | 72 ++-- spec/shared/features/relationable.rb | 4 +- 15 files changed, 296 insertions(+), 296 deletions(-) diff --git a/app/controllers/concerns/has_orders.rb b/app/controllers/concerns/has_orders.rb index 90be317f0..40dcac20f 100644 --- a/app/controllers/concerns/has_orders.rb +++ b/app/controllers/concerns/has_orders.rb @@ -5,7 +5,7 @@ module HasOrders def has_orders(valid_orders, *args) before_action(*args) do |c| @valid_orders = valid_orders.respond_to?(:call) ? valid_orders.call(c) : valid_orders.dup - @valid_orders.delete('relevance') if params[:search].blank? + @valid_orders.delete("relevance") if params[:search].blank? @current_order = @valid_orders.include?(params[:order]) ? params[:order] : @valid_orders.first end end diff --git a/app/helpers/followables_helper.rb b/app/helpers/followables_helper.rb index 48dd761ce..5641a33bc 100644 --- a/app/helpers/followables_helper.rb +++ b/app/helpers/followables_helper.rb @@ -22,7 +22,7 @@ module FollowablesHelper end def followable_class_name(followable) - followable.class.to_s.parameterize('_') + followable.class.to_s.parameterize("_") end def find_or_build_follow(user, followable) diff --git a/app/helpers/proposals_helper.rb b/app/helpers/proposals_helper.rb index 84407f840..633f469a3 100644 --- a/app/helpers/proposals_helper.rb +++ b/app/helpers/proposals_helper.rb @@ -34,9 +34,9 @@ module ProposalsHelper def empty_recommended_proposals_message_text(user) if user.interests.any? - t('proposals.index.recommendations.without_results') + t("proposals.index.recommendations.without_results") else - t('proposals.index.recommendations.without_interests') + t("proposals.index.recommendations.without_interests") end end diff --git a/app/views/admin/legislation/proposals/_form.html.erb b/app/views/admin/legislation/proposals/_form.html.erb index 94e94d157..63617c57d 100644 --- a/app/views/admin/legislation/proposals/_form.html.erb +++ b/app/views/admin/legislation/proposals/_form.html.erb @@ -21,7 +21,7 @@ <%= f.text_field :custom_list, value: @process.tag_list_on(:customs).to_s, label: false, placeholder: t("admin.legislation.proposals.form.custom_categories_placeholder"), - class: 'js-tag-list', + class: "js-tag-list", aria: {describedby: "tag-list-help-text"} %> diff --git a/app/views/admin/legislation/proposals/_proposals.html.erb b/app/views/admin/legislation/proposals/_proposals.html.erb index 9250e2a42..8682eeab6 100644 --- a/app/views/admin/legislation/proposals/_proposals.html.erb +++ b/app/views/admin/legislation/proposals/_proposals.html.erb @@ -1,7 +1,7 @@ <% if proposals.any? %>

<%= page_entries_info proposals %>

- <%= render 'shared/wide_order_selector', i18n_namespace: "admin.legislation.processes.proposals" %> + <%= render "shared/wide_order_selector", i18n_namespace: "admin.legislation.processes.proposals" %> diff --git a/app/views/admin/legislation/proposals/index.html.erb b/app/views/admin/legislation/proposals/index.html.erb index d8dd407a5..d758254fa 100644 --- a/app/views/admin/legislation/proposals/index.html.erb +++ b/app/views/admin/legislation/proposals/index.html.erb @@ -8,8 +8,8 @@

<%= @process.title %>

- <%= render 'admin/legislation/processes/subnav', process: @process, active: 'proposals' %> + <%= render "admin/legislation/processes/subnav", process: @process, active: "proposals" %> - <%= render 'form' %> - <%= render 'proposals', proposals: @proposals %> + <%= render "form" %> + <%= render "proposals", proposals: @proposals %> diff --git a/app/views/legislation/annotations/_comment_header.html.erb b/app/views/legislation/annotations/_comment_header.html.erb index f8602aa7e..26cd21469 100644 --- a/app/views/legislation/annotations/_comment_header.html.erb +++ b/app/views/legislation/annotations/_comment_header.html.erb @@ -1,7 +1,7 @@
- <%= t('legislation.annotations.comments.comments_count', + <%= t("legislation.annotations.comments.comments_count", count: annotation.comments.roots.count) %>
diff --git a/config/database-docker.yml.example b/config/database-docker.yml.example index dc1efbd7e..48e1c30db 100644 --- a/config/database-docker.yml.example +++ b/config/database-docker.yml.example @@ -6,7 +6,7 @@ default: &default pool: 5 port: 5432 username: postgres - password: <%= ENV['POSTGRES_PASSWORD'] %> + password: <%= ENV["POSTGRES_PASSWORD"] %> development: &development <<: *default diff --git a/config/initializers/ckeditor.rb b/config/initializers/ckeditor.rb index 1e173cca8..338cea974 100644 --- a/config/initializers/ckeditor.rb +++ b/config/initializers/ckeditor.rb @@ -3,7 +3,7 @@ Ckeditor.setup do |config| # Load and configure the ORM. Supports :active_record (default), :mongo_mapper and # :mongoid (bson_ext recommended) by default. Other ORMs may be # available as additional gems. - require 'ckeditor/orm/active_record' + require "ckeditor/orm/active_record" config.authorize_with :cancan diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb index 46d1d69df..4cd6ba8c6 100644 --- a/spec/controllers/graphql_controller_spec.rb +++ b/spec/controllers/graphql_controller_spec.rb @@ -71,19 +71,19 @@ describe GraphqlController, type: :request do let(:query_string) { "{ proposal(id: #{proposal.id}) { title } }" } specify "when absent" do - get '/graphql', query: query_string + get "/graphql", query: query_string expect(response).to have_http_status(:ok) end specify "when specified as the 'null' string" do - get '/graphql', query: query_string, variables: 'null' + get "/graphql", query: query_string, variables: "null" expect(response).to have_http_status(:ok) end specify "when specified as an empty string" do - get '/graphql', query: query_string, variables: '' + get "/graphql", query: query_string, variables: "" expect(response).to have_http_status(:ok) end diff --git a/spec/factories/budgets.rb b/spec/factories/budgets.rb index e741eb683..0b9130825 100644 --- a/spec/factories/budgets.rb +++ b/spec/factories/budgets.rb @@ -1,17 +1,17 @@ FactoryBot.define do factory :spending_proposal do sequence(:title) { |n| "Spending Proposal #{n} title" } - description 'Spend money on this' - feasible_explanation 'This proposal is not viable because...' - external_url 'http://external_documention.org' - terms_of_service '1' + description "Spend money on this" + feasible_explanation "This proposal is not viable because..." + external_url "http://external_documention.org" + terms_of_service "1" association :author, factory: :user end factory :budget do sequence(:name) { |n| "#{Faker::Lorem.word} #{n}" } currency_symbol "€" - phase 'accepting' + phase "accepting" description_drafting "This budget is drafting" description_informing "This budget is informing" description_accepting "This budget is accepting" @@ -24,47 +24,47 @@ FactoryBot.define do description_finished "This budget is finished" trait :drafting do - phase 'drafting' + phase "drafting" end trait :informing do - phase 'informing' + phase "informing" end trait :accepting do - phase 'accepting' + phase "accepting" end trait :reviewing do - phase 'reviewing' + phase "reviewing" end trait :selecting do - phase 'selecting' + phase "selecting" end trait :valuating do - phase 'valuating' + phase "valuating" end trait :publishing_prices do - phase 'publishing_prices' + phase "publishing_prices" end trait :balloting do - phase 'balloting' + phase "balloting" end trait :reviewing_ballots do - phase 'reviewing_ballots' + phase "reviewing_ballots" end trait :finished do - phase 'finished' + phase "finished" end end - factory :budget_group, class: 'Budget::Group' do + factory :budget_group, class: "Budget::Group" do budget sequence(:name) { |n| "Group #{n}" } @@ -73,28 +73,28 @@ FactoryBot.define do end end - factory :budget_heading, class: 'Budget::Heading' do + factory :budget_heading, class: "Budget::Heading" do association :group, factory: :budget_group sequence(:name) { |n| "Heading #{n}" } price 1000000 population 1234 - latitude '40.416775' - longitude '-3.703790' + latitude "40.416775" + longitude "-3.703790" trait :drafting_budget do association :group, factory: [:budget_group, :drafting_budget] end end - factory :budget_investment, class: 'Budget::Investment' do + factory :budget_investment, class: "Budget::Investment" do sequence(:title) { |n| "Budget Investment #{n} title" } association :heading, factory: :budget_heading association :author, factory: :user - description 'Spend money on this' + description "Spend money on this" price 10 - unfeasibility_explanation '' - skip_map '1' - terms_of_service '1' + unfeasibility_explanation "" + skip_map "1" + terms_of_service "1" incompatible false trait :with_confidence_score do @@ -141,7 +141,7 @@ FactoryBot.define do trait :selected_with_price do selected price 1000 - price_explanation 'Because of reasons' + price_explanation "Because of reasons" end trait :unselected do @@ -169,7 +169,7 @@ FactoryBot.define do end end - factory :budget_phase, class: 'Budget::Phase' do + factory :budget_phase, class: "Budget::Phase" do budget kind :balloting summary Faker::Lorem.sentence(3) @@ -179,17 +179,17 @@ FactoryBot.define do enabled true end - factory :budget_ballot, class: 'Budget::Ballot' do + factory :budget_ballot, class: "Budget::Ballot" do association :user, factory: :user budget end - factory :budget_ballot_line, class: 'Budget::Ballot::Line' do + factory :budget_ballot_line, class: "Budget::Ballot::Line" do association :ballot, factory: :budget_ballot association :investment, factory: :budget_investment end - factory :budget_reclassified_vote, class: 'Budget::ReclassifiedVote' do + factory :budget_reclassified_vote, class: "Budget::ReclassifiedVote" do user association :investment, factory: :budget_investment reason "unfeasible" @@ -199,9 +199,9 @@ FactoryBot.define do sequence(:name) { |n| "Valuator Group #{n}" } end - factory :heading_content_block, class: 'Budget::ContentBlock' do + factory :heading_content_block, class: "Budget::ContentBlock" do association :heading, factory: :budget_heading - locale 'en' - body 'Some heading contents' + locale "en" + body "Some heading contents" end end diff --git a/spec/features/budgets/budgets_spec.rb b/spec/features/budgets/budgets_spec.rb index b115d6e52..0aa886014 100644 --- a/spec/features/budgets/budgets_spec.rb +++ b/spec/features/budgets/budgets_spec.rb @@ -1,40 +1,40 @@ -require 'rails_helper' +require "rails_helper" -feature 'Budgets' do +feature "Budgets" do let(:budget) { create(:budget) } let(:level_two_user) { create(:user, :level_two) } - let(:allowed_phase_list) { ['balloting', 'reviewing_ballots', 'finished'] } + let(:allowed_phase_list) { ["balloting", "reviewing_ballots", "finished"] } - context 'Index' do + context "Index" do - scenario 'Show normal index with links' do + scenario "Show normal index with links" do group1 = create(:budget_group, budget: budget) group2 = create(:budget_group, budget: budget) heading1 = create(:budget_heading, group: group1) heading2 = create(:budget_heading, group: group2) - budget.update_attributes(phase: 'informing') + budget.update_attributes(phase: "informing") visit budgets_path within("#budget_heading") do expect(page).to have_content(budget.name) expect(page).to have_content(budget.description) - expect(page).to have_content('Actual phase') - expect(page).to have_content('Information') - expect(page).to have_link('Help with participatory budgets') - expect(page).to have_link('See all phases') + expect(page).to have_content("Actual phase") + expect(page).to have_content("Information") + expect(page).to have_link("Help with participatory budgets") + expect(page).to have_link("See all phases") end - budget.update_attributes(phase: 'publishing_prices') + budget.update_attributes(phase: "publishing_prices") visit budgets_path within("#budget_heading") do - expect(page).to have_content('Publishing projects prices') + expect(page).to have_content("Publishing projects prices") end - within('#budget_info') do + within("#budget_info") do expect(page).to have_content(group1.name) expect(page).to have_content(group2.name) expect(page).to have_content(heading1.name) @@ -46,7 +46,7 @@ feature 'Budgets' do expect(page).not_to have_content("#finished_budgets") end - scenario 'Show finished budgets list' do + scenario "Show finished budgets list" do finished_budget_1 = create(:budget, :finished) finished_budget_2 = create(:budget, :finished) drafting_budget = create(:budget, :drafting) @@ -132,7 +132,7 @@ feature 'Budgets' do end end - scenario 'Show investment links only on balloting or later' do + scenario "Show investment links only on balloting or later" do budget = create(:budget) group = create(:budget_group, budget: budget) @@ -149,12 +149,12 @@ feature 'Budgets' do end end - scenario 'Not show investment links earlier of balloting ' do + scenario "Not show investment links earlier of balloting " do budget = create(:budget) group = create(:budget_group, budget: budget) heading = create(:budget_heading, group: group) - phases_without_links = ['drafting','informing'] + phases_without_links = ["drafting", "informing"] not_allowed_phase_list = Budget::Phase::PHASE_KINDS - phases_without_links - allowed_phase_list @@ -188,45 +188,45 @@ feature 'Budgets' do end end - scenario 'Index shows only published phases' do + scenario "Index shows only published phases" do budget.update(phase: :finished) phases = budget.phases - phases.drafting.update(starts_at: '30-12-2017', ends_at: '31-12-2017', enabled: true, - description: 'Description of drafting phase', - summary: '

This is the summary for drafting phase

') + phases.drafting.update(starts_at: "30-12-2017", ends_at: "31-12-2017", enabled: true, + description: "Description of drafting phase", + summary: "

This is the summary for drafting phase

") - phases.accepting.update(starts_at: '01-01-2018', ends_at: '10-01-2018', enabled: true, - description: 'Description of accepting phase', - summary: 'This is the summary for accepting phase') + phases.accepting.update(starts_at: "01-01-2018", ends_at: "10-01-2018", enabled: true, + description: "Description of accepting phase", + summary: "This is the summary for accepting phase") - phases.reviewing.update(starts_at: '11-01-2018', ends_at: '20-01-2018', enabled: false, - description: 'Description of reviewing phase', - summary: 'This is the summary for reviewing phase') + phases.reviewing.update(starts_at: "11-01-2018", ends_at: "20-01-2018", enabled: false, + description: "Description of reviewing phase", + summary: "This is the summary for reviewing phase") - phases.selecting.update(starts_at: '21-01-2018', ends_at: '01-02-2018', enabled: true, - description: 'Description of selecting phase', - summary: 'This is the summary for selecting phase') + phases.selecting.update(starts_at: "21-01-2018", ends_at: "01-02-2018", enabled: true, + description: "Description of selecting phase", + summary: "This is the summary for selecting phase") - phases.valuating.update(starts_at: '10-02-2018', ends_at: '20-02-2018', enabled: false, - description: 'Description of valuating phase', - summary: 'This is the summary for valuating phase') + phases.valuating.update(starts_at: "10-02-2018", ends_at: "20-02-2018", enabled: false, + description: "Description of valuating phase", + summary: "This is the summary for valuating phase") - phases.publishing_prices.update(starts_at: '21-02-2018', ends_at: '01-03-2018', enabled: false, - description: 'Description of publishing prices phase', - summary: 'This is the summary for publishing_prices phase') + phases.publishing_prices.update(starts_at: "21-02-2018", ends_at: "01-03-2018", enabled: false, + description: "Description of publishing prices phase", + summary: "This is the summary for publishing_prices phase") - phases.balloting.update(starts_at: '02-03-2018', ends_at: '10-03-2018', enabled: true, - description: 'Description of balloting phase', - summary: 'This is the summary for balloting phase') + phases.balloting.update(starts_at: "02-03-2018", ends_at: "10-03-2018", enabled: true, + description: "Description of balloting phase", + summary: "This is the summary for balloting phase") - phases.reviewing_ballots.update(starts_at: '11-03-2018', ends_at: '20-03-2018', enabled: false, - description: 'Description of reviewing ballots phase', - summary: 'This is the summary for reviewing_ballots phase') + phases.reviewing_ballots.update(starts_at: "11-03-2018", ends_at: "20-03-2018", enabled: false, + description: "Description of reviewing ballots phase", + summary: "This is the summary for reviewing_ballots phase") - phases.finished.update(starts_at: '21-03-2018', ends_at: '30-03-2018', enabled: true, - description: 'Description of finished phase', - summary: 'This is the summary for finished phase') + phases.finished.update(starts_at: "21-03-2018", ends_at: "30-03-2018", enabled: true, + description: "Description of finished phase", + summary: "This is the summary for finished phase") visit budgets_path @@ -239,7 +239,7 @@ feature 'Budgets' do expect(page).not_to have_content "This is the summary for publishing_prices phase" expect(page).not_to have_content "February 21, 2018 - March 01, 2018" expect(page).not_to have_content "This is the summary for reviewing_ballots phase" - expect(page).not_to have_content "March 11, 2018 - March 20, 2018'" + expect(page).not_to have_content "March 11, 2018 - March 20, 2018" expect(page).to have_content "This is the summary for accepting phase" expect(page).to have_content "January 01, 2018 - January 20, 2018" @@ -348,7 +348,7 @@ feature 'Budgets' do end end - context 'Show' do + context "Show" do scenario "List all groups" do group1 = create(:budget_group, budget: budget) @@ -470,7 +470,7 @@ feature 'Budgets' do background do logout - budget.update(phase: 'drafting') + budget.update(phase: "drafting") create(:budget) end @@ -503,10 +503,10 @@ feature 'Budgets' do end - context 'Accepting' do + context "Accepting" do background do - budget.update(phase: 'accepting') + budget.update(phase: "accepting") end context "Permissions" do diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index c82018cac..26cb0350a 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -1,10 +1,10 @@ -require 'rails_helper' -require 'sessions_helper' +require "rails_helper" +require "sessions_helper" -feature 'Budget Investments' do +feature "Budget Investments" do - let(:author) { create(:user, :level_two, username: 'Isabel') } + let(:author) { create(:user, :level_two, username: "Isabel") } let(:budget) { create(:budget, name: "Big Budget") } let(:other_budget) { create(:budget, name: "What a Budget!") } let(:group) { create(:budget_group, name: "Health", budget: budget) } @@ -15,19 +15,19 @@ feature 'Budget Investments' do "budget_investment_path" before do - Setting['feature.allow_images'] = true + Setting["feature.allow_images"] = true end after do - Setting['feature.allow_images'] = nil + Setting["feature.allow_images"] = nil end context "Concerns" do - it_behaves_like 'notifiable in-app', Budget::Investment - it_behaves_like 'relationable', Budget::Investment + it_behaves_like "notifiable in-app", Budget::Investment + it_behaves_like "relationable", Budget::Investment end - scenario 'Index' do + scenario "Index" do investments = [create(:budget_investment, heading: heading), create(:budget_investment, heading: heading), create(:budget_investment, :feasible, heading: heading)] @@ -37,9 +37,9 @@ feature 'Budget Investments' do visit budget_path(budget) click_link "Health" - expect(page).to have_selector('#budget-investments .budget-investment', count: 3) + expect(page).to have_selector("#budget-investments .budget-investment", count: 3) investments.each do |investment| - within('#budget-investments') do + within("#budget-investments") do expect(page).to have_content investment.title expect(page).to have_css("a[href='#{budget_investment_path(budget_id: budget.id, id: investment.id)}']", text: investment.title) expect(page).not_to have_content(unfeasible_investment.title) @@ -47,38 +47,38 @@ feature 'Budget Investments' do end end - scenario 'Index view mode' do + scenario "Index view mode" do investments = [create(:budget_investment, heading: heading), create(:budget_investment, heading: heading), create(:budget_investment, heading: heading)] visit budget_path(budget) - click_link 'Health' + click_link "Health" - click_button 'View mode' + click_button "View mode" - click_link 'List' + click_link "List" investments.each do |investment| - within('#budget-investments') do + within("#budget-investments") do expect(page).to have_link investment.title expect(page).not_to have_content(investment.description) end end - click_button 'View mode' + click_button "View mode" - click_link 'Cards' + click_link "Cards" investments.each do |investment| - within('#budget-investments') do + within("#budget-investments") do expect(page).to have_link investment.title expect(page).to have_content(investment.description) end end end - scenario 'Index should show investment descriptive image only when is defined' do + scenario "Index should show investment descriptive image only when is defined" do investment = create(:budget_investment, heading: heading) investment_with_image = create(:budget_investment, heading: heading) image = create(:image, imageable: investment_with_image) @@ -93,7 +93,7 @@ feature 'Budget Investments' do end end - scenario 'Index should show a map if heading has coordinates defined', :js do + scenario "Index should show a map if heading has coordinates defined", :js do create(:budget_investment, heading: heading) visit budget_investments_path(budget, heading_id: heading.id) within("#sidebar") do @@ -111,7 +111,7 @@ feature 'Budget Investments' do context("Search") do - scenario 'Search by text' do + scenario "Search by text" do investment1 = create(:budget_investment, heading: heading, title: "Get Schwifty") investment2 = create(:budget_investment, heading: heading, title: "Schwifty Hello") investment3 = create(:budget_investment, heading: heading, title: "Do not show me") @@ -124,7 +124,7 @@ feature 'Budget Investments' do end within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 2) + expect(page).to have_css(".budget-investment", count: 2) expect(page).to have_content(investment1.title) expect(page).to have_content(investment2.title) @@ -168,7 +168,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget) click_link "Advanced search" - select Setting['official_level_1_name'], from: "advanced_search_official_level" + select Setting["official_level_1_name"], from: "advanced_search_official_level" click_button "Filter" expect(page).to have_content("There are 2 investments") @@ -191,7 +191,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget) click_link "Advanced search" - select Setting['official_level_2_name'], from: "advanced_search_official_level" + select Setting["official_level_2_name"], from: "advanced_search_official_level" click_button "Filter" expect(page).to have_content("There are 2 investments") @@ -214,7 +214,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget) click_link "Advanced search" - select Setting['official_level_3_name'], from: "advanced_search_official_level" + select Setting["official_level_3_name"], from: "advanced_search_official_level" click_button "Filter" expect(page).to have_content("There are 2 investments") @@ -237,7 +237,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget) click_link "Advanced search" - select Setting['official_level_4_name'], from: "advanced_search_official_level" + select Setting["official_level_4_name"], from: "advanced_search_official_level" click_button "Filter" expect(page).to have_content("There are 2 investments") @@ -260,7 +260,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget) click_link "Advanced search" - select Setting['official_level_5_name'], from: "advanced_search_official_level" + select Setting["official_level_5_name"], from: "advanced_search_official_level" click_button "Filter" expect(page).to have_content("There are 2 investments") @@ -416,7 +416,7 @@ feature 'Budget Investments' do click_link "Advanced search" fill_in "Write the text", with: "Schwifty" - select Setting['official_level_1_name'], from: "advanced_search_official_level" + select Setting["official_level_1_name"], from: "advanced_search_official_level" select "Last 24 hours", from: "js-advanced-search-date-min" click_button "Filter" @@ -433,7 +433,7 @@ feature 'Budget Investments' do click_link "Advanced search" fill_in "Write the text", with: "Schwifty" - select Setting['official_level_1_name'], from: "advanced_search_official_level" + select Setting["official_level_1_name"], from: "advanced_search_official_level" select "Last 24 hours", from: "js-advanced-search-date-min" click_button "Filter" @@ -442,8 +442,8 @@ feature 'Budget Investments' do within "#js-advanced-search" do expect(page).to have_selector("input[name='search'][value='Schwifty']") - expect(page).to have_select('advanced_search[official_level]', selected: Setting['official_level_1_name']) - expect(page).to have_select('advanced_search[date_min]', selected: 'Last 24 hours') + expect(page).to have_select("advanced_search[official_level]", selected: Setting["official_level_1_name"]) + expect(page).to have_select("advanced_search[date_min]", selected: "Last 24 hours") end end @@ -452,16 +452,16 @@ feature 'Budget Investments' do click_link "Advanced search" select "Customized", from: "js-advanced-search-date-min" - fill_in "advanced_search_date_min", with: 7.days.ago.strftime('%d/%m/%Y') - fill_in "advanced_search_date_max", with: 1.day.ago.strftime('%d/%m/%Y') + fill_in "advanced_search_date_min", with: 7.days.ago.strftime("%d/%m/%Y") + fill_in "advanced_search_date_max", with: 1.day.ago.strftime("%d/%m/%Y") click_button "Filter" expect(page).to have_content("investments cannot be found") within "#js-advanced-search" do - expect(page).to have_select('advanced_search[date_min]', selected: 'Customized') - expect(page).to have_selector("input[name='advanced_search[date_min]'][value*='#{7.days.ago.strftime('%d/%m/%Y')}']") - expect(page).to have_selector("input[name='advanced_search[date_max]'][value*='#{1.day.ago.strftime('%d/%m/%Y')}']") + expect(page).to have_select("advanced_search[date_min]", selected: "Customized") + expect(page).to have_selector("input[name='advanced_search[date_min]'][value*='#{7.days.ago.strftime("%d/%m/%Y")}']") + expect(page).to have_selector("input[name='advanced_search[date_max]'][value*='#{1.day.ago.strftime("%d/%m/%Y")}']") end end @@ -471,7 +471,7 @@ feature 'Budget Investments' do context("Filters") do - scenario 'by unfeasibility' do + scenario "by unfeasibility" do investment1 = create(:budget_investment, :unfeasible, heading: heading, valuation_finished: true) investment2 = create(:budget_investment, :feasible, heading: heading) investment3 = create(:budget_investment, heading: heading) @@ -480,7 +480,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget_id: budget.id, heading_id: heading.id, filter: "unfeasible") within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 1) + expect(page).to have_css(".budget-investment", count: 1) expect(page).to have_content(investment1.title) expect(page).not_to have_content(investment2.title) @@ -491,11 +491,11 @@ feature 'Budget Investments' do scenario "by unfeasibilty link for group with one heading" do budget.update(phase: :balloting) - group = create(:budget_group, name: 'All City', budget: budget) + group = create(:budget_group, name: "All City", budget: budget) heading = create(:budget_heading, name: "Madrid", group: group) visit budget_path(budget) - click_link 'See unfeasible investments' + click_link "See unfeasible investments" click_link "All City" @@ -505,16 +505,16 @@ feature 'Budget Investments' do scenario "by unfeasibilty link for group with many headings" do budget.update(phase: :balloting) - group = create(:budget_group, name: 'Districts', budget: budget) - heading1 = create(:budget_heading, name: 'Carabanchel', group: group) - heading2 = create(:budget_heading, name: 'Barajas', group: group) + group = create(:budget_group, name: "Districts", budget: budget) + heading1 = create(:budget_heading, name: "Carabanchel", group: group) + heading2 = create(:budget_heading, name: "Barajas", group: group) visit budget_path(budget) - click_link 'See unfeasible investments' + click_link "See unfeasible investments" - click_link 'Districts' - click_link 'Carabanchel' + click_link "Districts" + click_link "Carabanchel" expected_path = budget_investments_path(budget, heading_id: heading1.id, filter: "unfeasible") expect(page).to have_current_path(expected_path) @@ -582,7 +582,7 @@ feature 'Budget Investments' do end context "Orders" do - before { budget.update(phase: 'selecting') } + before { budget.update(phase: "selecting") } scenario "Default order is random" do per_page = Kaminari.config.default_per_page @@ -613,7 +613,7 @@ feature 'Budget Investments' do expect(order).not_to eq(new_order) end - scenario 'Random order maintained with pagination' do + scenario "Random order maintained with pagination" do per_page = Kaminari.config.default_per_page (per_page + 2).times { create(:budget_investment, heading: heading) } @@ -621,17 +621,17 @@ feature 'Budget Investments' do order = all(".budget-investment h3").collect {|i| i.text } - click_link 'Next' + click_link "Next" expect(page).to have_content "You're on page 2" - click_link 'Previous' + click_link "Previous" expect(page).to have_content "You're on page 1" new_order = all(".budget-investment h3").collect {|i| i.text } expect(order).to eq(new_order) end - scenario 'Random order maintained when going back from show' do + scenario "Random order maintained when going back from show" do 10.times { |i| create(:budget_investment, heading: heading) } visit budget_investments_path(budget, heading_id: heading.id) @@ -649,11 +649,11 @@ feature 'Budget Investments' do 12.times { create(:budget_investment, heading: heading) } # 12 instead of per_page + 2 because in each page there are 10 (in this case), not 25 - visit budget_investments_path(budget, order: 'random') + visit budget_investments_path(budget, order: "random") first_page_investments = investments_order - click_link 'Next' + click_link "Next" expect(page).to have_content "You're on page 2" second_page_investments = investments_order @@ -664,25 +664,25 @@ feature 'Budget Investments' do end - scenario 'Proposals are ordered by confidence_score' do - best_proposal = create(:budget_investment, heading: heading, title: 'Best proposal') + scenario "Proposals are ordered by confidence_score" do + best_proposal = create(:budget_investment, heading: heading, title: "Best proposal") best_proposal.update_column(:confidence_score, 10) - worst_proposal = create(:budget_investment, heading: heading, title: 'Worst proposal') + worst_proposal = create(:budget_investment, heading: heading, title: "Worst proposal") worst_proposal.update_column(:confidence_score, 2) - medium_proposal = create(:budget_investment, heading: heading, title: 'Medium proposal') + medium_proposal = create(:budget_investment, heading: heading, title: "Medium proposal") medium_proposal.update_column(:confidence_score, 5) visit budget_investments_path(budget, heading_id: heading.id) - click_link 'highest rated' - expect(page).to have_selector('a.is-active', text: 'highest rated') + click_link "highest rated" + expect(page).to have_selector("a.is-active", text: "highest rated") - within '#budget-investments' do + within "#budget-investments" do expect(best_proposal.title).to appear_before(medium_proposal.title) expect(medium_proposal.title).to appear_before(worst_proposal.title) end - expect(current_url).to include('order=confidence_score') - expect(current_url).to include('page=1') + expect(current_url).to include("order=confidence_score") + expect(current_url).to include("page=1") end scenario "Each user has a different and consistent random budget investment order" do @@ -701,36 +701,36 @@ feature 'Budget Investments' do expect(@first_user_investments_order).not_to eq(@second_user_investments_order) in_browser(:one) do - click_link 'Next' + click_link "Next" expect(page).to have_content "You're on page 2" - click_link 'Previous' + click_link "Previous" expect(page).to have_content "You're on page 1" expect(investments_order).to eq(@first_user_investments_order) end in_browser(:two) do - click_link 'Next' + click_link "Next" expect(page).to have_content "You're on page 2" - click_link 'Previous' + click_link "Previous" expect(page).to have_content "You're on page 1" expect(investments_order).to eq(@second_user_investments_order) end end - scenario 'Each user has a equal and consistent budget investment order when the random_seed is equal' do + scenario "Each user has a equal and consistent budget investment order when the random_seed is equal" do (Kaminari.config.default_per_page * 1.3).to_i.times { create(:budget_investment, heading: heading) } in_browser(:one) do - visit budget_investments_path(budget, heading: heading, random_seed: '1') + visit budget_investments_path(budget, heading: heading, random_seed: "1") @first_user_investments_order = investments_order end in_browser(:two) do - visit budget_investments_path(budget, heading: heading, random_seed: '1') + visit budget_investments_path(budget, heading: heading, random_seed: "1") @second_user_investments_order = investments_order end @@ -761,10 +761,10 @@ feature 'Budget Investments' do end end - scenario 'Order is random if budget is finished' do + scenario "Order is random if budget is finished" do 10.times { create(:budget_investment) } - budget.update(phase: 'finished') + budget.update(phase: "finished") visit budget_investments_path(budget, heading_id: heading.id) order = all(".budget-investment h3").collect {|i| i.text } @@ -803,82 +803,82 @@ feature 'Budget Investments' do end - context 'Phase I - Accepting' do - before { budget.update(phase: 'accepting') } + context "Phase I - Accepting" do + before { budget.update(phase: "accepting") } - scenario 'Create with invisible_captcha honeypot field' do + scenario "Create with invisible_captcha honeypot field" do login_as(author) visit new_budget_investment_path(budget_id: budget.id) - select heading.name, from: 'budget_investment_heading_id' - fill_in 'budget_investment_title', with: 'I am a bot' - fill_in 'budget_investment_subtitle', with: 'This is the honeypot' - fill_in 'budget_investment_description', with: 'This is the description' - check 'budget_investment_terms_of_service' + select heading.name, from: "budget_investment_heading_id" + fill_in "budget_investment_title", with: "I am a bot" + fill_in "budget_investment_subtitle", with: "This is the honeypot" + fill_in "budget_investment_description", with: "This is the description" + check "budget_investment_terms_of_service" - click_button 'Create Investment' + click_button "Create Investment" expect(page.status_code).to eq(200) expect(page.html).to be_empty expect(page).to have_current_path(budget_investments_path(budget_id: budget.id)) end - scenario 'Create budget investment too fast' do + scenario "Create budget investment too fast" do allow(InvisibleCaptcha).to receive(:timestamp_threshold).and_return(Float::INFINITY) login_as(author) visit new_budget_investment_path(budget_id: budget.id) - select heading.name, from: 'budget_investment_heading_id' - fill_in 'budget_investment_title', with: 'I am a bot' - fill_in 'budget_investment_description', with: 'This is the description' - check 'budget_investment_terms_of_service' + select heading.name, from: "budget_investment_heading_id" + fill_in "budget_investment_title", with: "I am a bot" + fill_in "budget_investment_description", with: "This is the description" + check "budget_investment_terms_of_service" - click_button 'Create Investment' + click_button "Create Investment" - expect(page).to have_content 'Sorry, that was too quick! Please resubmit' + expect(page).to have_content "Sorry, that was too quick! Please resubmit" expect(page).to have_current_path(new_budget_investment_path(budget_id: budget.id)) end - scenario 'Create' do + scenario "Create" do login_as(author) visit new_budget_investment_path(budget_id: budget.id) - select heading.name, from: 'budget_investment_heading_id' - fill_in 'budget_investment_title', with: 'Build a skyscraper' - fill_in 'budget_investment_description', with: 'I want to live in a high tower over the clouds' - fill_in 'budget_investment_location', with: 'City center' - fill_in 'budget_investment_organization_name', with: 'T.I.A.' - fill_in 'budget_investment_tag_list', with: 'Towers' - check 'budget_investment_terms_of_service' + select heading.name, from: "budget_investment_heading_id" + fill_in "budget_investment_title", with: "Build a skyscraper" + fill_in "budget_investment_description", with: "I want to live in a high tower over the clouds" + fill_in "budget_investment_location", with: "City center" + fill_in "budget_investment_organization_name", with: "T.I.A." + fill_in "budget_investment_tag_list", with: "Towers" + check "budget_investment_terms_of_service" - click_button 'Create Investment' + click_button "Create Investment" - expect(page).to have_content 'Investment created successfully' - expect(page).to have_content 'Build a skyscraper' - expect(page).to have_content 'I want to live in a high tower over the clouds' - expect(page).to have_content 'City center' - expect(page).to have_content 'T.I.A.' - expect(page).to have_content 'Towers' + expect(page).to have_content "Investment created successfully" + expect(page).to have_content "Build a skyscraper" + expect(page).to have_content "I want to live in a high tower over the clouds" + expect(page).to have_content "City center" + expect(page).to have_content "T.I.A." + expect(page).to have_content "Towers" visit user_url(author, filter: :budget_investments) - expect(page).to have_content '1 Investment' - expect(page).to have_content 'Build a skyscraper' + expect(page).to have_content "1 Investment" + expect(page).to have_content "Build a skyscraper" end - scenario 'Errors on create' do + scenario "Errors on create" do login_as(author) visit new_budget_investment_path(budget_id: budget.id) - click_button 'Create Investment' + click_button "Create Investment" expect(page).to have_content error_message end - context 'Suggest' do + context "Suggest" do factory = :budget_investment - scenario 'Show up to 5 suggestions', :js do + scenario "Show up to 5 suggestions", :js do login_as(author) %w(first second third fourth fifth sixth).each do |ordinal| @@ -894,7 +894,7 @@ feature 'Budget Investments' do end end - scenario 'No found suggestions', :js do + scenario "No found suggestions", :js do login_as(author) %w(first second third fourth fifth sixth).each do |ordinal| @@ -904,8 +904,8 @@ feature 'Budget Investments' do visit new_budget_investment_path(budget) fill_in "budget_investment_title", with: "item" - within('div#js-suggest') do - expect(page).not_to have_content 'You are seeing' + within("div#js-suggest") do + expect(page).not_to have_content "You are seeing" end end @@ -919,8 +919,8 @@ feature 'Budget Investments' do visit new_budget_investment_path(other_budget) fill_in "budget_investment_title", with: "search" - within('div#js-suggest') do - expect(page).not_to have_content 'You are seeing' + within("div#js-suggest") do + expect(page).not_to have_content "You are seeing" end end end @@ -930,10 +930,10 @@ feature 'Budget Investments' do visit budget_investments_path(budget, heading_id: heading.id) - expect(page).not_to have_link('Check my ballot') - expect(page).not_to have_css('#progress_bar') - within('#sidebar') do - expect(page).not_to have_content('My ballot') + expect(page).not_to have_link("Check my ballot") + expect(page).not_to have_css("#progress_bar") + within("#sidebar") do + expect(page).not_to have_content("My ballot") end end @@ -946,8 +946,8 @@ feature 'Budget Investments' do visit new_budget_investment_path(budget_id: budget.id) - select_options = find('#budget_investment_heading_id').all('option').collect(&:text) - expect(select_options.first).to eq('') + select_options = find("#budget_investment_heading_id").all("option").collect(&:text) + expect(select_options.first).to eq("") expect(select_options.second).to eq("Toda la ciudad") expect(select_options.third).to eq("Health: More health professionals") expect(select_options.fourth).to eq("Health: More hospitals") @@ -1036,18 +1036,18 @@ feature 'Budget Investments' do end - scenario 'Can access the community' do - Setting['feature.community'] = true + scenario "Can access the community" do + Setting["feature.community"] = true investment = create(:budget_investment, heading: heading) visit budget_investment_path(budget_id: budget.id, id: investment.id) expect(page).to have_content "Access the community" - Setting['feature.community'] = false + Setting["feature.community"] = false end - scenario 'Can not access the community' do - Setting['feature.community'] = false + scenario "Can not access the community" do + Setting["feature.community"] = false investment = create(:budget_investment, heading: heading) visit budget_investment_path(budget_id: budget.id, id: investment.id) @@ -1078,7 +1078,7 @@ feature 'Budget Investments' do group: group, heading: heading, price: 16, - price_explanation: 'Every wheel is 4 euros, so total is 16') + price_explanation: "Every wheel is 4 euros, so total is 16") end background do @@ -1174,7 +1174,7 @@ feature 'Budget Investments' do end scenario "Show (not selected budget investment)" do - budget.update(phase: 'balloting') + budget.update(phase: "balloting") user = create(:user) login_as(user) @@ -1219,7 +1219,7 @@ feature 'Budget Investments' do budget: budget, group: group, heading: heading, - unfeasibility_explanation: 'Local government is not competent in this matter') + unfeasibility_explanation: "Local government is not competent in this matter") visit budget_investment_path(budget_id: budget.id, id: investment.id) @@ -1237,7 +1237,7 @@ feature 'Budget Investments' do budget: budget, group: group, heading: heading, - unfeasibility_explanation: 'Local government is not competent in this matter') + unfeasibility_explanation: "Local government is not competent in this matter") visit budget_investment_path(budget_id: budget.id, id: investment.id) @@ -1300,7 +1300,7 @@ feature 'Budget Investments' do within("#budget_investment_#{sp1.id}") do expect(page).to have_content(sp1.title) - click_link('Delete') + click_link("Delete") end visit user_path(user, tab: :budget_investments) @@ -1483,25 +1483,25 @@ feature 'Budget Investments' do end end - scenario 'Order by cost (only when balloting)' do - mid_investment = create(:budget_investment, :selected, heading: heading, title: 'Build a nice house', price: 1000) + scenario "Order by cost (only when balloting)" do + mid_investment = create(:budget_investment, :selected, heading: heading, title: "Build a nice house", price: 1000) mid_investment.update_column(:confidence_score, 10) - low_investment = create(:budget_investment, :selected, heading: heading, title: 'Build an ugly house', price: 1000) + low_investment = create(:budget_investment, :selected, heading: heading, title: "Build an ugly house", price: 1000) low_investment.update_column(:confidence_score, 5) - high_investment = create(:budget_investment, :selected, heading: heading, title: 'Build a skyscraper', price: 20000) + high_investment = create(:budget_investment, :selected, heading: heading, title: "Build a skyscraper", price: 20000) visit budget_investments_path(budget, heading_id: heading.id) - click_link 'by price' - expect(page).to have_selector('a.is-active', text: 'by price') + click_link "by price" + expect(page).to have_selector("a.is-active", text: "by price") - within '#budget-investments' do + within "#budget-investments" do expect(high_investment.title).to appear_before(mid_investment.title) expect(mid_investment.title).to appear_before(low_investment.title) end - expect(current_url).to include('order=price') - expect(current_url).to include('page=1') + expect(current_url).to include("order=price") + expect(current_url).to include("page=1") end scenario "Show" do @@ -1526,11 +1526,11 @@ feature 'Budget Investments' do end scenario "Confirm", :js do - budget.update(phase: 'balloting') + budget.update(phase: "balloting") user = create(:user, :level_two) - global_group = create(:budget_group, budget: budget, name: 'Global Group') - global_heading = create(:budget_heading, group: global_group, name: 'Global Heading', + global_group = create(:budget_group, budget: budget, name: "Global Group") + global_heading = create(:budget_heading, group: global_group, name: "Global Heading", latitude: -43.145412, longitude: 12.009423) carabanchel_heading = create(:budget_heading, group: group, name: "Carabanchel") @@ -1622,19 +1622,19 @@ feature 'Budget Investments' do end end - scenario 'Ballot is visible' do + scenario "Ballot is visible" do login_as(author) visit budget_investments_path(budget, heading_id: heading.id) - expect(page).to have_link('Check my ballot') - expect(page).to have_css('#progress_bar') - within('#sidebar') do - expect(page).to have_content('My ballot') + expect(page).to have_link("Check my ballot") + expect(page).to have_css("#progress_bar") + within("#sidebar") do + expect(page).to have_content("My ballot") end end - scenario 'Show unselected budget investments' do + scenario "Show unselected budget investments" do investment1 = create(:budget_investment, :unselected, :feasible, heading: heading, valuation_finished: true) investment2 = create(:budget_investment, :selected, :feasible, heading: heading, valuation_finished: true) investment3 = create(:budget_investment, :selected, :feasible, heading: heading, valuation_finished: true) @@ -1643,7 +1643,7 @@ feature 'Budget Investments' do visit budget_investments_path(budget_id: budget.id, heading_id: heading.id, filter: "unselected") within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 1) + expect(page).to have_css(".budget-investment", count: 1) expect(page).to have_content(investment1.title) expect(page).not_to have_content(investment2.title) @@ -1653,11 +1653,11 @@ feature 'Budget Investments' do end scenario "Shows unselected link for group with one heading" do - group = create(:budget_group, name: 'All City', budget: budget) + group = create(:budget_group, name: "All City", budget: budget) heading = create(:budget_heading, name: "Madrid", group: group) visit budget_path(budget) - click_link 'See investments not selected for balloting phase' + click_link "See investments not selected for balloting phase" click_link "All City" @@ -1666,16 +1666,16 @@ feature 'Budget Investments' do end scenario "Shows unselected link for group with many headings" do - group = create(:budget_group, name: 'Districts', budget: budget) - heading1 = create(:budget_heading, name: 'Carabanchel', group: group) - heading2 = create(:budget_heading, name: 'Barajas', group: group) + group = create(:budget_group, name: "Districts", budget: budget) + heading1 = create(:budget_heading, name: "Carabanchel", group: group) + heading2 = create(:budget_heading, name: "Barajas", group: group) visit budget_path(budget) - click_link 'See investments not selected for balloting phase' + click_link "See investments not selected for balloting phase" - click_link 'Districts' - click_link 'Carabanchel' + click_link "Districts" + click_link "Carabanchel" expected_path = budget_investments_path(budget, heading_id: heading1.id, filter: "unselected") expect(page).to have_current_path(expected_path) @@ -1747,7 +1747,7 @@ feature 'Budget Investments' do end end - scenario 'Flagging an investment as innapropriate', :js do + scenario "Flagging an investment as innapropriate", :js do user = create(:user) investment = create(:budget_investment, heading: heading) @@ -1765,7 +1765,7 @@ feature 'Budget Investments' do expect(Flag.flagged?(user, investment)).to be end - scenario 'Unflagging an investment', :js do + scenario "Unflagging an investment", :js do user = create(:user) investment = create(:budget_investment, heading: heading) Flag.flag(user, investment) @@ -1784,7 +1784,7 @@ feature 'Budget Investments' do expect(Flag.flagged?(user, investment)).not_to be end - scenario 'Flagging an investment updates the DOM properly', :js do + scenario "Flagging an investment updates the DOM properly", :js do user = create(:user) investment = create(:budget_investment, heading: heading) @@ -1811,7 +1811,7 @@ feature 'Budget Investments' do expect(Flag.flagged?(user, investment)).not_to be end - context 'sidebar map' do + context "sidebar map" do scenario "Display 6 investment's markers on sidebar map", :js do investment1 = create(:budget_investment, heading: heading) investment2 = create(:budget_investment, heading: heading) diff --git a/spec/features/management/budget_investments_spec.rb b/spec/features/management/budget_investments_spec.rb index 3c204f7b5..b1ef635d4 100644 --- a/spec/features/management/budget_investments_spec.rb +++ b/spec/features/management/budget_investments_spec.rb @@ -1,11 +1,11 @@ -require 'rails_helper' +require "rails_helper" -feature 'Budget Investments' do +feature "Budget Investments" do background do login_as_manager - @budget = create(:budget, phase: 'selecting', name: "2033") - @group = create(:budget_group, budget: @budget, name: 'Whole city') + @budget = create(:budget, phase: "selecting", name: "2033") + @group = create(:budget_group, budget: @budget, name: "Whole city") @heading = create(:budget_heading, group: @group, name: "Health") end @@ -19,9 +19,9 @@ feature 'Budget Investments' do management = true context "Create" do - before { @budget.update(phase: 'accepting') } + before { @budget.update(phase: "accepting") } - scenario 'Creating budget investments on behalf of someone, selecting a budget' do + scenario "Creating budget investments on behalf of someone, selecting a budget" do user = create(:user, :level_two) login_managed_user(user) @@ -38,23 +38,23 @@ feature 'Budget Investments' do expect(page).to have_content user.document_number end - select "Health", from: 'budget_investment_heading_id' - fill_in 'budget_investment_title', with: 'Build a park in my neighborhood' - fill_in 'budget_investment_description', with: 'There is no parks here...' - fill_in 'budget_investment_location', with: 'City center' - fill_in 'budget_investment_organization_name', with: 'T.I.A.' - fill_in 'budget_investment_tag_list', with: 'green' + select "Health", from: "budget_investment_heading_id" + fill_in "budget_investment_title", with: "Build a park in my neighborhood" + fill_in "budget_investment_description", with: "There is no parks here..." + fill_in "budget_investment_location", with: "City center" + fill_in "budget_investment_organization_name", with: "T.I.A." + fill_in "budget_investment_tag_list", with: "green" - click_button 'Create Investment' + click_button "Create Investment" - expect(page).to have_content 'Investment created successfully.' + expect(page).to have_content "Investment created successfully." - expect(page).to have_content 'Health' - expect(page).to have_content 'Build a park in my neighborhood' - expect(page).to have_content 'There is no parks here...' - expect(page).to have_content 'City center' - expect(page).to have_content 'T.I.A.' - expect(page).to have_content 'green' + expect(page).to have_content "Health" + expect(page).to have_content "Build a park in my neighborhood" + expect(page).to have_content "There is no parks here..." + expect(page).to have_content "City center" + expect(page).to have_content "T.I.A." + expect(page).to have_content "green" expect(page).to have_content user.name expect(page).to have_content I18n.l(@budget.created_at.to_date) end @@ -88,7 +88,7 @@ feature 'Budget Investments' do click_button "Search" within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 1) + expect(page).to have_css(".budget-investment", count: 1) expect(page).to have_content(budget_investment1.title) expect(page).not_to have_content(budget_investment2.title) expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']", @@ -115,7 +115,7 @@ feature 'Budget Investments' do click_button "Search" within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 1) + expect(page).to have_css(".budget-investment", count: 1) expect(page).not_to have_content(budget_investment1.title) expect(page).to have_content(budget_investment2.title) expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']", @@ -145,7 +145,7 @@ feature 'Budget Investments' do end within("#budget-investments") do - expect(page).to have_css('.budget-investment', count: 2) + expect(page).to have_css(".budget-investment", count: 2) expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment1)}']", text: budget_investment1.title) expect(page).to have_css("a[href='#{management_budget_investment_path(@budget, budget_investment2)}']", @@ -210,7 +210,7 @@ feature 'Budget Investments' do context "Supporting" do - scenario 'Supporting budget investments on behalf of someone in index view', :js do + scenario "Supporting budget investments on behalf of someone in index view", :js do budget_investment = create(:budget_investment, budget: @budget, heading: @heading) user = create(:user, :level_two) @@ -232,7 +232,7 @@ feature 'Budget Investments' do end # This test passes ok locally but fails on the last two lines in Travis - xscenario 'Supporting budget investments on behalf of someone in show view', :js do + xscenario "Supporting budget investments on behalf of someone in show view", :js do budget_investment = create(:budget_investment, budget: @budget) user = create(:user, :level_two) @@ -248,7 +248,7 @@ feature 'Budget Investments' do click_link budget_investment.title end - find('.js-in-favor a').click + find(".js-in-favor a").click expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this. Share it!" end @@ -267,7 +267,7 @@ feature 'Budget Investments' do context "Printing" do - scenario 'Printing budget investments' do + scenario "Printing budget investments" do 16.times { create(:budget_investment, budget: @budget, heading: @heading) } click_link "Print budget investments" @@ -277,17 +277,17 @@ feature 'Budget Investments' do click_link "Print budget investments" end - expect(page).to have_css('.budget-investment', count: 15) - expect(page).to have_css("a[href='javascript:window.print();']", text: 'Print') + expect(page).to have_css(".budget-investment", count: 15) + expect(page).to have_css("a[href='javascript:window.print();']", text: "Print") end scenario "Filtering budget investments by heading to be printed", :js do district_9 = create(:budget_heading, group: @group, name: "District Nine") another_heading = create(:budget_heading, group: @group) - low_investment = create(:budget_investment, budget: @budget, title: 'Nuke district 9', heading: district_9, cached_votes_up: 1) - mid_investment = create(:budget_investment, budget: @budget, title: 'Change district 9', heading: district_9, cached_votes_up: 10) - top_investment = create(:budget_investment, budget: @budget, title: 'Destroy district 9', heading: district_9, cached_votes_up: 100) - unvoted_investment = create(:budget_investment, budget: @budget, heading: another_heading, title: 'Add new districts to the city') + low_investment = create(:budget_investment, budget: @budget, title: "Nuke district 9", heading: district_9, cached_votes_up: 1) + mid_investment = create(:budget_investment, budget: @budget, title: "Change district 9", heading: district_9, cached_votes_up: 10) + top_investment = create(:budget_investment, budget: @budget, title: "Destroy district 9", heading: district_9, cached_votes_up: 100) + unvoted_investment = create(:budget_investment, budget: @budget, heading: another_heading, title: "Add new districts to the city") user = create(:user, :level_two) login_managed_user(user) @@ -299,17 +299,17 @@ feature 'Budget Investments' do click_link "Print budget investments" end - within '#budget-investments' do + within "#budget-investments" do expect(page).to have_content(unvoted_investment.title) expect(page).to have_content(mid_investment.title) expect(page).to have_content(top_investment.title) expect(page).to have_content(low_investment.title) end - select 'Whole city: District Nine', from: 'heading_id' + select "Whole city: District Nine", from: "heading_id" click_button("Search") - within '#budget-investments' do + within "#budget-investments" do expect(page).not_to have_content(unvoted_investment.title) expect(top_investment.title).to appear_before(mid_investment.title) expect(mid_investment.title).to appear_before(low_investment.title) diff --git a/spec/shared/features/relationable.rb b/spec/shared/features/relationable.rb index f7bdba175..0771c21b2 100644 --- a/spec/shared/features/relationable.rb +++ b/spec/shared/features/relationable.rb @@ -48,7 +48,7 @@ shared_examples "relationable" do |relationable_model_name| end within("#related_content") do - fill_in 'url', with: "#{Setting['url'] + related2.url}" + fill_in "url", with: "#{Setting["url"] + related2.url}" click_button "Add" end @@ -78,7 +78,7 @@ shared_examples "relationable" do |relationable_model_name| click_on("Add related content") within("#related_content") do - fill_in 'url', with: Setting[:url] + relationable.url.to_s + fill_in "url", with: Setting[:url] + relationable.url.to_s click_button "Add" end From d894d24bffa808bb4794a6338443735799796d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 25 Mar 2019 13:23:09 +0100 Subject: [PATCH 2/4] Use double quotes in config/locales --- config/locales/en/activerecord.yml | 6 +-- config/locales/en/admin.yml | 22 +++++----- config/locales/en/budgets.yml | 14 +++--- config/locales/en/devise_views.yml | 8 ++-- config/locales/en/general.yml | 54 +++++++++++------------ config/locales/en/management.yml | 26 +++++------ config/locales/en/pages.yml | 8 ++-- config/locales/en/rails.yml | 14 +++--- config/locales/en/verification.yml | 6 +-- config/locales/es/activerecord.yml | 6 +-- config/locales/es/admin.yml | 34 +++++++-------- config/locales/es/budgets.yml | 14 +++--- config/locales/es/devise_views.yml | 20 ++++----- config/locales/es/documents.yml | 4 +- config/locales/es/general.yml | 62 +++++++++++++-------------- config/locales/es/images.yml | 2 +- config/locales/es/management.yml | 28 ++++++------ config/locales/es/moderation.yml | 10 ++--- config/locales/es/pages.yml | 8 ++-- config/locales/es/rails.yml | 4 +- config/locales/es/seeds.yml | 2 +- config/locales/es/verification.yml | 10 ++--- spec/features/admin/officials_spec.rb | 2 +- 23 files changed, 182 insertions(+), 182 deletions(-) diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml index 6b9467867..ed1a70880 100644 --- a/config/locales/en/activerecord.yml +++ b/config/locales/en/activerecord.yml @@ -382,8 +382,8 @@ en: signature: attributes: document_number: - not_in_census: 'Not verified by Census' - already_voted: 'Already voted this proposal' + not_in_census: "Not verified by Census" + already_voted: "Already voted this proposal" site_customization/page: attributes: slug: @@ -396,7 +396,7 @@ en: comment: attributes: valuation: - cannot_comment_valuation: 'You cannot comment a valuation' + cannot_comment_valuation: "You cannot comment a valuation" messages: record_invalid: "Validation failed: %{errors}" restrict_dependent_destroy: diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 44376c5d2..156702512 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -384,9 +384,9 @@ en: user: User no_hidden_users: There are no hidden users. show: - email: 'Email:' - hidden_at: 'Hidden at:' - registered_at: 'Registered at:' + email: "Email:" + hidden_at: "Hidden at:" + registered_at: "Registered at:" title: Activity of user (%{user}) hidden_budget_investments: index: @@ -577,7 +577,7 @@ en: add: Add delete: Delete search: - title: 'Managers: User search' + title: "Managers: User search" menu: activity: Moderator activity admin: Admin menu @@ -662,7 +662,7 @@ en: add: Add delete: Delete search: - title: 'Moderators: User search' + title: "Moderators: User search" segment_recipient: all_users: All users administrators: Administrators @@ -816,7 +816,7 @@ en: add: Add to valuators delete: Delete search: - title: 'Valuators: User search' + title: "Valuators: User search" summary: title: Valuator summary for investment projects valuator_name: Valuator @@ -1091,10 +1091,10 @@ en: edit: "Edit booth" officials: edit: - destroy: Remove 'Official' status - title: 'Officials: Edit user' + destroy: Remove "Official" status + title: "Officials: Edit user" flash: - official_destroyed: 'Details saved: the user is no longer an official' + official_destroyed: "Details saved: the user is no longer an official" official_updated: Details of official saved index: title: Officials @@ -1112,7 +1112,7 @@ en: search: edit_official: Edit official make_official: Make official - title: 'Official positions: User search' + title: "Official positions: User search" no_results: Official positions not found. organizations: index: @@ -1305,7 +1305,7 @@ en: form: error: one: "error prevented this geozone from being saved" - other: 'errors prevented this geozone from being saved' + other: "errors prevented this geozone from being saved" edit: form: submit_button: Save changes diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index f6513dfa0..107b6d747 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -111,9 +111,9 @@ en: author_deleted: User deleted price_explanation: Price explanation unfeasibility_explanation: Unfeasibility explanation - code_html: 'Investment project code: %{code}' - location_html: 'Location: %{location}' - organization_name_html: 'Proposed on behalf of: %{name}' + code_html: "Investment project code: %{code}" + location_html: "Location: %{location}" + organization_name_html: "Proposed on behalf of: %{name}" share: Share title: Investment project supports: Supports @@ -122,10 +122,10 @@ en: comments_tab: Comments milestones_tab: Milestones author: Author - project_unfeasible_html: 'This investment project has been marked as not feasible and will not go to balloting phase.' - project_selected_html: 'This investment project has been selected for balloting phase.' - project_winner: 'Winning investment project' - project_not_selected_html: 'This investment project has not been selected for balloting phase.' + project_unfeasible_html: "This investment project has been marked as not feasible and will not go to balloting phase." + project_selected_html: "This investment project has been selected for balloting phase." + project_winner: "Winning investment project" + project_not_selected_html: "This investment project has not been selected for balloting phase." see_price_explanation: See price explanation wrong_price_format: Only integer numbers investment: diff --git a/config/locales/en/devise_views.yml b/config/locales/en/devise_views.yml index 61c7b3369..41ceae937 100644 --- a/config/locales/en/devise_views.yml +++ b/config/locales/en/devise_views.yml @@ -15,7 +15,7 @@ en: mailer: confirmation_instructions: confirm_link: Confirm my account - text: 'You can confirm your email account at the following link:' + text: "You can confirm your email account at the following link:" title: Welcome welcome: Welcome reset_password_instructions: @@ -23,12 +23,12 @@ en: hello: Hello ignore_text: If you did not request a password change, you can ignore this email. info_text: Your password will not be changed unless you access the link and edit it. - text: 'We have received a request to change your password. You can do this at the following link:' + text: "We have received a request to change your password. You can do this at the following link:" title: Change your password unlock_instructions: hello: Hello info_text: Your account has been blocked due to an excessive number of failed sign-in attempts. - instructions_text: 'Please click on this link to unlock your account:' + instructions_text: "Please click on this link to unlock your account:" title: Your account has been locked unlock_link: Unlock my account menu: @@ -103,7 +103,7 @@ en: password_confirmation_label: Confirm new password password_label: New password update_submit: Update - waiting_for: 'Awaiting confirmation of:' + waiting_for: "Awaiting confirmation of:" new: cancel: Cancel login email_label: Email diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index d9c1d7949..da726eaa4 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -67,7 +67,7 @@ en: most_commented: Most commented select_order: Sort by show: - return_to_commentable: 'Go back to ' + return_to_commentable: "Go back to " comments_helper: comment_button: Publish comment comment_link: Comment @@ -219,7 +219,7 @@ en: available_locales: Available languages collaborative_legislation: Collaborative legislation debates: Debates - locale: 'Language:' + locale: "Language:" logo: CONSUL logo management: Management moderation: Moderation @@ -241,7 +241,7 @@ en: notifications: Notifications no_notifications: "You don't have new notifications" admin: - watch_form_message: 'You have unsaved changes. Do you confirm to leave the page?' + watch_form_message: "You have unsaved changes. Do you confirm to leave the page?" notifications: index: empty_notifications: You don't have new notifications. @@ -368,7 +368,7 @@ en: one: " containing the term '%{search_term}'" other: " containing the term '%{search_term}'" select_order: Order by - select_order_long: 'You are viewing proposals according to:' + select_order_long: "You are viewing proposals according to:" start_proposal: Create a proposal title: Proposals top: Top weekly @@ -418,7 +418,7 @@ en: successful: "This proposal has reached the required supports." show: author_deleted: User deleted - code: 'Proposal code:' + code: "Proposal code:" comments: one: 1 comment other: "%{count} comments" @@ -523,29 +523,29 @@ en: show: back: "Go back to my activity" shared: - edit: 'Edit' - save: 'Save' - delete: 'Delete' + edit: "Edit" + save: "Save" + delete: "Delete" "yes": "Yes" "no": "No" search_results: "Search results" advanced_search: - author_type: 'By author category' - author_type_blank: 'Select a category' - date: 'By date' - date_placeholder: 'DD/MM/YYYY' - date_range_blank: 'Choose a date' - date_1: 'Last 24 hours' - date_2: 'Last week' - date_3: 'Last month' - date_4: 'Last year' - date_5: 'Customized' - from: 'From' - general: 'With the text' - general_placeholder: 'Write the text' - search: 'Filter' - title: 'Advanced search' - to: 'To' + author_type: "By author category" + author_type_blank: "Select a category" + date: "By date" + date_placeholder: "DD/MM/YYYY" + date_range_blank: "Choose a date" + date_1: "Last 24 hours" + date_2: "Last week" + date_3: "Last month" + date_4: "Last year" + date_5: "Customized" + from: "From" + general: "With the text" + general_placeholder: "Write the text" + search: "Filter" + title: "Advanced search" + to: "To" delete: Delete author_info: author_deleted: User deleted @@ -628,8 +628,8 @@ en: instagram: "%{org} Instagram" spending_proposals: form: - association_name_label: 'If you propose in name of an assocation or collective add the name here' - association_name: 'Association name' + association_name_label: "If you propose in name of an assocation or collective add the name here" + association_name: "Association name" description: Description external_url: Link to additional documentation geozone: Scope of operation @@ -662,7 +662,7 @@ en: start_new: Create spending proposal show: author_deleted: User deleted - code: 'Proposal code:' + code: "Proposal code:" share: Share wrong_price_format: Only integer numbers spending_proposal: diff --git a/config/locales/en/management.yml b/config/locales/en/management.yml index 8d512e287..8b5863fc4 100644 --- a/config/locales/en/management.yml +++ b/config/locales/en/management.yml @@ -9,7 +9,7 @@ en: show: title: User account edit: - title: 'Edit user account: Reset password' + title: "Edit user account: Reset password" back: Back password: password: Password @@ -22,11 +22,11 @@ en: print_help: You will be able to print the password when it is saved. account_info: change_user: Change user - document_number_label: 'Document number:' - document_type_label: 'Document type:' - email_label: 'Email:' - identified_label: 'Identified as:' - username_label: 'Username:' + document_number_label: "Document number:" + document_type_label: "Document type:" + email_label: "Email:" + identified_label: "Identified as:" + username_label: "Username:" check: Check document dashboard: index: @@ -36,11 +36,11 @@ en: document_type_label: Document type document_verifications: already_verified: This user account is already verified. - has_no_account_html: In order to create an account, go to %{link} and click in 'Register' in the upper-left part of the screen. + has_no_account_html: In order to create an account, go to %{link} and click in "Register" in the upper-left part of the screen. link: CONSUL - in_census_has_following_permissions: 'This user can participate in the website with the following permissions:' + in_census_has_following_permissions: "This user can participate in the website with the following permissions:" not_in_census: This document is not registered. - not_in_census_info: 'Citizens not in the Census can participate in the website with the following permissions:' + not_in_census_info: "Citizens not in the Census can participate in the website with the following permissions:" please_check_account_data: Please check that the account data above are correct. title: User management under_age: "You don't have the required age to verify your account." @@ -49,14 +49,14 @@ en: date_of_birth: Date of birth email_verifications: already_verified: This user account is already verified. - choose_options: 'Please choose one of the following options:' + choose_options: "Please choose one of the following options:" document_found_in_census: This document was found in the census, but it has no user account associated to it. - document_mismatch: 'This email belongs to a user which already has an associated id: %{document_number}(%{document_type})' + document_mismatch: "This email belongs to a user which already has an associated id: %{document_number}(%{document_type})" email_placeholder: Write the email this person used to create his or her account email_sent_instructions: In order to completely verify this user, it is necessary that the user clicks on a link which we have sent to the email address above. This step is needed in order to confirm that the address belongs to him. if_existing_account: If the person has already a user account created in the website, if_no_existing_account: If this person has not created an account yet - introduce_email: 'Please introduce the email used on the account:' + introduce_email: "Please introduce the email used on the account:" send_email: Send verification email menu: create_proposal: Create proposal @@ -78,7 +78,7 @@ en: vote_proposals: Vote proposals print: proposals_info: Create your proposal on http://url.consul - proposals_title: 'Proposals:' + proposals_title: "Proposals:" spending_proposals_info: Participate at http://url.consul budget_investments_info: Participate at http://url.consul print_info: Print this info diff --git a/config/locales/en/pages.yml b/config/locales/en/pages.yml index af20e3ffd..d612f5b72 100644 --- a/config/locales/en/pages.yml +++ b/config/locales/en/pages.yml @@ -98,7 +98,7 @@ en: - key_column: 5 page_column: Legislative processes browser_table: - description: 'Depending on the operating system and the browser used, the key combination will be as follows:' + description: "Depending on the operating system and the browser used, the key combination will be as follows:" caption: Key combination depending on the operating system and browser browser_header: Browser key_header: Key combination @@ -131,7 +131,7 @@ en: - browser_column: Opera action_column: View > scale browser_shortcuts_table: - description: 'Another way to modify the text size is to use the keyboard shortcuts defined in browsers, in particular the key combination:' + description: "Another way to modify the text size is to use the keyboard shortcuts defined in browsers, in particular the key combination:" rows: - shortcut_column: CTRL and + (CMD and + on MAC) description_column: Increases text size @@ -145,8 +145,8 @@ en: verify: code: Code you received in letter email: Email - info: 'To verify your account introduce your access data:' - info_code: 'Now introduce the code you received in letter:' + info: "To verify your account introduce your access data:" + info_code: "Now introduce the code you received in letter:" password: Password submit: Verify my account title: Verify your account diff --git a/config/locales/en/rails.yml b/config/locales/en/rails.yml index ff13877da..e02f9c797 100644 --- a/config/locales/en/rails.yml +++ b/config/locales/en/rails.yml @@ -4,11 +4,11 @@ # # To use the locales, use `I18n.t`: # -# I18n.t 'hello' +# I18n.t "hello" # # In views, this is aliased to just `t`: # -# <%= t('hello') %> +# <%= t("hello") %> # # To use a different locale, set it with `I18n.locale`: # @@ -148,7 +148,7 @@ en: other: is the wrong length (should be %{count} characters) other_than: must be other than %{count} template: - body: 'There were problems with the following fields:' + body: "There were problems with the following fields:" header: one: 1 error prohibited this %{model} from being saved other: "%{count} errors prohibited this %{model} from being saved" @@ -184,9 +184,9 @@ en: quadrillion: Quadrillion thousand: Thousand trillion: Trillion - unit: '' + unit: "" format: - delimiter: '' + delimiter: "" precision: 3 significant: true strip_insignificant_zeros: true @@ -202,11 +202,11 @@ en: tb: TB percentage: format: - delimiter: '' + delimiter: "" format: "%n%" precision: format: - delimiter: '' + delimiter: "" support: array: last_word_connector: ", and " diff --git a/config/locales/en/verification.yml b/config/locales/en/verification.yml index 8172acb76..a93e6d507 100644 --- a/config/locales/en/verification.yml +++ b/config/locales/en/verification.yml @@ -8,7 +8,7 @@ en: alert: failure: There was a problem with sending an email to your account flash: - success: 'We have sent a confirmation email to your account: %{email}' + success: "We have sent a confirmation email to your account: %{email}" show: alert: failure: Verification code incorrect @@ -26,7 +26,7 @@ en: errors: incorrect_code: Verification code incorrect new: - explanation: 'For participate on final voting you can:' + explanation: "For participate on final voting you can:" go_to_index: See proposals office: Verify in any Citizen Support Offices send_letter: Send me a letter with the code @@ -50,7 +50,7 @@ en: date_of_birth: Date of birth document_number: Document number document_number_help_title: Help - document_number_help_text_html: 'DNI: 12345678A
Passport: AAA000001
Residence card: X1234567P' + document_number_help_text_html: "DNI: 12345678A
Passport: AAA000001
Residence card: X1234567P" document_type: passport: Passport residence_card: Residence card diff --git a/config/locales/es/activerecord.yml b/config/locales/es/activerecord.yml index 59341c3a8..e85cd5110 100644 --- a/config/locales/es/activerecord.yml +++ b/config/locales/es/activerecord.yml @@ -382,8 +382,8 @@ es: signature: attributes: document_number: - not_in_census: 'No verificado por Padrón' - already_voted: 'Ya ha votado esta propuesta' + not_in_census: "No verificado por Padrón" + already_voted: "Ya ha votado esta propuesta" site_customization/page: attributes: slug: @@ -396,7 +396,7 @@ es: comment: attributes: valuation: - cannot_comment_valuation: 'No puedes comentar una evaluación' + cannot_comment_valuation: "No puedes comentar una evaluación" messages: record_invalid: "Error de validación: %{errors}" restrict_dependent_destroy: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index dab5eccdb..456238bcc 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -4,7 +4,7 @@ es: title: Administración actions: actions: Acciones - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" confirm_hide: Confirmar moderación hide: Ocultar hide_author: Bloquear al autor @@ -87,7 +87,7 @@ es: edit_budget: Editar presupuesto no_budgets: "No hay presupuestos participativos." create: - notice: '¡Presupuestos participativos creados con éxito!' + notice: "¡Presupuestos participativos creados con éxito!" update: notice: Presupuestos participativos actualizados edit: @@ -300,7 +300,7 @@ es: edit: title: Editar hito create: - notice: '¡Nuevo hito creado con éxito!' + notice: "¡Nuevo hito creado con éxito!" update: notice: Hito actualizado delete: @@ -384,9 +384,9 @@ es: user: Usuario no_hidden_users: No hay usuarios bloqueados. show: - email: 'Email:' - hidden_at: 'Bloqueado:' - registered_at: 'Fecha de alta:' + email: "Email:" + hidden_at: "Bloqueado:" + registered_at: "Fecha de alta:" title: Actividad del usuario (%{user}) hidden_budget_investments: index: @@ -576,7 +576,7 @@ es: add: Añadir como gestor delete: Borrar search: - title: 'Gestores: Búsqueda de usuarios' + title: "Gestores: Búsqueda de usuarios" menu: activity: Actividad de moderadores admin: Menú de administración @@ -661,7 +661,7 @@ es: add: Añadir como Moderador delete: Borrar search: - title: 'Moderadores: Búsqueda de usuarios' + title: "Moderadores: Búsqueda de usuarios" segment_recipient: all_users: Todos los usuarios administrators: Administradores @@ -707,7 +707,7 @@ es: from: Dirección de correo electrónico que aparecerá como remitente de la newsletter body: Contenido del email body_help_text: Así es como verán el email los usuarios - send_alert: '¿Estás seguro/a de que quieres enviar esta newsletter a %{n} usuarios?' + send_alert: "¿Estás seguro/a de que quieres enviar esta newsletter a %{n} usuarios?" admin_notifications: create_success: Notificación creada correctamente update_success: Notificación actualizada correctamente @@ -744,7 +744,7 @@ es: segment_recipient: Destinatarios preview_guide: "Así es como los usuarios verán la notificación:" sent_guide: "Así es como los usuarios ven la notificación:" - send_alert: '¿Estás seguro/a de que quieres enviar esta notificación a %{n} usuarios?' + send_alert: "¿Estás seguro/a de que quieres enviar esta notificación a %{n} usuarios?" system_emails: preview_pending: action: Previsualizar pendientes @@ -815,7 +815,7 @@ es: add: Añadir como evaluador delete: Borrar search: - title: 'Evaluadores: Búsqueda de usuarios' + title: "Evaluadores: Búsqueda de usuarios" summary: title: Resumen de evaluación de proyectos de gasto valuator_name: Evaluador @@ -1090,10 +1090,10 @@ es: edit: "Editar urna" officials: edit: - destroy: Eliminar condición de 'Cargo Público' - title: 'Cargos Públicos: Editar usuario' + destroy: Eliminar condición de "Cargo Público" + title: "Cargos Públicos: Editar usuario" flash: - official_destroyed: 'Datos guardados: el usuario ya no es cargo público' + official_destroyed: "Datos guardados: el usuario ya no es cargo público" official_updated: Datos del cargo público guardados index: title: Cargos Públicos @@ -1111,7 +1111,7 @@ es: search: edit_official: Editar cargo público make_official: Convertir en cargo público - title: 'Cargos Públicos: Búsqueda de usuarios' + title: "Cargos Públicos: Búsqueda de usuarios" no_results: No se han encontrado cargos públicos. organizations: index: @@ -1183,7 +1183,7 @@ es: disable: "Desactivar" map: title: Configuración del mapa - help: Aquí puedes personalizar la manera en la que se muestra el mapa a los usuarios. Arrastra el marcador o pulsa sobre cualquier parte del mapa, ajusta el zoom y pulsa el botón 'Actualizar'. + help: Aquí puedes personalizar la manera en la que se muestra el mapa a los usuarios. Arrastra el marcador o pulsa sobre cualquier parte del mapa, ajusta el zoom y pulsa el botón "Actualizar". flash: update: La configuración del mapa se ha guardado correctamente. form: @@ -1304,7 +1304,7 @@ es: form: error: one: "error impidió guardar la zona." - other: 'errores impidieron guardar la zona.' + other: "errores impidieron guardar la zona." edit: form: submit_button: Guardar cambios diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml index 75c0edf36..123b77f21 100644 --- a/config/locales/es/budgets.yml +++ b/config/locales/es/budgets.yml @@ -111,9 +111,9 @@ es: author_deleted: Usuario eliminado price_explanation: Informe de coste unfeasibility_explanation: Informe de inviabilidad - code_html: 'Código proyecto de gasto: %{code}' - location_html: 'Ubicación: %{location}' - organization_name_html: 'Propuesto en nombre de: %{name}' + code_html: "Código proyecto de gasto: %{code}" + location_html: "Ubicación: %{location}" + organization_name_html: "Propuesto en nombre de: %{name}" share: Compartir title: Proyecto de gasto supports: Apoyos @@ -122,10 +122,10 @@ es: comments_tab: Comentarios milestones_tab: Seguimiento author: Autor - project_unfeasible_html: 'Este proyecto de gasto ha sido marcado como inviable y no pasará a la fase de votación.' - project_selected_html: 'Este proyecto de gasto ha sido seleccionado para la fase de votación.' - project_winner: 'Proyecto de gasto ganador' - project_not_selected_html: 'Este proyecto de gasto no ha sido seleccionado para la fase de votación.' + project_unfeasible_html: "Este proyecto de gasto ha sido marcado como inviable y no pasará a la fase de votación." + project_selected_html: "Este proyecto de gasto ha sido seleccionado para la fase de votación." + project_winner: "Proyecto de gasto ganador" + project_not_selected_html: "Este proyecto de gasto no ha sido seleccionado para la fase de votación." see_price_explanation: Ver informe de coste wrong_price_format: Solo puede incluir caracteres numéricos investment: diff --git a/config/locales/es/devise_views.yml b/config/locales/es/devise_views.yml index 9ae148cbc..c3cd23cba 100644 --- a/config/locales/es/devise_views.yml +++ b/config/locales/es/devise_views.yml @@ -15,7 +15,7 @@ es: mailer: confirmation_instructions: confirm_link: Confirmar mi cuenta - text: 'Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:' + text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:" title: Bienvenido/a welcome: Bienvenido/a reset_password_instructions: @@ -23,12 +23,12 @@ es: hello: Hola ignore_text: Si tú no lo has solicitado, puedes ignorar este email. info_text: Tu contraseña no cambiará hasta que no accedas al enlace y la modifiques. - text: 'Se ha solicitado cambiar tu contraseña, puedes hacerlo en el siguiente enlace:' + text: "Se ha solicitado cambiar tu contraseña, puedes hacerlo en el siguiente enlace:" title: Cambia tu contraseña unlock_instructions: hello: Hola info_text: Tu cuenta ha sido bloqueada debido a un excesivo número de intentos fallidos de alta. - instructions_text: 'Sigue el siguiente enlace para desbloquear tu cuenta:' + instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:" title: Tu cuenta ha sido bloqueada unlock_link: Desbloquear mi cuenta menu: @@ -64,7 +64,7 @@ es: new: email_label: Email send_submit: Recibir instrucciones - title: '¿Has olvidado tu contraseña?' + title: "¿Has olvidado tu contraseña?" sessions: new: login_label: Email o nombre de usuario @@ -75,11 +75,11 @@ es: shared: links: login: Entrar - new_confirmation: '¿No has recibido instrucciones para confirmar tu cuenta?' - new_password: '¿Olvidaste tu contraseña?' - new_unlock: '¿No has recibido instrucciones para desbloquear?' + new_confirmation: "¿No has recibido instrucciones para confirmar tu cuenta?" + new_password: "¿Olvidaste tu contraseña?" + new_unlock: "¿No has recibido instrucciones para desbloquear?" signin_with_provider: Entrar con %{provider} - signup: '¿No tienes una cuenta? %{signup_link}' + signup: "¿No tienes una cuenta? %{signup_link}" signup_link: Regístrate unlocks: new: @@ -103,11 +103,11 @@ es: password_confirmation_label: Confirmar contraseña nueva password_label: Contraseña nueva update_submit: Actualizar - waiting_for: 'Esperando confirmación de:' + waiting_for: "Esperando confirmación de:" new: cancel: Cancelar login email_label: Tu correo electrónico - organization_signup: '¿Representas a una organización / colectivo? %{signup_link}' + organization_signup: "¿Representas a una organización / colectivo? %{signup_link}" organization_signup_link: Regístrate aquí password_confirmation_label: Repite la contraseña anterior password_label: Contraseña que utilizarás para acceder a este sitio web diff --git a/config/locales/es/documents.yml b/config/locales/es/documents.yml index d7fe47fe8..4e9f9f1f5 100644 --- a/config/locales/es/documents.yml +++ b/config/locales/es/documents.yml @@ -1,7 +1,7 @@ es: documents: title: Documentos - max_documents_allowed_reached_html: '¡Has alcanzado el número máximo de documentos permitidos! Tienes que eliminar uno antes de poder subir otro.' + max_documents_allowed_reached_html: "¡Has alcanzado el número máximo de documentos permitidos! Tienes que eliminar uno antes de poder subir otro." form: title: Documentos title_placeholder: Añade un título descriptivo para el documento @@ -14,7 +14,7 @@ es: destroy: notice: El documento se ha eliminado correctamente. alert: El documento no se ha podido eliminar. - confirm: '¿Está seguro de que desea eliminar el documento? Esta acción no se puede deshacer!' + confirm: "¿Está seguro de que desea eliminar el documento? Esta acción no se puede deshacer!" buttons: download_document: Descargar archivo destroy_document: Eliminar documento diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 8c0aad6f9..0ee7085f1 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -67,7 +67,7 @@ es: most_commented: Más comentados select_order: Ordenar por show: - return_to_commentable: 'Volver a ' + return_to_commentable: "Volver a " comments_helper: comment_button: Publicar comentario comment_link: Comentar @@ -219,7 +219,7 @@ es: available_locales: Idiomas disponibles collaborative_legislation: Legislación colaborativa debates: Debates - locale: 'Idioma:' + locale: "Idioma:" logo: Logo de CONSUL management: Gestión moderation: Moderar @@ -241,7 +241,7 @@ es: notifications: Notificaciones no_notifications: "No tienes notificaciones nuevas" admin: - watch_form_message: 'Has realizado cambios que no han sido guardados. ¿Seguro que quieres abandonar la página?' + watch_form_message: "Has realizado cambios que no han sido guardados. ¿Seguro que quieres abandonar la página?" notifications: index: empty_notifications: No tienes notificaciones nuevas. @@ -368,7 +368,7 @@ es: one: " que contiene '%{search_term}'" other: " que contienen '%{search_term}'" select_order: Ordenar por - select_order_long: 'Estas viendo las propuestas' + select_order_long: "Estas viendo las propuestas" start_proposal: Crea una propuesta title: Propuestas ciudadanas top: Top semanal @@ -383,7 +383,7 @@ es: new: form: submit_button: Crear propuesta - more_info: '¿Cómo funcionan las propuestas ciudadanas?' + more_info: "¿Cómo funcionan las propuestas ciudadanas?" recommendation_one: No escribas el título de la propuesta o frases enteras en mayúsculas. En internet eso se considera gritar. Y a nadie le gusta que le griten. recommendation_three: Disfruta de este espacio, de las voces que lo llenan, también es tuyo. recommendation_two: Cualquier propuesta o comentario que implique una acción ilegal será eliminada, también las que tengan la intención de sabotear los espacios de propuesta, todo lo demás está permitido. @@ -397,7 +397,7 @@ es: guide: "Compártela para que la gente empiece a apoyarla." edit: "Antes de que se publique podrás modificar el texto a tu gusto." view_proposal: Ahora no, ir a mi propuesta - already_supported: '¡Ya has apoyado esta propuesta, compártela!' + already_supported: "¡Ya has apoyado esta propuesta, compártela!" comments: zero: Sin comentarios one: 1 Comentario @@ -418,7 +418,7 @@ es: successful: "Esta propuesta ha alcanzado los apoyos necesarios." show: author_deleted: Usuario eliminado - code: 'Código de la propuesta:' + code: "Código de la propuesta:" comments: zero: Sin comentarios one: 1 Comentario @@ -523,29 +523,29 @@ es: show: back: "Volver a mi actividad" shared: - edit: 'Editar' - save: 'Guardar' + edit: "Editar" + save: "Guardar" delete: Borrar "yes": "Si" "no": "No" search_results: "Resultados de la búsqueda" advanced_search: - author_type: 'Por categoría de autor' - author_type_blank: 'Elige una categoría' - date: 'Por fecha' - date_placeholder: 'DD/MM/AAAA' - date_range_blank: 'Elige una fecha' - date_1: 'Últimas 24 horas' - date_2: 'Última semana' - date_3: 'Último mes' - date_4: 'Último año' - date_5: 'Personalizada' - from: 'Desde' - general: 'Con el texto' - general_placeholder: 'Escribe el texto' - search: 'Filtrar' - title: 'Búsqueda avanzada' - to: 'Hasta' + author_type: "Por categoría de autor" + author_type_blank: "Elige una categoría" + date: "Por fecha" + date_placeholder: "DD/MM/AAAA" + date_range_blank: "Elige una fecha" + date_1: "Últimas 24 horas" + date_2: "Última semana" + date_3: "Último mes" + date_4: "Último año" + date_5: "Personalizada" + from: "Desde" + general: "Con el texto" + general_placeholder: "Escribe el texto" + search: "Filtrar" + title: "Búsqueda avanzada" + to: "Hasta" author_info: author_deleted: Usuario eliminado back: Volver @@ -627,8 +627,8 @@ es: instagram: "Instagram de %{org}" spending_proposals: form: - association_name_label: 'Si propones en nombre de una asociación o colectivo añade el nombre aquí' - association_name: 'Nombre de la asociación' + association_name_label: "Si propones en nombre de una asociación o colectivo añade el nombre aquí" + association_name: "Nombre de la asociación" description: Descripción detallada external_url: Enlace a documentación adicional geozone: Ámbito de actuación @@ -653,7 +653,7 @@ es: unfeasible: No viables start_spending_proposal: Crea una propuesta de inversión new: - more_info: '¿Cómo funcionan los presupuestos participativos?' + more_info: "¿Cómo funcionan los presupuestos participativos?" recommendation_one: Es fundamental que haga referencia a una actuación presupuestable. recommendation_three: Intenta detallar lo máximo posible la propuesta para que el equipo de gobierno encargado de estudiarla tenga las menor dudas posibles. recommendation_two: Cualquier propuesta o comentario que implique acciones ilegales será eliminada. @@ -661,7 +661,7 @@ es: start_new: Crear una propuesta de gasto show: author_deleted: Usuario eliminado - code: 'Código de la propuesta:' + code: "Código de la propuesta:" share: Compartir wrong_price_format: Solo puede incluir caracteres numéricos spending_proposal: @@ -795,7 +795,7 @@ es: verification: i_dont_have_an_account: No tengo cuenta, quiero crear una y verificarla i_have_an_account: Ya tengo una cuenta que quiero verificar - question: '¿Tienes ya una cuenta en %{org_name}?' + question: "¿Tienes ya una cuenta en %{org_name}?" title: Verificación de cuenta welcome: go_to_index: Ahora no, ir a la página de inicio @@ -838,4 +838,4 @@ es: text: Para comentar este documento debes %{sign_in} o %{sign_up}. Después selecciona el texto que quieres comentar y pulsa en el botón con el lápiz. text_sign_in: iniciar sesión text_sign_up: registrarte - title: '¿Cómo puedo comentar este documento?' + title: "¿Cómo puedo comentar este documento?" diff --git a/config/locales/es/images.yml b/config/locales/es/images.yml index 9ce59050e..d7c4c6580 100644 --- a/config/locales/es/images.yml +++ b/config/locales/es/images.yml @@ -14,7 +14,7 @@ es: destroy: notice: La imagen se ha eliminado correctamente. alert: La imagen no se ha podido eliminar. - confirm: '¿Está seguro de que desea eliminar la imagen? Esta acción no se puede deshacer!' + confirm: "¿Está seguro de que desea eliminar la imagen? Esta acción no se puede deshacer!" errors: messages: in_between: debe estar entre %{min} y %{max} diff --git a/config/locales/es/management.yml b/config/locales/es/management.yml index 0c500aa03..065617ed9 100644 --- a/config/locales/es/management.yml +++ b/config/locales/es/management.yml @@ -9,7 +9,7 @@ es: show: title: Cuenta de usuario edit: - title: 'Editar cuenta de usuario: Restablecer contraseña' + title: "Editar cuenta de usuario: Restablecer contraseña" back: Volver password: password: Contraseña @@ -22,11 +22,11 @@ es: print_help: Podrás imprimir la contraseña cuando se haya guardado. account_info: change_user: Cambiar usuario - document_number_label: 'Número de documento:' - document_type_label: 'Tipo de documento:' - email_label: 'Email:' - identified_label: 'Identificado como:' - username_label: 'Usuario:' + document_number_label: "Número de documento:" + document_type_label: "Tipo de documento:" + email_label: "Email:" + identified_label: "Identificado como:" + username_label: "Usuario:" check: Comprobar documento dashboard: index: @@ -36,11 +36,11 @@ es: document_type_label: Tipo de documento document_verifications: already_verified: Esta cuenta de usuario ya está verificada. - has_no_account_html: Para crear un usuario entre en %{link} y haga clic en la opción 'Registrarse' en la parte superior derecha de la pantalla. + has_no_account_html: Para crear un usuario entre en %{link} y haga clic en la opción "Registrarse" en la parte superior derecha de la pantalla. link: CONSUL - in_census_has_following_permissions: 'Este usuario puede participar en el Portal de Gobierno Abierto con las siguientes posibilidades:' + in_census_has_following_permissions: "Este usuario puede participar en el Portal de Gobierno Abierto con las siguientes posibilidades:" not_in_census: Este documento no está registrado. - not_in_census_info: 'Las personas no empadronadas pueden participar en el Portal de Gobierno Abierto con las siguientes posibilidades:' + not_in_census_info: "Las personas no empadronadas pueden participar en el Portal de Gobierno Abierto con las siguientes posibilidades:" please_check_account_data: Compruebe que los datos anteriores son correctos para proceder a verificar la cuenta completamente. title: Gestión de usuarios under_age: "No tienes edad suficiente para verificar tu cuenta." @@ -49,14 +49,14 @@ es: date_of_birth: Fecha de nacimiento email_verifications: already_verified: Esta cuenta de usuario ya está verificada. - choose_options: 'Elige una de las opciones siguientes:' + choose_options: "Elige una de las opciones siguientes:" document_found_in_census: Este documento está en el registro del padrón municipal, pero todavía no tiene una cuenta de usuario asociada. - document_mismatch: 'Ese email corresponde a un usuario que ya tiene asociado el documento %{document_number}(%{document_type})' + document_mismatch: "Ese email corresponde a un usuario que ya tiene asociado el documento %{document_number}(%{document_type})" email_placeholder: Introduce el email de registro email_sent_instructions: Para terminar de verificar esta cuenta es necesario que haga clic en el enlace que le hemos enviado a la dirección de correo que figura arriba. Este paso es necesario para confirmar que dicha cuenta de usuario es suya. if_existing_account: Si la persona ya ha creado una cuenta de usuario en la web if_no_existing_account: Si la persona todavía no ha creado una cuenta de usuario en la web - introduce_email: 'Introduce el email con el que creó la cuenta:' + introduce_email: "Introduce el email con el que creó la cuenta:" send_email: Enviar email de verificación menu: create_proposal: Crear propuesta @@ -78,7 +78,7 @@ es: vote_proposals: Participar en las votaciones finales print: proposals_info: Haz tu propuesta en http://url.consul - proposals_title: 'Propuestas:' + proposals_title: "Propuestas:" spending_proposals_info: Participa en http://url.consul budget_investments_info: Participa en http://url.consul print_info: Imprimir esta información @@ -136,7 +136,7 @@ es: erased_notice: Cuenta de usuario borrada. erased_by_manager: "Borrada por el manager: %{manager}" erase_account_link: Borrar cuenta - erase_account_confirm: '¿Seguro que quieres borrar a este usuario? Esta acción no se puede deshacer' + erase_account_confirm: "¿Seguro que quieres borrar a este usuario? Esta acción no se puede deshacer" erase_warning: Esta acción no se puede deshacer. Por favor asegúrese de que quiere eliminar esta cuenta. erase_submit: Borrar cuenta user_invites: diff --git a/config/locales/es/moderation.yml b/config/locales/es/moderation.yml index a31d7b6c5..0c5024c56 100644 --- a/config/locales/es/moderation.yml +++ b/config/locales/es/moderation.yml @@ -3,7 +3,7 @@ es: comments: index: block_authors: Bloquear autores - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" filter: Filtro filters: all: Todos @@ -25,7 +25,7 @@ es: debates: index: block_authors: Bloquear autores - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" filter: Filtrar filters: all: Todos @@ -53,7 +53,7 @@ es: proposals: index: block_authors: Bloquear autores - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" filter: Filtro filters: all: Todas @@ -72,7 +72,7 @@ es: budget_investments: index: block_authors: Bloquear autores - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" filter: Filtro filters: all: Todos @@ -91,7 +91,7 @@ es: proposal_notifications: index: block_authors: Bloquear autores - confirm: '¿Estás seguro?' + confirm: "¿Estás seguro?" filter: Filtro filters: all: Todas diff --git a/config/locales/es/pages.yml b/config/locales/es/pages.yml index e625c1058..291cfd619 100644 --- a/config/locales/es/pages.yml +++ b/config/locales/es/pages.yml @@ -104,7 +104,7 @@ es: key_column: 5 page_column: Legislación colaborativa browser_table: - description: 'Dependiendo del sistema operativo y del navegador que se utilice, la combinación de teclas será la siguiente:' + description: "Dependiendo del sistema operativo y del navegador que se utilice, la combinación de teclas será la siguiente:" caption: Combinación de teclas dependiendo del sistema operativo y navegador browser_header: Navegador key_header: Combinación de teclas @@ -147,7 +147,7 @@ es: browser_column: Opera action_column: Ver > escala browser_shortcuts_table: - description: 'Otra forma de modificar el tamaño de texto es utilizar los atajos de teclado definidos en los navegadores, en particular la combinación de teclas:' + description: "Otra forma de modificar el tamaño de texto es utilizar los atajos de teclado definidos en los navegadores, en particular la combinación de teclas:" rows: - shortcut_column: CTRL y + (CMD y + en MAC) @@ -163,8 +163,8 @@ es: verify: code: Código que has recibido en tu carta email: Email - info: 'Para verificar tu cuenta introduce los datos con los que te registraste:' - info_code: 'Ahora introduce el código que has recibido en tu carta:' + info: "Para verificar tu cuenta introduce los datos con los que te registraste:" + info_code: "Ahora introduce el código que has recibido en tu carta:" password: Contraseña submit: Verificar mi cuenta title: Verifica tu cuenta diff --git a/config/locales/es/rails.yml b/config/locales/es/rails.yml index 505865b23..7c230ac39 100644 --- a/config/locales/es/rails.yml +++ b/config/locales/es/rails.yml @@ -82,7 +82,7 @@ es: one: 1 mes other: "%{count} meses" x_years: - one: '%{count} año' + one: "%{count} año" other: "%{count} años" x_seconds: one: 1 segundo @@ -128,7 +128,7 @@ es: other: longitud inválida (debería tener %{count} caracteres) other_than: debe ser distinto de %{count} template: - body: 'Se encontraron problemas con los siguientes campos:' + body: "Se encontraron problemas con los siguientes campos:" header: one: No se pudo guardar este/a %{model} porque se encontró 1 error other: "No se pudo guardar este/a %{model} porque se encontraron %{count} errores" diff --git a/config/locales/es/seeds.yml b/config/locales/es/seeds.yml index 9000913af..c108f4f24 100644 --- a/config/locales/es/seeds.yml +++ b/config/locales/es/seeds.yml @@ -32,7 +32,7 @@ es: environment: Medio Ambiente budgets: budget: Presupuesto Participativo - currency: '€' + currency: "€" groups: all_city: Toda la Ciudad districts: Distritos diff --git a/config/locales/es/verification.yml b/config/locales/es/verification.yml index 19752ef1b..8b606edd3 100644 --- a/config/locales/es/verification.yml +++ b/config/locales/es/verification.yml @@ -8,7 +8,7 @@ es: alert: failure: Hubo un problema enviándote un email a tu cuenta flash: - success: 'Te hemos enviado un email de confirmación a tu cuenta: %{email}' + success: "Te hemos enviado un email de confirmación a tu cuenta: %{email}" show: alert: failure: Código de verificación incorrecto @@ -26,11 +26,11 @@ es: errors: incorrect_code: Código de verificación incorrecto new: - explanation: 'Para participar en las votaciones finales puedes:' + explanation: "Para participar en las votaciones finales puedes:" go_to_index: Ver propuestas office: Verificarte presencialmente en cualquier Oficina de Atención al Ciudadano send_letter: Solicitar una carta por correo postal - title: '¡Felicidades!' + title: "¡Felicidades!" user_permission_info: Con tu cuenta ya puedes... update: flash: @@ -50,7 +50,7 @@ es: date_of_birth: Fecha de nacimiento document_number: Número de documento document_number_help_title: Ayuda - document_number_help_text_html: 'DNI: 12345678A
Pasaporte: AAA000001
Tarjeta de residencia: X1234567P' + document_number_help_text_html: "DNI: 12345678A
Pasaporte: AAA000001
Tarjeta de residencia: X1234567P" document_type: passport: Pasaporte residence_card: Tarjeta de residencia @@ -72,7 +72,7 @@ es: edit: confirmation_code: Introduce el código que has recibido en tu móvil resend_sms_link: Solicitar un nuevo código - resend_sms_text: '¿No has recibido un mensaje de texto con tu código de confirmación?' + resend_sms_text: "¿No has recibido un mensaje de texto con tu código de confirmación?" submit_button: Enviar title: SMS de confirmación new: diff --git a/spec/features/admin/officials_spec.rb b/spec/features/admin/officials_spec.rb index 719822b92..ce17f58f7 100644 --- a/spec/features/admin/officials_spec.rb +++ b/spec/features/admin/officials_spec.rb @@ -68,7 +68,7 @@ feature "Admin officials" do scenario "Destroy" do visit edit_admin_official_path(@official) - click_link "Remove 'Official' status" + click_link 'Remove "Official" status' expect(page).to have_content "Details saved: the user is no longer an official" expect(page).to have_current_path(admin_officials_path, ignore_query: true) From 4c35df4812d2867de043025f3eec6a999bdaa49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 25 Mar 2019 13:29:58 +0100 Subject: [PATCH 3/4] Use double quotes inside string interpolation --- app/controllers/stats_controller.rb | 2 +- app/helpers/documentables_helper.rb | 2 +- app/helpers/imageables_helper.rb | 2 +- app/helpers/map_locations_helper.rb | 6 +++--- app/helpers/valuation_helper.rb | 2 +- app/mailers/application_mailer.rb | 2 +- app/models/budget/investment.rb | 2 +- app/models/legislation/proposal.rb | 2 +- app/models/proposal.rb | 2 +- app/models/spending_proposal.rb | 2 +- app/models/user.rb | 2 +- app/views/admin/homepage/_setting.html.erb | 4 ++-- .../admin/legislation/draft_versions/index.html.erb | 2 +- .../admin/settings/_featured_settings_table.html.erb | 4 ++-- app/views/admin/widget/cards/_form.html.erb | 2 +- app/views/layouts/_footer.html.erb | 12 ++++++------ app/views/legislation/annotations/index.html.erb | 2 +- app/views/legislation/annotations/show.html.erb | 2 +- .../legislation/draft_versions/changes.html.erb | 2 +- app/views/shared/_social_share.html.erb | 4 ++-- app/views/users/_budget_investment.html.erb | 2 +- app/views/valuation/budget_investments/edit.html.erb | 6 +++--- .../valuation/budget_investments/index.html.erb | 2 +- app/views/valuation/spending_proposals/edit.html.erb | 6 +++--- .../valuation/spending_proposals/index.html.erb | 2 +- config/initializers/devise.rb | 2 +- db/dev_seeds/budgets.rb | 2 +- db/dev_seeds/debates.rb | 4 ++-- db/dev_seeds/notifications.rb | 2 +- db/dev_seeds/polls.rb | 2 +- db/dev_seeds/proposals.rb | 6 +++--- db/dev_seeds/spending_proposals.rb | 4 ++-- spec/controllers/concerns/has_filters_spec.rb | 2 +- spec/controllers/concerns/has_orders_spec.rb | 4 ++-- spec/factories/verifications.rb | 2 +- 35 files changed, 54 insertions(+), 54 deletions(-) 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 @@
diff --git a/app/views/admin/widget/cards/_form.html.erb b/app/views/admin/widget/cards/_form.html.erb index 3d4e99f6d..413be15d1 100644 --- a/app/views/admin/widget/cards/_form.html.erb +++ b/app/views/admin/widget/cards/_form.html.erb @@ -37,5 +37,5 @@ - <%= f.submit(t("admin.homepage.#{action_name}.#{@card.header? ? 'submit_header' : 'submit_card'}"), class: "button success") %> + <%= f.submit(t("admin.homepage.#{action_name}.#{@card.header? ? "submit_header" : "submit_card"}"), class: "button success") %> <% end %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 634347da8..1337be64b 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -2,7 +2,7 @@

- <%= link_to t("layouts.header.open_gov", open: "#{t('layouts.header.open')}").html_safe %> + <%= link_to t("layouts.header.open_gov", open: "#{t("layouts.header.open")}").html_safe %>

@@ -37,7 +37,7 @@

    <% if setting["twitter_handle"] %>
  • - <%= link_to "https://twitter.com/#{setting['twitter_handle']}", target: "_blank", + <%= link_to "https://twitter.com/#{setting["twitter_handle"]}", target: "_blank", title: t("shared.go_to_page") + t("social.twitter", org: setting["org_name"]) + t("shared.target_blank_html") do %> <%= t("social.twitter", org: setting["org_name"]) %> @@ -46,7 +46,7 @@ <% end %> <% if setting["facebook_handle"] %>
  • - <%= link_to "https://www.facebook.com/#{setting['facebook_handle']}/", target: "_blank", + <%= link_to "https://www.facebook.com/#{setting["facebook_handle"]}/", target: "_blank", title: t("shared.go_to_page") + t("social.facebook", org: setting["org_name"]) + t("shared.target_blank_html") do %> <%= t("social.facebook", org: setting["org_name"]) %> @@ -55,7 +55,7 @@ <% end %> <% if setting["youtube_handle"] %>
  • - <%= link_to "https://www.youtube.com/#{setting['youtube_handle']}", target: "_blank", + <%= link_to "https://www.youtube.com/#{setting["youtube_handle"]}", target: "_blank", title: t("shared.go_to_page") + t("social.youtube", org: setting["org_name"]) + t("shared.target_blank_html") do %> <%= t("social.youtube", org: setting["org_name"]) %> @@ -64,7 +64,7 @@ <% end %> <% if setting["telegram_handle"] %>
  • - <%= link_to "https://www.telegram.me/#{setting['telegram_handle']}", target: "_blank", + <%= link_to "https://www.telegram.me/#{setting["telegram_handle"]}", target: "_blank", title: t("shared.go_to_page") + t("social.telegram", org: setting["org_name"]) + t("shared.target_blank_html") do %> <%= t("social.telegram", org: setting["org_name"]) %> @@ -73,7 +73,7 @@ <% end %> <% if setting["instagram_handle"] %>
  • - <%= link_to "https://www.instagram.com/#{setting['instagram_handle']}", target: "_blank", + <%= link_to "https://www.instagram.com/#{setting["instagram_handle"]}", target: "_blank", title: t("shared.go_to_page") + t("social.instagram", org: setting["org_name"]) + t("shared.target_blank_html") do %> <%= t("social.instagram", org: setting["org_name"]) %> diff --git a/app/views/legislation/annotations/index.html.erb b/app/views/legislation/annotations/index.html.erb index c9f537ec9..83f0e9d07 100644 --- a/app/views/legislation/annotations/index.html.erb +++ b/app/views/legislation/annotations/index.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= "#{t('.title')} - #{@draft_version.title} - #{@process.title}" %><% end %> +<% provide :title do %><%= "#{t(".title")} - #{@draft_version.title} - #{@process.title}" %><% end %> <%= render "legislation/processes/header", process: @process, header: :small %> diff --git a/app/views/legislation/annotations/show.html.erb b/app/views/legislation/annotations/show.html.erb index ebb4b7f51..52e2e7bc3 100644 --- a/app/views/legislation/annotations/show.html.erb +++ b/app/views/legislation/annotations/show.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= "#{t('.title')} - #{@draft_version.title} - #{@process.title}" %><% end %> +<% provide :title do %><%= "#{t(".title")} - #{@draft_version.title} - #{@process.title}" %><% end %> <%= render "legislation/processes/header", process: @process, header: :small %> diff --git a/app/views/legislation/draft_versions/changes.html.erb b/app/views/legislation/draft_versions/changes.html.erb index d4c8b46f7..faf99524d 100644 --- a/app/views/legislation/draft_versions/changes.html.erb +++ b/app/views/legislation/draft_versions/changes.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= "#{@draft_version.title} - #{t('.title')} - #{@process.title}" %><% end %> +<% provide :title do %><%= "#{@draft_version.title} - #{t(".title")} - #{@process.title}" %><% end %> <%= render "legislation/processes/header", process: @process, header: :small %> diff --git a/app/views/shared/_social_share.html.erb b/app/views/shared/_social_share.html.erb index 9d94edbed..531f35a7b 100644 --- a/app/views/shared/_social_share.html.erb +++ b/app/views/shared/_social_share.html.erb @@ -1,14 +1,14 @@ <% description = local_assigns.fetch(:description, "") %> <% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %> <% mobile = local_assigns[:mobile] %> -<% mobile_url = mobile.present? ? "#{mobile.gsub(/\s+/, '%20')}%20" : "" %> +<% mobile_url = mobile.present? ? "#{mobile.gsub(/\s+/, "%20")}%20" : "" %> <% if local_assigns[:share_title].present? %> <% end %>
diff --git a/app/views/valuation/budget_investments/edit.html.erb b/app/views/valuation/budget_investments/edit.html.erb index 1e36a6a04..1077fb43d 100644 --- a/app/views/valuation/budget_investments/edit.html.erb +++ b/app/views/valuation/budget_investments/edit.html.erb @@ -1,6 +1,6 @@ <%= link_to valuation_budget_budget_investment_path(@budget, @investment), class: "back" do %> - <%= "#{t('valuation.budget_investments.show.title')} #{@investment.id}"%> + <%= "#{t("valuation.budget_investments.show.title")} #{@investment.id}"%> <% end %>

<%= t("valuation.budget_investments.edit.dossier") %>

@@ -50,12 +50,12 @@
- <%= f.label :price, "#{t('valuation.budget_investments.edit.price_html', currency: @budget.currency_symbol)}" %> + <%= f.label :price, "#{t("valuation.budget_investments.edit.price_html", currency: @budget.currency_symbol)}" %> <%= f.number_field :price, label: false, max: 1000000000000000 %>
- <%= f.label :price_first_year, "#{t('valuation.budget_investments.edit.price_first_year_html', currency: @budget.currency_symbol)}" %> + <%= f.label :price_first_year, "#{t("valuation.budget_investments.edit.price_first_year_html", currency: @budget.currency_symbol)}" %> <%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
diff --git a/app/views/valuation/budget_investments/index.html.erb b/app/views/valuation/budget_investments/index.html.erb index 06ee5c70c..25037eae0 100644 --- a/app/views/valuation/budget_investments/index.html.erb +++ b/app/views/valuation/budget_investments/index.html.erb @@ -8,7 +8,7 @@
<% slice.each do |filter| %> <%= link_to valuation_budget_budget_investments_path(budget_id: @budget.id, heading_id: filter[:id]), - class: "#{'is-active' if params[:heading_id].to_s == filter[:id].to_s}" do %> + class: "#{"is-active" if params[:heading_id].to_s == filter[:id].to_s}" do %> <%= filter[:name] %> (<%= filter[:count] %>) <% end %> <% end %> diff --git a/app/views/valuation/spending_proposals/edit.html.erb b/app/views/valuation/spending_proposals/edit.html.erb index 4bfb9e1c6..a3b6bb603 100644 --- a/app/views/valuation/spending_proposals/edit.html.erb +++ b/app/views/valuation/spending_proposals/edit.html.erb @@ -1,4 +1,4 @@ -<%= link_to "#{t('valuation.spending_proposals.show.heading')} #{@spending_proposal.id}", valuation_spending_proposal_path(@spending_proposal), class: "back" %> +<%= link_to "#{t("valuation.spending_proposals.show.heading")} #{@spending_proposal.id}", valuation_spending_proposal_path(@spending_proposal), class: "back" %>

<%= t("valuation.spending_proposals.edit.dossier") %>

<%= form_for(@spending_proposal, url: valuate_valuation_spending_proposal_path(@spending_proposal), html: {id: "valuation_spending_proposal_edit_form"}) do |f| %> @@ -46,12 +46,12 @@
- <%= f.label :price, "#{t('valuation.spending_proposals.edit.price_html', currency: t('valuation.spending_proposals.edit.currency'))}" %> + <%= f.label :price, "#{t("valuation.spending_proposals.edit.price_html", currency: t("valuation.spending_proposals.edit.currency"))}" %> <%= f.number_field :price, label: false, max: 1000000000000000 %>
- <%= f.label :price_first_year, "#{t('valuation.spending_proposals.edit.price_first_year_html', currency: t('valuation.spending_proposals.edit.currency'))}" %> + <%= f.label :price_first_year, "#{t("valuation.spending_proposals.edit.price_first_year_html", currency: t("valuation.spending_proposals.edit.currency"))}" %> <%= f.number_field :price_first_year, label: false, max: 1000000000000000 %>
diff --git a/app/views/valuation/spending_proposals/index.html.erb b/app/views/valuation/spending_proposals/index.html.erb index ec4356ba3..b4ff03a0f 100644 --- a/app/views/valuation/spending_proposals/index.html.erb +++ b/app/views/valuation/spending_proposals/index.html.erb @@ -5,7 +5,7 @@
<% slice.each do |filter| %> <%= link_to valuation_spending_proposals_path(geozone_id: filter[:id]), - class: "#{'is-active' if params[:geozone_id].to_s == filter[:id].to_s}" do %> + class: "#{"is-active" if params[:geozone_id].to_s == filter[:id].to_s}" do %> <%= filter[:name] %> (<%= filter[:pending_count] %>) <% end %> <% end %> diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 94a4f4de0..7bff2d029 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -15,7 +15,7 @@ Devise.setup do |config| if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?("settings") config.mailer_sender = "noreply@consul.dev" else - config.mailer_sender = "'#{Setting['mailer_from_name']}' <#{Setting['mailer_from_address']}>" + config.mailer_sender = "'#{Setting["mailer_from_name"]}' <#{Setting["mailer_from_address"]}>" end # Configure the class responsible to send e-mails. diff --git a/db/dev_seeds/budgets.rb b/db/dev_seeds/budgets.rb index dc96d658c..f9dc8bab6 100644 --- a/db/dev_seeds/budgets.rb +++ b/db/dev_seeds/budgets.rb @@ -127,7 +127,7 @@ section "Creating Investments" do group: heading.group, budget: heading.group.budget, title: Faker::Lorem.sentence(3).truncate(60), - description: "

#{Faker::Lorem.paragraphs.join('

')}

", + description: "

#{Faker::Lorem.paragraphs.join("

")}

", created_at: rand((Time.current - 1.week)..Time.current), feasibility: %w[undecided unfeasible feasible feasible feasible feasible].sample, unfeasibility_explanation: Faker::Lorem.paragraph, diff --git a/db/dev_seeds/debates.rb b/db/dev_seeds/debates.rb index 009e28a72..bda70f028 100644 --- a/db/dev_seeds/debates.rb +++ b/db/dev_seeds/debates.rb @@ -2,7 +2,7 @@ section "Creating Debates" do tags = Faker::Lorem.words(25) 30.times do author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" Debate.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), created_at: rand((Time.current - 1.week)..Time.current), @@ -15,7 +15,7 @@ section "Creating Debates" do tags = ActsAsTaggableOn::Tag.where(kind: "category") 30.times do author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" Debate.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), created_at: rand((Time.current - 1.week)..Time.current), diff --git a/db/dev_seeds/notifications.rb b/db/dev_seeds/notifications.rb index e74e9d7e3..475927339 100644 --- a/db/dev_seeds/notifications.rb +++ b/db/dev_seeds/notifications.rb @@ -2,7 +2,7 @@ section "Creating comment notifications" do User.find_each do |user| debate = Debate.create!(author: user, title: Faker::Lorem.sentence(3).truncate(60), - description: "

#{Faker::Lorem.paragraphs.join('

')}

", + description: "

#{Faker::Lorem.paragraphs.join("

")}

", tag_list: ActsAsTaggableOn::Tag.all.sample(3).join(","), geozone: Geozone.reorder("RANDOM()").first, terms_of_service: "1") diff --git a/db/dev_seeds/polls.rb b/db/dev_seeds/polls.rb index 53eb8dec7..26256981d 100644 --- a/db/dev_seeds/polls.rb +++ b/db/dev_seeds/polls.rb @@ -53,7 +53,7 @@ section "Creating Poll Questions & Answers" do end question.save! Faker::Lorem.words((2..4).to_a.sample).each do |title| - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" answer = Poll::Question::Answer.new(question: question, title: title.capitalize, description: description) diff --git a/db/dev_seeds/proposals.rb b/db/dev_seeds/proposals.rb index fd03690ab..224a97d34 100644 --- a/db/dev_seeds/proposals.rb +++ b/db/dev_seeds/proposals.rb @@ -25,7 +25,7 @@ section "Creating Proposals" do tags = Faker::Lorem.words(25) 30.times do author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" proposal = Proposal.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), question: Faker::Lorem.sentence(3) + "?", @@ -46,7 +46,7 @@ section "Creating Archived Proposals" do tags = Faker::Lorem.words(25) 5.times do author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" proposal = Proposal.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), question: Faker::Lorem.sentence(3) + "?", @@ -67,7 +67,7 @@ section "Creating Successful Proposals" do tags = Faker::Lorem.words(25) 10.times do author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" proposal = Proposal.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), question: Faker::Lorem.sentence(3) + "?", diff --git a/db/dev_seeds/spending_proposals.rb b/db/dev_seeds/spending_proposals.rb index 44c519a16..149b56ee5 100644 --- a/db/dev_seeds/spending_proposals.rb +++ b/db/dev_seeds/spending_proposals.rb @@ -3,8 +3,8 @@ section "Creating Spending Proposals" do 60.times do geozone = Geozone.all.sample author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" - feasible_explanation = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

#{Faker::Lorem.paragraphs.join("

")}

" + feasible_explanation = "

#{Faker::Lorem.paragraphs.join("

")}

" valuation_finished = [true, false].sample feasible = [true, false].sample created_at = rand((Time.current - 1.week)..Time.current) diff --git a/spec/controllers/concerns/has_filters_spec.rb b/spec/controllers/concerns/has_filters_spec.rb index ac4854db8..b7d2ba870 100644 --- a/spec/controllers/concerns/has_filters_spec.rb +++ b/spec/controllers/concerns/has_filters_spec.rb @@ -9,7 +9,7 @@ describe HasFilters do has_filters ["all", "pending", "reviewed"], only: :index def index - render text: "#{@current_filter} (#{@valid_filters.join(' ')})" + render text: "#{@current_filter} (#{@valid_filters.join(" ")})" end end diff --git a/spec/controllers/concerns/has_orders_spec.rb b/spec/controllers/concerns/has_orders_spec.rb index d4240b29d..4a6f66299 100644 --- a/spec/controllers/concerns/has_orders_spec.rb +++ b/spec/controllers/concerns/has_orders_spec.rb @@ -10,11 +10,11 @@ describe HasOrders do has_orders ->(c) { ["votes_count", "flags_count"] }, only: :new def index - render text: "#{@current_order} (#{@valid_orders.join(' ')})" + render text: "#{@current_order} (#{@valid_orders.join(" ")})" end def new - render text: "#{@current_order} (#{@valid_orders.join(' ')})" + render text: "#{@current_order} (#{@valid_orders.join(" ")})" end end diff --git a/spec/factories/verifications.rb b/spec/factories/verifications.rb index e750d8027..bd3199658 100644 --- a/spec/factories/verifications.rb +++ b/spec/factories/verifications.rb @@ -6,7 +6,7 @@ FactoryBot.define do postal_code "28002" end - sequence(:document_number) { |n| "#{n.to_s.rjust(8, '0')}X" } + sequence(:document_number) { |n| "#{n.to_s.rjust(8, "0")}X" } factory :verification_residence, class: Verification::Residence do user From 3e4e65ead7748ea3e9e77757408a94ec2427ea7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 25 Mar 2019 13:31:26 +0100 Subject: [PATCH 4/4] Use double quotes inside ERB We were using single quotes inside ERB code when that code was inside HTML double quotes. --- .../admin/budget_investments/index.js.erb | 2 +- .../toggle_selection.js.erb | 2 +- app/views/admin/budgets/_form.html.erb | 2 +- .../proposals/toggle_selection.js.erb | 2 +- .../poll/booth_assignments/create.js.erb | 2 +- .../poll/booth_assignments/destroy.js.erb | 2 +- .../booth_assignments/search_booths.js.erb | 2 +- .../poll/booth_assignments/show.html.erb | 2 +- .../search_officers.js.erb | 2 +- app/views/admin/poll/officers/search.js.erb | 2 +- .../admin/poll/officers/user_not_found.js.erb | 2 +- app/views/admin/poll/polls/_form.html.erb | 2 +- app/views/admin/poll/recounts/index.html.erb | 2 +- .../admin/poll/shifts/search_officers.js.erb | 2 +- .../_summary_table.html.erb | 2 +- .../admin/spending_proposals/index.html.erb | 2 +- app/views/admin/users/index.js.erb | 2 +- app/views/budgets/_phases.html.erb | 2 +- .../ballot/lines/_refresh_ballots.js.erb | 4 ++-- app/views/budgets/ballot/lines/create.js.erb | 8 ++++---- app/views/budgets/ballot/lines/destroy.js.erb | 10 +++++----- app/views/budgets/ballot/lines/new.js.erb | 2 +- .../investments/_flag_actions.html.erb | 4 ++-- .../budgets/investments/_investment.html.erb | 2 +- app/views/budgets/investments/_votes.html.erb | 2 +- app/views/budgets/investments/vote.js.erb | 4 ++-- .../budgets/results/_results_table.html.erb | 8 ++++---- app/views/comments/_flag_actions.html.erb | 4 ++-- .../comments/_refresh_flag_actions.js.erb | 2 +- app/views/comments/create.js.erb | 2 +- app/views/comments/new.js.erb | 2 +- app/views/comments/vote.js.erb | 2 +- app/views/debates/_flag_actions.html.erb | 4 ++-- .../debates/_refresh_flag_actions.js.erb | 2 +- app/views/debates/vote.js.erb | 2 +- .../follows/refresh_follow_button.js.erb | 4 ++-- app/views/layouts/admin.html.erb | 2 +- .../legislation/annotations/comments.js.erb | 4 ++-- app/views/legislation/annotations/new.js.erb | 2 +- app/views/legislation/answers/create.js.erb | 2 +- .../legislation/processes/_key_dates.html.erb | 2 +- .../proposals/_flag_actions.html.erb | 4 ++-- .../legislation/proposals/_proposal.html.erb | 2 +- .../proposals/_refresh_flag_actions.js.erb | 2 +- app/views/legislation/proposals/vote.js.erb | 2 +- .../questions/_answer_form.html.erb | 4 ++-- .../management/_user_permissions.html.erb | 2 +- .../budgets/investments/vote.js.erb | 4 ++-- .../management/user_invites/new.html.erb | 2 +- .../notifications/_notification.html.erb | 2 +- app/views/officing/results/new.html.erb | 2 +- app/views/officing/voters/create.js.erb | 2 +- app/views/polls/questions/answer.js.erb | 2 +- app/views/polls/show.html.erb | 2 +- app/views/proposals/_flag_actions.html.erb | 4 ++-- app/views/proposals/_proposal.html.erb | 2 +- app/views/proposals/vote_featured.js.erb | 2 +- .../shared/_social_media_meta_tags.html.erb | 16 +++++++-------- app/views/spending_proposals/_votes.html.erb | 2 +- app/views/spending_proposals/vote.js.erb | 2 +- app/views/stats/index.json.erb | 20 +++++++++---------- app/views/welcome/_feeds.html.erb | 10 +++++----- app/views/welcome/_header.html.erb | 4 ++-- app/views/welcome/_processes.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- 65 files changed, 107 insertions(+), 107 deletions(-) diff --git a/app/views/admin/budget_investments/index.js.erb b/app/views/admin/budget_investments/index.js.erb index dc3a8d67a..c1569cc59 100644 --- a/app/views/admin/budget_investments/index.js.erb +++ b/app/views/admin/budget_investments/index.js.erb @@ -1 +1 @@ -$("#investments").html('<%= j render("admin/budget_investments/investments") %>'); +$("#investments").html("<%= j render("admin/budget_investments/investments") %>"); diff --git a/app/views/admin/budget_investments/toggle_selection.js.erb b/app/views/admin/budget_investments/toggle_selection.js.erb index 3074847d6..6ba72db2a 100644 --- a/app/views/admin/budget_investments/toggle_selection.js.erb +++ b/app/views/admin/budget_investments/toggle_selection.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@investment) %>").html('<%= j render("select_investment", investment: @investment) %>'); +$("#<%= dom_id(@investment) %>").html("<%= j render("select_investment", investment: @investment) %>"); diff --git a/app/views/admin/budgets/_form.html.erb b/app/views/admin/budgets/_form.html.erb index d5aaa02b2..e570da1bd 100644 --- a/app/views/admin/budgets/_form.html.erb +++ b/app/views/admin/budgets/_form.html.erb @@ -52,7 +52,7 @@ <% end %>
<% (@poll.starts_at.to_date..@poll.ends_at.to_date).each do |voting_date| %> <% system_count = @voters_by_date[voting_date].present? ? @voters_by_date[voting_date].size : 0 %> - + "> diff --git a/app/views/admin/poll/officer_assignments/search_officers.js.erb b/app/views/admin/poll/officer_assignments/search_officers.js.erb index ba621d8f7..9a97db091 100644 --- a/app/views/admin/poll/officer_assignments/search_officers.js.erb +++ b/app/views/admin/poll/officer_assignments/search_officers.js.erb @@ -1 +1 @@ -$("#search-officers-results").html("<%= j render 'search_officers_results' %>"); \ No newline at end of file +$("#search-officers-results").html("<%= j render "search_officers_results" %>"); \ No newline at end of file diff --git a/app/views/admin/poll/officers/search.js.erb b/app/views/admin/poll/officers/search.js.erb index bd259f7fb..3ade51dfa 100644 --- a/app/views/admin/poll/officers/search.js.erb +++ b/app/views/admin/poll/officers/search.js.erb @@ -1 +1 @@ -$("#search-result").html("<%= j render 'officer', officer: @officer %>"); +$("#search-result").html("<%= j render "officer", officer: @officer %>"); diff --git a/app/views/admin/poll/officers/user_not_found.js.erb b/app/views/admin/poll/officers/user_not_found.js.erb index a6444dc61..4ba37aa47 100644 --- a/app/views/admin/poll/officers/user_not_found.js.erb +++ b/app/views/admin/poll/officers/user_not_found.js.erb @@ -1 +1 @@ -$("#search-result").html("
<%= j t('admin.poll_officers.search.user_not_found') %>
"); +$("#search-result").html("
<%= j t("admin.poll_officers.search.user_not_found") %>
"); diff --git a/app/views/admin/poll/polls/_form.html.erb b/app/views/admin/poll/polls/_form.html.erb index f0fc03a5b..98c1d8d2f 100644 --- a/app/views/admin/poll/polls/_form.html.erb +++ b/app/views/admin/poll/polls/_form.html.erb @@ -42,7 +42,7 @@ -
+
">
<%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %>
diff --git a/app/views/admin/poll/recounts/index.html.erb b/app/views/admin/poll/recounts/index.html.erb index 5b73f9c34..692078340 100644 --- a/app/views/admin/poll/recounts/index.html.erb +++ b/app/views/admin/poll/recounts/index.html.erb @@ -43,7 +43,7 @@ <%= link_to booth_assignment.booth.name, admin_poll_booth_assignment_path(@poll, booth_assignment, anchor: "tab-recounts") %> -
<% spending_proposals.each do |geozone, price| %> - + "> diff --git a/app/views/admin/spending_proposals/index.html.erb b/app/views/admin/spending_proposals/index.html.erb index 281e0131c..8f2711c29 100644 --- a/app/views/admin/spending_proposals/index.html.erb +++ b/app/views/admin/spending_proposals/index.html.erb @@ -59,7 +59,7 @@ + class="budget-investments <%= investment.winner? ? "success" : "js-discarded" %>" + style="<%= investment.winner? ? "" : "display: none" %>"> + "> diff --git a/app/views/officing/voters/create.js.erb b/app/views/officing/voters/create.js.erb index 7a9a4cf03..676d153bd 100644 --- a/app/views/officing/voters/create.js.erb +++ b/app/views/officing/voters/create.js.erb @@ -1,3 +1,3 @@ -$("#<%= dom_id(@poll) %> #actions").html('<%= j render("voted") %>'); +$("#<%= dom_id(@poll) %> #actions").html("<%= j render("voted") %>"); $("#<%= dom_id(@poll) %> #can_vote_callout").hide(); $(".js-vote-collection").removeClass("is-hidden"); diff --git a/app/views/polls/questions/answer.js.erb b/app/views/polls/questions/answer.js.erb index 8e8c01358..79978e2c1 100644 --- a/app/views/polls/questions/answer.js.erb +++ b/app/views/polls/questions/answer.js.erb @@ -1,2 +1,2 @@ <% token = poll_voter_token(@question.poll, current_user) %> -$("#<%= dom_id(@question) %>_answers").html('<%= j render("polls/questions/answers", question: @question, token: token) %>'); +$("#<%= dom_id(@question) %>_answers").html("<%= j render("polls/questions/answers", question: @question, token: token) %>"); diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index 9d52fe23a..d42c20398 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -54,7 +54,7 @@
<% @poll_questions_answers.each do |answer| %> -
+
" id="answer_<%= answer.id %>"> <% if answer.description.present? %>

<%= answer.title %>

diff --git a/app/views/proposals/_flag_actions.html.erb b/app/views/proposals/_flag_actions.html.erb index ef42b3f09..951fcfeef 100644 --- a/app/views/proposals/_flag_actions.html.erb +++ b/app/views/proposals/_flag_actions.html.erb @@ -1,6 +1,6 @@ <% if show_flag_action? proposal %> - + "> @@ -9,7 +9,7 @@ <% end %> <% if show_unflag_action? proposal %> - + "> diff --git a/app/views/proposals/_proposal.html.erb b/app/views/proposals/_proposal.html.erb index b9d07f672..97224172a 100644 --- a/app/views/proposals/_proposal.html.erb +++ b/app/views/proposals/_proposal.html.erb @@ -2,7 +2,7 @@ class="proposal clear <%= ("successful" if proposal.total_votes > Proposal.votes_needed_for_success) %>" data-type="proposal"> -
+
">
<% if proposal.image.present? %> diff --git a/app/views/proposals/vote_featured.js.erb b/app/views/proposals/vote_featured.js.erb index 52619282b..7363dadf9 100644 --- a/app/views/proposals/vote_featured.js.erb +++ b/app/views/proposals/vote_featured.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@proposal) %>_votes").html('<%= j render("proposals/featured_votes", proposal: @proposal) %>'); \ No newline at end of file +$("#<%= dom_id(@proposal) %>_votes").html("<%= j render("proposals/featured_votes", proposal: @proposal) %>"); \ No newline at end of file diff --git a/app/views/shared/_social_media_meta_tags.html.erb b/app/views/shared/_social_media_meta_tags.html.erb index cc6cc0fa0..4c3e3e960 100644 --- a/app/views/shared/_social_media_meta_tags.html.erb +++ b/app/views/shared/_social_media_meta_tags.html.erb @@ -2,21 +2,21 @@ <% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %> - - +"/> +"/> - +"/> - +"/> <% if setting["url"] %> - + "/> <% end %> <% if setting["facebook_handle"] %> - + "/> <% end %> - - +"/> +"/> diff --git a/app/views/spending_proposals/_votes.html.erb b/app/views/spending_proposals/_votes.html.erb index 8ad231d80..369a3053c 100644 --- a/app/views/spending_proposals/_votes.html.erb +++ b/app/views/spending_proposals/_votes.html.erb @@ -4,7 +4,7 @@ <% voting_allowed = true unless reason.presence == :not_voting_allowed %> <% user_voted_for = voted_for?(@spending_proposal_votes, spending_proposal) %> - + "> <%= t("spending_proposals.spending_proposal.supports", count: spending_proposal.total_votes) %> diff --git a/app/views/spending_proposals/vote.js.erb b/app/views/spending_proposals/vote.js.erb index cc3e5a16d..30e280f86 100644 --- a/app/views/spending_proposals/vote.js.erb +++ b/app/views/spending_proposals/vote.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@spending_proposal) %>_votes").html('<%= j render("spending_proposals/votes", spending_proposal: @spending_proposal, vote_url: vote_spending_proposal_path(@spending_proposal, value: "yes")) %>'); \ No newline at end of file +$("#<%= dom_id(@spending_proposal) %>_votes").html("<%= j render("spending_proposals/votes", spending_proposal: @spending_proposal, vote_url: vote_spending_proposal_path(@spending_proposal, value: "yes")) %>"); \ No newline at end of file diff --git a/app/views/stats/index.json.erb b/app/views/stats/index.json.erb index 4a6738bbe..f997b4f31 100644 --- a/app/views/stats/index.json.erb +++ b/app/views/stats/index.json.erb @@ -1,12 +1,12 @@ { - "<%= t('stats.index.visits') %>" : "<%= number_with_delimiter(@visits) %>", - "<%= t('stats.index.debates') %>" : <%= number_with_delimiter(@debates) %>", - "<%= t('stats.index.proposals') %>" : "<%= number_with_delimiter(@proposals) %>", - "<%= t('stats.index.comments') %>" : "<%= number_with_delimiter(@comments) %>", - "<%= t('stats.index.proposal_votes') %>" : "<%= number_with_delimiter(@proposal_votes) %>", - "<%= t('stats.index.debate_votes') %>" : "<%= number_with_delimiter(@debate_votes) %>", - "<%= t('stats.index.comment_votes') %>" : "<%= number_with_delimiter(@comment_votes) %>", - "<%= t('stats.index.votes') %>" : "<%= number_with_delimiter(@votes) %>", - "<%= t('stats.index.verified_users') %>" : "<%= number_with_delimiter(@verified_users) %>", - "<%= t('stats.index.unverified_users') %>" : "<%= number_with_delimiter(@unverified_users) %>" + "<%= t("stats.index.visits") %>" : "<%= number_with_delimiter(@visits) %>", + "<%= t("stats.index.debates") %>" : <%= number_with_delimiter(@debates) %>", + "<%= t("stats.index.proposals") %>" : "<%= number_with_delimiter(@proposals) %>", + "<%= t("stats.index.comments") %>" : "<%= number_with_delimiter(@comments) %>", + "<%= t("stats.index.proposal_votes") %>" : "<%= number_with_delimiter(@proposal_votes) %>", + "<%= t("stats.index.debate_votes") %>" : "<%= number_with_delimiter(@debate_votes) %>", + "<%= t("stats.index.comment_votes") %>" : "<%= number_with_delimiter(@comment_votes) %>", + "<%= t("stats.index.votes") %>" : "<%= number_with_delimiter(@votes) %>", + "<%= t("stats.index.verified_users") %>" : "<%= number_with_delimiter(@verified_users) %>", + "<%= t("stats.index.unverified_users") %>" : "<%= number_with_delimiter(@unverified_users) %>" } \ No newline at end of file diff --git a/app/views/welcome/_feeds.html.erb b/app/views/welcome/_feeds.html.erb index d8d5d03ea..b255ed526 100644 --- a/app/views/welcome/_feeds.html.erb +++ b/app/views/welcome/_feeds.html.erb @@ -3,14 +3,14 @@ <% if feed_proposals?(feed) %>
+ <%= "medium-8" if feed_debates_and_proposals_enabled? %>">

<%= t("welcome.feed.most_active.#{feed.kind}") %>

<% feed.items.each do |item| %> -
+
row">
+ <%= "medium-6 large-9" if item.image.present? %>"> <%= link_to item.title, url_for(item) %>

<%= item.summary %>

@@ -32,12 +32,12 @@ <% if feed_debates?(feed) %>
+ <%= "medium-4" if feed_debates_and_proposals_enabled? %>">

<%= t("welcome.feed.most_active.#{feed.kind}") %>

<% feed.items.each do |item| %> -
+
"> <%= link_to item.title, url_for(item) %>
<% end %> diff --git a/app/views/welcome/_header.html.erb b/app/views/welcome/_header.html.erb index b963d46f0..bec8fd636 100644 --- a/app/views/welcome/_header.html.erb +++ b/app/views/welcome/_header.html.erb @@ -1,11 +1,11 @@ <% if header.present? %>
-
+
"> <%= header.label %>

<%= header.title %>

<%= header.description %>

-
+
"> <%= link_to header.link_text, header.link_url, class: "button expanded large" %>
diff --git a/app/views/welcome/_processes.html.erb b/app/views/welcome/_processes.html.erb index ea02baeb4..3433d7182 100644 --- a/app/views/welcome/_processes.html.erb +++ b/app/views/welcome/_processes.html.erb @@ -8,7 +8,7 @@ <% feed.items.each do |item| %> <%= link_to url_for(item) do %> -
+
"> <%= image_tag("welcome_process.png", alt: "") %>
<%= t("welcome.feed.process_label") %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 6661d103d..e7e0fc70b 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -21,7 +21,7 @@
<% if @cards.any? %> -
+
"> <%= render "cards" %>
<% end %>
<% if draft_version.status == "draft" %> <%= t("admin.legislation.draft_versions.statuses.draft") %> - <%= link_to "(#{t('.preview')})", legislation_process_draft_version_path(@process, draft_version) %> + <%= link_to "(#{t(".preview")})", legislation_process_draft_version_path(@process, draft_version) %> <% else %> <%= t("admin.legislation.draft_versions.statuses.published") %> <% end %> diff --git a/app/views/admin/settings/_featured_settings_table.html.erb b/app/views/admin/settings/_featured_settings_table.html.erb index c8b32c7de..5de1dc9b1 100644 --- a/app/views/admin/settings/_featured_settings_table.html.erb +++ b/app/views/admin/settings/_featured_settings_table.html.erb @@ -35,8 +35,8 @@ <%= form_for(feature, url: admin_setting_path(feature), html: { id: "edit_#{dom_id(feature)}"}) do |f| %> <%= f.hidden_field :value, id: dom_id(feature), value: (feature.enabled? ? "" : "active") %> - <%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? 'disable' : 'enable'}"), - class: "button expanded #{feature.enabled? ? 'hollow alert' : 'success'}", + <%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? "disable" : "enable"}"), + class: "button expanded #{feature.enabled? ? "hollow alert" : "success"}", data: {confirm: t("admin.actions.confirm")}) %> <% end %>
- + "> <%= link_to t("admin.budgets.edit.edit_phase"), diff --git a/app/views/admin/legislation/proposals/toggle_selection.js.erb b/app/views/admin/legislation/proposals/toggle_selection.js.erb index 093afa904..d38292e9d 100644 --- a/app/views/admin/legislation/proposals/toggle_selection.js.erb +++ b/app/views/admin/legislation/proposals/toggle_selection.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@proposal) %> .select").html('<%= j render("select_proposal", proposal: @proposal) %>'); +$("#<%= dom_id(@proposal) %> .select").html("<%= j render("select_proposal", proposal: @proposal) %>"); diff --git a/app/views/admin/poll/booth_assignments/create.js.erb b/app/views/admin/poll/booth_assignments/create.js.erb index 8b278f7b3..7e50ea1bd 100644 --- a/app/views/admin/poll/booth_assignments/create.js.erb +++ b/app/views/admin/poll/booth_assignments/create.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@booth) %>").html('<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>'); +$("#<%= dom_id(@booth) %>").html("<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>"); diff --git a/app/views/admin/poll/booth_assignments/destroy.js.erb b/app/views/admin/poll/booth_assignments/destroy.js.erb index 8b278f7b3..7e50ea1bd 100644 --- a/app/views/admin/poll/booth_assignments/destroy.js.erb +++ b/app/views/admin/poll/booth_assignments/destroy.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@booth) %>").html('<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>'); +$("#<%= dom_id(@booth) %>").html("<%= j render("booth_assignment", booth: @booth, booth_assignment: @booth.assignment_on_poll(@poll)) %>"); diff --git a/app/views/admin/poll/booth_assignments/search_booths.js.erb b/app/views/admin/poll/booth_assignments/search_booths.js.erb index 72fd96f68..c773ce518 100644 --- a/app/views/admin/poll/booth_assignments/search_booths.js.erb +++ b/app/views/admin/poll/booth_assignments/search_booths.js.erb @@ -1 +1 @@ -$("#search-booths-results").html("<%= j render 'search_booths_results' %>"); \ No newline at end of file +$("#search-booths-results").html("<%= j render "search_booths_results" %>"); \ No newline at end of file diff --git a/app/views/admin/poll/booth_assignments/show.html.erb b/app/views/admin/poll/booth_assignments/show.html.erb index 5eb28ec7f..a19fb81a5 100644 --- a/app/views/admin/poll/booth_assignments/show.html.erb +++ b/app/views/admin/poll/booth_assignments/show.html.erb @@ -83,7 +83,7 @@
<%= l voting_date %> <%= system_count %>
+ "> <% if total_recounts.present? %> <%= total_recounts %> <% else %> diff --git a/app/views/admin/poll/shifts/search_officers.js.erb b/app/views/admin/poll/shifts/search_officers.js.erb index ba621d8f7..9a97db091 100644 --- a/app/views/admin/poll/shifts/search_officers.js.erb +++ b/app/views/admin/poll/shifts/search_officers.js.erb @@ -1 +1 @@ -$("#search-officers-results").html("<%= j render 'search_officers_results' %>"); \ No newline at end of file +$("#search-officers-results").html("<%= j render "search_officers_results" %>"); \ No newline at end of file diff --git a/app/views/admin/spending_proposals/_summary_table.html.erb b/app/views/admin/spending_proposals/_summary_table.html.erb index c0c127ee7..066febe07 100644 --- a/app/views/admin/spending_proposals/_summary_table.html.erb +++ b/app/views/admin/spending_proposals/_summary_table.html.erb @@ -8,7 +8,7 @@ <%= t("admin.spending_proposals.summary.cost_for_geozone") %>
<%= geozone.present? ? geozone.name : t("geozones.none") %> <% if spending_proposal.administrator.present? %> - <%= spending_proposal.administrator.name %> + "><%= spending_proposal.administrator.name %> <% else %> <%= t("admin.spending_proposals.index.no_admin_assigned") %> <% end %> diff --git a/app/views/admin/users/index.js.erb b/app/views/admin/users/index.js.erb index 021407a23..c984d0f5a 100644 --- a/app/views/admin/users/index.js.erb +++ b/app/views/admin/users/index.js.erb @@ -1 +1 @@ -$("#users").html("<%= j render 'users' %>"); +$("#users").html("<%= j render "users" %>"); diff --git a/app/views/budgets/_phases.html.erb b/app/views/budgets/_phases.html.erb index a5461b6be..61dd1904c 100644 --- a/app/views/budgets/_phases.html.erb +++ b/app/views/budgets/_phases.html.erb @@ -1,6 +1,6 @@
    <% current_budget.published_phases.each do |phase| %> -
  • +
  • ">

    <%= t("budgets.phase.#{phase.kind}") %>

    <%= l(phase.starts_at.to_date, format: :long) if phase.starts_at.present? %> diff --git a/app/views/budgets/ballot/lines/_refresh_ballots.js.erb b/app/views/budgets/ballot/lines/_refresh_ballots.js.erb index f81560d96..fac0f7172 100644 --- a/app/views/budgets/ballot/lines/_refresh_ballots.js.erb +++ b/app/views/budgets/ballot/lines/_refresh_ballots.js.erb @@ -1,8 +1,8 @@ <% if @investments.present? %> <% @investments.each do |investment| %> - $("#<%= dom_id(investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", + $("#<%= dom_id(investment) %>_ballot").html("<%= j render("/budgets/investments/ballot", investment: investment, investment_ids: investment_ids, - ballot: ballot) %>'); + ballot: ballot) %>"); <% end %> <% end %> diff --git a/app/views/budgets/ballot/lines/create.js.erb b/app/views/budgets/ballot/lines/create.js.erb index 1528062f7..24e9a5aef 100644 --- a/app/views/budgets/ballot/lines/create.js.erb +++ b/app/views/budgets/ballot/lines/create.js.erb @@ -1,9 +1,9 @@ -$("#progress_bar").html('<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>'); -$("#sidebar").html('<%= j render("/budgets/investments/sidebar") %>'); -$("#<%= dom_id(@investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", +$("#progress_bar").html("<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>"); +$("#sidebar").html("<%= j render("/budgets/investments/sidebar") %>"); +$("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot", investment: @investment, investment_ids: @investment_ids, - ballot: @ballot) %>'); + ballot: @ballot) %>"); <%= render "refresh_ballots", investment: @investment, diff --git a/app/views/budgets/ballot/lines/destroy.js.erb b/app/views/budgets/ballot/lines/destroy.js.erb index e2a91ed6f..0503609e1 100644 --- a/app/views/budgets/ballot/lines/destroy.js.erb +++ b/app/views/budgets/ballot/lines/destroy.js.erb @@ -1,11 +1,11 @@ -$("#progress_bar").html('<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>'); -$("#sidebar").html('<%= j render("budgets/investments/sidebar") %>'); -$("#ballot").html('<%= j render("budgets/ballot/ballot") %>') +$("#progress_bar").html("<%= j render("budgets/ballot/progress_bar", ballot: @ballot) %>"); +$("#sidebar").html("<%= j render("budgets/investments/sidebar") %>"); +$("#ballot").html("<%= j render("budgets/ballot/ballot") %>") -$("#<%= dom_id(@investment) %>_ballot").html('<%= j render("/budgets/investments/ballot", +$("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot", investment: @investment, investment_ids: @investment_ids, - ballot: @ballot) %>'); + ballot: @ballot) %>"); <%= render "refresh_ballots", investment: @investment, investment_ids: @investment_ids, diff --git a/app/views/budgets/ballot/lines/new.js.erb b/app/views/budgets/ballot/lines/new.js.erb index 2e8254866..6c8cecac4 100644 --- a/app/views/budgets/ballot/lines/new.js.erb +++ b/app/views/budgets/ballot/lines/new.js.erb @@ -1,2 +1,2 @@ -$("#<%= dom_id(@spending_proposal) %>_ballot").html('<%= j render("spending_proposals/ballot", spending_proposal: @spending_proposal) %>'); +$("#<%= dom_id(@spending_proposal) %>_ballot").html("<%= j render("spending_proposals/ballot", spending_proposal: @spending_proposal) %>"); $(".no-supports-allowed").show(); \ No newline at end of file diff --git a/app/views/budgets/investments/_flag_actions.html.erb b/app/views/budgets/investments/_flag_actions.html.erb index 94d47c571..400156828 100644 --- a/app/views/budgets/investments/_flag_actions.html.erb +++ b/app/views/budgets/investments/_flag_actions.html.erb @@ -1,6 +1,6 @@ <% if show_flag_action? investment %> - + "> @@ -12,7 +12,7 @@ <% end %> <% if show_unflag_action? investment %> - + "> diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index 9b63b935f..96785717e 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -1,5 +1,5 @@
    -
    +
    "> <% if feature?(:allow_images) && investment.image.present? %>
    diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb index fadebbadd..8d17f696e 100644 --- a/app/views/budgets/investments/_votes.html.erb +++ b/app/views/budgets/investments/_votes.html.erb @@ -4,7 +4,7 @@
    - + "> <%= t("budgets.investments.investment.supports", count: investment.total_votes) %> diff --git a/app/views/budgets/investments/vote.js.erb b/app/views/budgets/investments/vote.js.erb index 1a770d9c1..74ce74ccf 100644 --- a/app/views/budgets/investments/vote.js.erb +++ b/app/views/budgets/investments/vote.js.erb @@ -1,4 +1,4 @@ -$("#<%= dom_id(@investment) %>_votes").html('<%= j render("/budgets/investments/votes", +$("#<%= dom_id(@investment) %>_votes").html("<%= j render("/budgets/investments/votes", investment: @investment, investment_votes: @investment_votes, - vote_url: namespaced_budget_investment_vote_path(@investment, value: "yes")) %>'); + vote_url: namespaced_budget_investment_vote_path(@investment, value: "yes")) %>"); diff --git a/app/views/budgets/results/_results_table.html.erb b/app/views/budgets/results/_results_table.html.erb index bda81e268..7420aed7e 100644 --- a/app/views/budgets/results/_results_table.html.erb +++ b/app/views/budgets/results/_results_table.html.erb @@ -1,5 +1,5 @@ -
    " + style="<%= results_type != :compatible ? "display: none" : "" %>" id="<%= results_type %>-container">

    <%= title %>

    @@ -29,8 +29,8 @@ <% amount_available = heading_price %> <% investments.each do |investment| %>
<% if investment.winner? %> diff --git a/app/views/comments/_flag_actions.html.erb b/app/views/comments/_flag_actions.html.erb index 1925ced08..cac924994 100644 --- a/app/views/comments/_flag_actions.html.erb +++ b/app/views/comments/_flag_actions.html.erb @@ -3,7 +3,7 @@  |  + title="<%= t("shared.flag") %>">  |  + title="<%= t("shared.unflag") %>"> diff --git a/app/views/comments/_refresh_flag_actions.js.erb b/app/views/comments/_refresh_flag_actions.js.erb index 2084ac96a..8234e696e 100644 --- a/app/views/comments/_refresh_flag_actions.js.erb +++ b/app/views/comments/_refresh_flag_actions.js.erb @@ -1 +1 @@ -$("#flag-actions-<%= dom_id(@comment) %>").html('<%= j render("comments/flag_actions", comment: @comment) %>'); +$("#flag-actions-<%= dom_id(@comment) %>").html("<%= j render("comments/flag_actions", comment: @comment) %>"); diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index ead14152e..aa2bd9b1c 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -5,7 +5,7 @@ var comment_html = "<%= j(render @comment) %>" App.Comments.reset_form(commentable_id); App.Comments.add_comment(commentable_id, comment_html); <% else -%> - var parent_id = '<%= "comment_#{@comment.parent_id}" %>'; + var parent_id = "<%= "comment_#{@comment.parent_id}" %>"; App.Comments.reset_and_hide_form(parent_id); App.Comments.add_reply(parent_id, comment_html); <% end -%> diff --git a/app/views/comments/new.js.erb b/app/views/comments/new.js.erb index 963cdf16a..ad92cb822 100644 --- a/app/views/comments/new.js.erb +++ b/app/views/comments/new.js.erb @@ -1,5 +1,5 @@ <% dom_id = parent_or_commentable_dom_id(@comment.parent_id, @commentable) %> var field_with_errors = "#js-comment-form-<%= dom_id %> #comment-body-<%= dom_id %>"; -App.Comments.display_error(field_with_errors, "<%= j render('comments/errors') %>"); +App.Comments.display_error(field_with_errors, "<%= j render("comments/errors") %>"); diff --git a/app/views/comments/vote.js.erb b/app/views/comments/vote.js.erb index 11f0ad905..e56fb3d65 100644 --- a/app/views/comments/vote.js.erb +++ b/app/views/comments/vote.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@comment) %>_votes").html('<%= j render("comments/votes", comment: @comment) %>'); \ No newline at end of file +$("#<%= dom_id(@comment) %>_votes").html("<%= j render("comments/votes", comment: @comment) %>"); \ No newline at end of file diff --git a/app/views/debates/_flag_actions.html.erb b/app/views/debates/_flag_actions.html.erb index 21b5426c2..148c2cc7d 100644 --- a/app/views/debates/_flag_actions.html.erb +++ b/app/views/debates/_flag_actions.html.erb @@ -1,6 +1,6 @@ <% if show_flag_action? debate %> - + "> @@ -9,7 +9,7 @@ <% end %> <% if show_unflag_action? debate %> - + "> diff --git a/app/views/debates/_refresh_flag_actions.js.erb b/app/views/debates/_refresh_flag_actions.js.erb index f511f347f..f1ba6bc9a 100644 --- a/app/views/debates/_refresh_flag_actions.js.erb +++ b/app/views/debates/_refresh_flag_actions.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@debate) %> .js-flag-actions").html('<%= j render("debates/flag_actions", debate: @debate) %>'); +$("#<%= dom_id(@debate) %> .js-flag-actions").html("<%= j render("debates/flag_actions", debate: @debate) %>"); diff --git a/app/views/debates/vote.js.erb b/app/views/debates/vote.js.erb index 5f61d3ce2..cf9a98cd6 100644 --- a/app/views/debates/vote.js.erb +++ b/app/views/debates/vote.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@debate) %>_votes").html('<%= j render("debates/votes", debate: @debate) %>'); \ No newline at end of file +$("#<%= dom_id(@debate) %>_votes").html("<%= j render("debates/votes", debate: @debate) %>"); \ No newline at end of file diff --git a/app/views/follows/refresh_follow_button.js.erb b/app/views/follows/refresh_follow_button.js.erb index ad7a7d4f1..eb285d4fa 100644 --- a/app/views/follows/refresh_follow_button.js.erb +++ b/app/views/follows/refresh_follow_button.js.erb @@ -1,3 +1,3 @@ App.Followable.update("<%= dom_id(@follow.followable) %>", - "<%= j render('follow_button', follow: @follow) %>", - "<%= j render('layouts/flash') %>") + "<%= j render("follow_button", follow: @follow) %>", + "<%= j render("layouts/flash") %>") diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index 85d067fdd..4b772f614 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -6,7 +6,7 @@ <%= content_for :head %> - + ">
diff --git a/app/views/legislation/annotations/comments.js.erb b/app/views/legislation/annotations/comments.js.erb index b526745eb..4e5a676c7 100644 --- a/app/views/legislation/annotations/comments.js.erb +++ b/app/views/legislation/annotations/comments.js.erb @@ -1,7 +1,7 @@ if ($(".comment").length == 0) { - $("#comments-box").append("<%= j render('comments_box', annotation: @annotation) %>").show(); + $("#comments-box").append("<%= j render("comments_box", annotation: @annotation) %>").show(); } else { - $("#comments-box #comments").append("<%= j render('comments', annotation: @annotation) %>"); + $("#comments-box #comments").append("<%= j render("comments", annotation: @annotation) %>"); var current_annotation_link = $("#annotation-link a").attr("href") var sub_annotation_ids = current_annotation_link.split("=")[1]; diff --git a/app/views/legislation/annotations/new.js.erb b/app/views/legislation/annotations/new.js.erb index 21bdd03b0..600860d63 100644 --- a/app/views/legislation/annotations/new.js.erb +++ b/app/views/legislation/annotations/new.js.erb @@ -1 +1 @@ -$("#comments-box").html("<%= j render('form') %>"); +$("#comments-box").html("<%= j render("form") %>"); diff --git a/app/views/legislation/answers/create.js.erb b/app/views/legislation/answers/create.js.erb index 468b2610b..548a40b5d 100644 --- a/app/views/legislation/answers/create.js.erb +++ b/app/views/legislation/answers/create.js.erb @@ -1 +1 @@ -$("#legislation-answer-form").html('<%= j render("legislation/questions/answer_form", process: @process, question: @question, answer: @answer) %>'); +$("#legislation-answer-form").html("<%= j render("legislation/questions/answer_form", process: @process, question: @question, answer: @answer) %>"); diff --git a/app/views/legislation/processes/_key_dates.html.erb b/app/views/legislation/processes/_key_dates.html.erb index 748a1a470..4e8ab85c0 100644 --- a/app/views/legislation/processes/_key_dates.html.erb +++ b/app/views/legislation/processes/_key_dates.html.erb @@ -1,4 +1,4 @@ -
<%= l(date, format: :long) %>