Permalink
Browse files

docs

  • Loading branch information...
1 parent 55a170c commit 429338a32d7f0f927a258e0b203e286813b85af2 @slawosz committed Feb 13, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 app/helpers/rentals_helper.rb
@@ -1,14 +1,17 @@
module RentalsHelper
+ # dont render field for daily_fee which is set by after_save model callback
def form_attributes_keys
super - [:daily_fee]
end
+ # add attribute which represents model instance methods
def show_attributes
hash = {:total_cost => {:display => :simple}}
super.merge(hash)
end
+ # this method returs array which keys to attributes in show action
def show_attributes_keys
super + [:total_cost]
end

0 comments on commit 429338a

Please sign in to comment.