diff --git a/app/controllers/management/proposals_controller.rb b/app/controllers/management/proposals_controller.rb index a8c51edd0..4d96af093 100644 --- a/app/controllers/management/proposals_controller.rb +++ b/app/controllers/management/proposals_controller.rb @@ -7,7 +7,7 @@ class Management::ProposalsController < Management::BaseController before_action :parse_search_terms, only: :index has_orders %w{confidence_score hot_score created_at most_commented random}, only: [:index, :print] - has_orders %w{confidence_score created_at}, only: :show + has_orders %w{most_voted newest}, only: :show def vote @proposal.register_vote(current_user, 'yes') diff --git a/app/controllers/moderation/comments_controller.rb b/app/controllers/moderation/comments_controller.rb index cf3197383..d5fbf7954 100644 --- a/app/controllers/moderation/comments_controller.rb +++ b/app/controllers/moderation/comments_controller.rb @@ -2,7 +2,7 @@ class Moderation::CommentsController < Moderation::BaseController include ModerateActions has_filters %w{pending_flag_review all with_ignored_flag}, only: :index - has_orders %w{flags created_at}, only: :index + has_orders %w{flags newest}, only: :index before_action :load_resources, only: [:index, :moderate] diff --git a/config/locales/moderation.en.yml b/config/locales/moderation.en.yml index b66ffd136..5c85ebf69 100755 --- a/config/locales/moderation.en.yml +++ b/config/locales/moderation.en.yml @@ -24,7 +24,7 @@ en: with_ignored_flag: "Marked as viewed" order: "Order" orders: - created_at: "Newest" + newest: "Newest" flags: "Most flagged" confirm: "Are you sure?" debates: diff --git a/config/locales/moderation.es.yml b/config/locales/moderation.es.yml index 6b4a64692..d99a48877 100644 --- a/config/locales/moderation.es.yml +++ b/config/locales/moderation.es.yml @@ -24,7 +24,7 @@ es: with_ignored_flag: "Marcados como revisados" order: "Orden" orders: - created_at: "Más nuevos" + newest: "Más nuevos" flags: "Más denunciados" confirm: "¿Estás seguro?" debates: diff --git a/spec/features/management/proposals_spec.rb b/spec/features/management/proposals_spec.rb index e33c1a179..ffab09f55 100644 --- a/spec/features/management/proposals_spec.rb +++ b/spec/features/management/proposals_spec.rb @@ -197,4 +197,4 @@ feature 'Proposals' do end end -end \ No newline at end of file +end diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 1774a1585..4a7249042 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -104,15 +104,15 @@ feature 'Moderate comments' do scenario "remembering page, filter and order" do create_list(:comment, 52) - visit moderation_comments_path(filter: 'all', page: '2', order: 'created_at') + visit moderation_comments_path(filter: 'all', page: '2', order: 'newest') click_on "Mark as viewed" - expect(page).to have_selector('.js-order-selector[data-order="created_at"]') + expect(page).to have_selector('.js-order-selector[data-order="newest"]') expect(current_url).to include('filter=all') expect(current_url).to include('page=2') - expect(current_url).to include('order=created_at') + expect(current_url).to include('order=newest') end end @@ -174,7 +174,7 @@ feature 'Moderate comments' do create(:comment, body: "Flagged newer comment", created_at: Time.now - 12.hours, flags_count: 3) create(:comment, body: "Newer comment", created_at: Time.now) - visit moderation_comments_path(order: 'created_at') + visit moderation_comments_path(order: 'newest') expect("Flagged newer comment").to appear_before("Flagged comment") @@ -182,7 +182,7 @@ feature 'Moderate comments' do expect("Flagged comment").to appear_before("Flagged newer comment") - visit moderation_comments_path(filter: 'all', order: 'created_at') + visit moderation_comments_path(filter: 'all', order: 'newest') expect("Newer comment").to appear_before("Flagged newer comment") expect("Flagged newer comment").to appear_before("Flagged comment")