Skip to content

Commit

Permalink
TB-60 #time 30m Fix profile controller errors
Browse files Browse the repository at this point in the history
  • Loading branch information
marjinal1st committed Nov 27, 2014
1 parent 8dd1192 commit 653ad04
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def configure_bullet
Bullet.alert = true
Bullet.bullet_logger = true
end
RUBY
RUBY

configure_environment 'development', config
end
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion templates/app/controllers/hq/admin_profiles_controller.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion templates/app/controllers/user_profiles_controller.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 653ad04

Please sign in to comment.