Displaying 2 results from an estimated 2 matches for "manpul".
Did you mean:
manul
2007 Jul 25
5
set_default_values rocket science - continuing after_initialize/after_find misfeature
Just starting a new thread so that it''s easy to follow.
I just submitted a patch at trac to add a new class method called
"set_default_values" ( not a great name I think ), which lets you do
all kinds of crazy stuff with setting default values.
This ticket is at http://dev.rubyonrails.org/ticket/9093 and example
pastie is at http://pastie.caboo.se/81925
It also lets you make
2006 Apr 06
1
Preventing data being written to the database on error
Hello,
How do I stop data being written to the database when an error occurs?
I have this in my controller:
if @item.valid?
#stuff here
else
render :action => ''show'', :id => @item
end
When it enters the else section, it renders the ''show'' action, but it
adds the data to the database. How do I prevent this from happening?
Thanks
--
Posted