Hello,

I know this change made it into 4.0, with a deprecation in 3.2 and was
later reverted (I believe) so as not to deprecate functionality in a patch
release.

I think the intent was for update_attribute to still be deprecated in 4.0.
 Is this right?

If so, I've submitted a pull request to do this deprecation:

https://github.com/rails/rails/pull/9383

Is it indeed intended to be deprecated?

Thanks,
Andrew.


On Thu, Aug 9, 2012 at 6:43 AM, Alexander Pavlenko <alerti...@gmail.com>wrote:

> But I want to notice, that column != attribute in common case, for example:
>
> > User.first.update_column :password, '123123'
>   SQL (0.2ms)  UPDATE "users" SET "password" = '123123' WHERE "users"."id"
> = 1
> ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column:
> password: UPDATE "users" SET "password" = '123123' WHERE "users"."id"
>
> > User.first.update_attribute :password, '123123'
>    (0.4ms)  UPDATE "users" SET "password_digest" =
> '$2a$10$x3GxNtIEClpqJD1kwGKFneOWh6v9JJbdeb9KW36qN8R2oPdcr/hPG',
> "updated_at" = '2012-08-09 13:38:53.459408' WHERE "users"."id" = 1
>
> среда, 13 июня 2012 г., 19:37:52 UTC+4 пользователь MikeGehard написал:
>
>> Greetings all,
>>
>> I would like to start a conversation about the subtle difference between
>> update_attribute and update_attributes, namely that update_attribute skips
>> validations and update_attributes does not skip validations.
>>
>> I know this has been around for a while but is Rails 4 the time to make
>> them both respect validations? I am willing to do the work if the core team
>> feels like it would be a worthwhile breaking change.
>>
>> I don't have a ton of context on the history but as I talk to more and
>> more beginners (and advanced) Rails folks, that subtle difference does trip
>> people up.
>>
>> Thanks,
>> Mike
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-core/-/6KLIU1Jn2mMJ.
>
> To post to this group, send email to rubyonrails-core@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-core+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-core?hl=en.
>



-- 
Andrew Mutz
Director of Software Engineering
AppFolio, Inc.

andrew.m...@appfolio.com <aimee.mil...@appfolio.com>
-------------------------------------------------------
Find Us Online --
www.AppFolio.com
www.Facebook.com/AppFolio
www.RentApp.com

-- 
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 rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to