File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ class Admin::SeoController < Admin::BaseController
44 before_action :set_setting
55 before_action :set_section
66
7+ VALID_SECTIONS = %w( general titles permalinks ) . freeze
8+
79 def show
810 if @setting . permalink_format != "/%year%/%month%/%day%/%title%" &&
911 @setting . permalink_format != "/%year%/%month%/%title%" &&
@@ -37,8 +39,6 @@ def settings_keys
3739 @setting . settings_keys + [ :custom_permalink ]
3840 end
3941
40- VALID_SECTIONS = %w( general titles permalinks ) . freeze
41-
4242 def set_section
4343 section = params [ :section ]
4444 @section = VALID_SECTIONS . include? ( section ) ? section : "general"
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33class Admin ::SettingsController < Admin ::BaseController
4+ VALID_ACTIONS = %w( index write feedback display ) . freeze
5+
46 def index
57 this_blog . base_url = blog_base_url if this_blog . base_url . blank?
68 load_settings
@@ -33,8 +35,6 @@ def update
3335
3436 private
3537
36- VALID_ACTIONS = %w( index write feedback display ) . freeze
37-
3838 def settings_params
3939 @settings_params ||= params . require ( :setting ) . permit ( @setting . settings_keys )
4040 end
Original file line number Diff line number Diff line change 4747 scenario "Disallow account sign-up link with a blog setting" do
4848 Blog . first . update ( allow_signup : 0 )
4949 visit admin_dashboard_path
50+
51+ expect ( page ) . to have_text "You need to sign in or sign up before continuing."
5052 expect ( page ) . not_to have_link I18n . t ( "accounts.create_account" )
5153
5254 visit new_user_registration_path
You can’t perform that action at this time.
0 commit comments