Displaying 1 result from an estimated 1 matches for "catch_control".
Did you mean:
pitch_control
2006 Jul 07
7
Sequencing control with edit method in CRUD examples
...e of tutorials building a fish
tournament scoring piece and am having a bit of a problem with a DB
field called "points" in my "catch" table that is not input by the user
but is calulated based on a "size" field that 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)
en...