Skip to content

gregmoreno/fancy_serializer

Repository files navigation

fancy_serializer Build Status

fancy_serializer builds on top of Rails serialize method to create accessors for your serialized fields.

Please read this post as I explain my motivation behind this.

Basically, it lets you do the following in your ActiveRecord models.

class User
  serializeable :preferences, { :show_email => false }
end

u = User.new :show_email => true
u.show_email
=> true

u = User.new
u.show_email
=> false
u.show_email = true
=> true

u = User.new :show_email => true
u.save

u = User.find(u)
u.show_email
=> true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •