diff --git a/lib/cybele/app_builder.rb b/lib/cybele/app_builder.rb index 8bde6b1..10c5f46 100644 --- a/lib/cybele/app_builder.rb +++ b/lib/cybele/app_builder.rb @@ -121,7 +121,7 @@ def configure_bullet Bullet.alert = true Bullet.bullet_logger = true end - RUBY + RUBY configure_environment 'development', config end @@ -264,14 +264,14 @@ def setup_profile_editors inject_into_file 'config/routes.rb', :after => "namespace :hq do\n" do <<-RUBY root to: 'dashboard#index' resource :admin_profile, except: [:destroy], path: 'profile' - RUBY + RUBY end - inject_into_file 'config/routes.rb', :after => "'welcome#index'\n" do <<-RUBY + inject_into_file 'config/routes.rb', :after => "to: 'welcome#index'\n" do <<-RUBY - resource :user_profile, except: [:destroy], path: 'profile' +resource :user_profile, except: [:destroy], path: 'profile' - RUBY + RUBY end end diff --git a/templates/app/controllers/hq/admin_profiles_controller.rb b/templates/app/controllers/hq/admin_profiles_controller.rb index 01ad4c3..1708a1a 100644 --- a/templates/app/controllers/hq/admin_profiles_controller.rb +++ b/templates/app/controllers/hq/admin_profiles_controller.rb @@ -1,6 +1,6 @@ # encoding: UTF-8 class Hq::AdminProfilesController < Hq::ApplicationController - before_action :profile_controller + before_action :profile_controller, except: [:new] before_action :set_admin_profile, only: [:show, :edit, :update, :destroy] add_breadcrumb I18n.t('activerecord.models.admin_profiles'), :hq_admin_profile_path diff --git a/templates/app/controllers/user_profiles_controller.rb b/templates/app/controllers/user_profiles_controller.rb index c5c7ad6..191da77 100644 --- a/templates/app/controllers/user_profiles_controller.rb +++ b/templates/app/controllers/user_profiles_controller.rb @@ -1,6 +1,7 @@ # encoding: UTF-8 class UserProfilesController < ApplicationController - before_action :profile_controller + before_action :authenticate_user! + before_action :profile_controller, except: [:new] before_action :set_user_profile, only: [:show, :edit, :update, :destroy] add_breadcrumb I18n.t('activerecord.models.user_profiles'), :user_profile_path