Do we have enough use cases to support adding the _was method?

On Mon, Aug 19, 2013 at 11:10 PM, Nathan Broadbent <[email protected]>wrote:

> Dear Rails Core mailing list,
>
> I would like to propose some additions to the #store_accessor method, so
> that also defines query and  _was methods.
>
> Example usage:
>
> class User < ActiveRecord::Base
>   store :settings, accessors: [ :color, :homepage ], coder: JSON
> end
>
> u = User.create(color: 'black', homepage: '37signals.com')
>
>
>
> u.color?  # => true
>
> u.color = 'white'
> u.color_was  # => "black"
>
>
> I can submit a PR if you support the change.
>
>
> Thanks,
> Nathan
>
>  --
> 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/groups/opt_out.
>



-- 
Mohamed Wael Khobalatte

-- 
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/groups/opt_out.

Reply via email to