diff --git a/README.md b/README.md index 70dec80fd2..adb12f1671 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ For example, these settings: ```ruby # config/initializers/alchemy.rb -Alchemy.admin_path = '/backend' +Alchemy.admin_path = 'backend' Alchemy.admin_constraints = {subdomain: 'hidden'} ``` diff --git a/lib/alchemy/paths.rb b/lib/alchemy/paths.rb index 232323dce1..241eeca1c5 100644 --- a/lib/alchemy/paths.rb +++ b/lib/alchemy/paths.rb @@ -4,7 +4,7 @@ # # Alchemy has some defaults for admin path and admin constraints: # -# +Alchemy.admin_path defaults to +'/admin'+ +# +Alchemy.admin_path defaults to +'admin'+ # +Alchemy.admin_constraints defaults to +{}+ # # Anyway, you can tell Alchemy about your routing configuration: @@ -17,11 +17,11 @@ # # == Example # -# If you do not wish to use the default admin interface routing ('example.com/admin/') -# and prefer e.g. 'hidden.example.com/backend/', those are the settings you need: +# If you do not wish to use the default admin interface routing ('example.com/admin') +# and prefer e.g. 'hidden.example.com/backend', those are the settings you need: # # # config/initializers/alchemy.rb -# Alchemy.admin_path = '/backend' +# Alchemy.admin_path = 'backend' # Alchemy.admin_constraints = {subdomain: 'hidden'} # module Alchemy @@ -29,6 +29,6 @@ module Alchemy # Defaults # - @@admin_path = '/admin' + @@admin_path = 'admin' @@admin_constraints = {} end diff --git a/spec/libraries/paths_spec.rb b/spec/libraries/paths_spec.rb index 0c08db7b8b..ffa11ef8f4 100644 --- a/spec/libraries/paths_spec.rb +++ b/spec/libraries/paths_spec.rb @@ -4,7 +4,7 @@ module Alchemy describe 'Paths' do describe 'defaults' do it 'has default value for Alchemy.admin_path' do - expect(Alchemy.admin_path).to eq('/admin') + expect(Alchemy.admin_path).to eq('admin') end it 'has default value for Alchemy.admin_constraints' do diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 8f863a2e41..a402107388 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -205,7 +205,7 @@ context "customized" do before(:all) do - Alchemy.admin_path = "/backend" + Alchemy.admin_path = "backend" Alchemy.admin_constraints = {subdomain: "hidden"} Rails.application.reload_routes! end @@ -232,7 +232,7 @@ end after(:all) do - Alchemy.admin_path = "/admin" + Alchemy.admin_path = "admin" Alchemy.admin_constraints = {} Rails.application.reload_routes! end