Skip to content

Instantly share code, notes, and snippets.

@abhishek0
Created August 16, 2013 12:18
Show Gist options
  • Save abhishek0/6249352 to your computer and use it in GitHub Desktop.
Save abhishek0/6249352 to your computer and use it in GitHub Desktop.
object @user
attributes *(@user.class.column_names - %w{id user_type parent_id stamp_id created_at updated_at password_digest access_token})
child :stamp => :contact do |stamp|
glue(stamp.contact) { attributes :first_name, :last_name, :email, :contact1, :contact2 }
end
node(:status) {|user| user.stamp.status }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment