Module: SpreeBase::InstanceMethods
- Defined in:
- lib/spree_base.rb
Instance Method Summary collapse
- #access_forbidden ⇒ Object
- #title ⇒ Object
-
#title=(title) ⇒ Object
can be used in views as well as controllers.
Instance Method Details
#access_forbidden ⇒ Object
3 4 5 |
# File 'lib/spree_base.rb', line 3 def access_forbidden render :text => 'Access Forbidden', :layout => true, :status => 401 end |
#title ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/spree_base.rb', line 13 def title title_string = @title.blank? ? accurate_title : @title if title_string.blank? default_title else if Spree::Config[:always_put_site_name_in_title] [default_title, title_string].join(' - ') else title_string end end end |
#title=(title) ⇒ Object
can be used in views as well as controllers. e.g. <% title = ‘This is a custom title for this view’ %>
9 10 11 |
# File 'lib/spree_base.rb', line 9 def title=(title) @title = title end |