Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ApplicationController < ActionController::Base
- def is_coach?
- user_signed_in? ? current_user.is_coach : 'false'
- end
- protected
- end
- undefined method `is_coach?'
- #config/navigation.rb
- SimpleNavigation::Configuration.run do |navigation|
- navigation.selected_class = 'current'
- navigation.items do |primary|
- primary.item :home, 'Home', '/'
- primary.item :home, 'Clients', '/clients', class: 'special', if: -> { is_coach? }
- end
- end
- <%= render_navigation %>
- def is_coach?
- user_signed_in? ? current_user.is_coach : 'false'
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement