search for: stock_requirement

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

2012 Mar 11
1
notifications (or flash messages) in an api application
...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 other stuff .... end what i am asking you: Is there any way to play with those notifications and errors without...