search for: nexts_number

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

2006 May 12
1
Some error about adding.
...exch(@id,@type) end def exch(user_id,this_type) @user = User.find(:condtions => "id = " + user_id) @ranks = ["xw","w","m","l","xl","s","ss"] if @user.send(this_type) >= 3 @this_type = @ranks.index(this_type) @nexts_number = @this_type.to_i + 1 @next_type = @ranks[@nexts_number] @user.send(@next_type) += 1 @user.send(type) @user.save_with_validation(false) flash[:notice] = "Exchange complete." else flash[:notice] = "Exchange not met." end redirect_to :action => "upgrade" end He...