[Nitro] Help with form_to_
john at oxyliquit.de
Fri Nov 24 14:00:54 EST 2006
> Wrong parameter count for update().
ah ah.... this might be connected to param injecting somehow...
please add those line to your run.rb before Nitro.start :
Nitro::Compiler.mixin_get_parameters = false
In short, this method prevents nitro from mixing in the get
parameters into the argument list of the function.
This could make my version of the method work.
George: can you verify that the params are working correctly
with the setting to true? I think I've seen this error message
the second time now...
> def update( oid, name, description, age )
> In file 'C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-126.96.36.199-mswin32/lib/sqlite3/errors.rb'
Not sure, like you said, too generic error. Og is a bit fast at swallowing
errors. Set `$DBG = true` in your run.rb to get Og to fail on bad
sql and other errors, this should show you what went wrong.
> Now I wonder if I'm calling the correct method to save a new user. I
> grep the Nitro directory for find_or_create_by_name and find that only
> the Tag class uses this method. Looks like I should instead, be using
This method is 'cought' in `method_missing` and redirected to the method
In the way I designed you the .update method the age and the rest gets
set by request.fill(obj). It just uses the name to create a new one
(and the name thus should be set unique in the model).
Feel the love
More information about the Nitro-general