search for: money_requir

Displaying 1 result from an estimated 1 matches for "money_requir".

2012 Mar 11
1
notifications (or flash messages) in an api application
...instance variables : @notifications and @api_errors. Now, the problem would be the validation of the user action, and here might be several messages to send: - Stock finished - No money - No access to this feature ... - CC invalid ... etc now ... i can do my checks like if false == money_requirement? self.add_api_error "You do not have enough money" end if false == product.stock_requirement? self.add_api_error .... end But the main problem ... would be now, the method of trigger the action. if self.api_errors.size == 0 # do play with the user account, stocks and oth...