search for: bait_id

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

Did you mean: bag_id
2006 Jul 07
7
Sequencing control with edit method in CRUD examples
...hat is input by the user. I have the following in my catch_controller.db def new @catch = Catch.new @fish = Fish.find_all @bait = Bait.find_all end def create @catch = Catch.new(@params[''catch'']) @catch.datetime = DateTime.now @catch.points = @catch.size if @catch.bait_id == 2 @catch.points = @catch.size + (@catch.size/10) end if @catch.bait_id == 3 @catch.points = @catch.size + (@catch.size/5) end if @catch.save redirect_to :action => ''list'' else render_action ''new'' end end Granted it...