I think the error makes sense with update_columns and not with update_attributes. Since the former is essentially a pass through to the database, and the database would raise an error without any columns to update, I'd expect an error when the method is used that way as well.
On Thursday, May 7, 2015, Rafael Mendonça França <[email protected]> wrote: > Yes. It is raised by `update_all(attributes)`. > > On Thu, May 7, 2015 at 3:19 PM Xavier Noria <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > >> It makes sense to me, you get passed a hash with the attributes to >> update, which could be none. >> >> This is a no-op edge-case similar to append an empty list to a list, >> etc., and could have use cases where the hash is built programatically. >> >> The implementation generally uses iterators, which is the normal way to >> support these edge-cases with no explicit handling, maybe the exception is >> raised by update_all(attributes) >> >> >> https://github.com/rails/rails/blob/master/activerecord/lib/active_record/persistence.rb#L312 >> >> ? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] >> <javascript:_e(%7B%7D,'cvml','rubyonrails-core%[email protected]');> >> . >> To post to this group, send email to [email protected] >> <javascript:_e(%7B%7D,'cvml','[email protected]');>. >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','rubyonrails-core%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
