Hey guys, Dave Thomas noticed this on irc just now, but it seems AR::Base#save is always returning true now. http://dev.rubyonrails.org/changeset/417#file10 Is this deliberate? As it would seem to break the common idiom of: if @record.save redirect_to ... else handle errors end -- Cheers Koz
On May 6, 2005, at 7:03 PM, Michael Koziarski wrote:> Dave Thomas noticed this on irc just now, but it seems AR::Base#save > is always returning true now. > > http://dev.rubyonrails.org/changeset/417#file10 > > Is this deliberate? As it would seem to break the common idiom of:I''m not sure why the explicit ''return true'' was added here, but it doesn''t break save. Look at the validations mixin: it wraps the method and returns valid? jeremy
On May 6, 2005, at 9:12 PM, Jeremy Kemper wrote:> On May 6, 2005, at 7:03 PM, Michael Koziarski wrote: >> Dave Thomas noticed this on irc just now, but it seems AR::Base#save >> is always returning true now. >> >> http://dev.rubyonrails.org/changeset/417#file10 >> >> Is this deliberate? As it would seem to break the common idiom of: > > I''m not sure why the explicit ''return true'' was added here, but it > doesn''t break save. Look at the validations mixin: it wraps the > method and returns valid? >D''oh - thanks Dave (who''s getting too stressed and tired to think straight)