Last active
August 29, 2015 14:03
-
-
Save imajes/941f11748dd49c7f6b28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main » u = UserExperiment.find_by_email('---') | |
D, [2014-07-14T19:12:44.447225 #58587] DEBUG -- : UserExperiment Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = '---' LIMIT 1 | |
#<UserExperiment:0x000001021c8178> { | |
:id => 490, | |
:login => "imajes", | |
:email => "---", | |
:encrypted_password => "...", | |
:reset_password_token => "LdSS1bpDFTXyziEn7s_7", | |
:reset_password_sent_at => nil, | |
:remember_created_at => nil, | |
:sign_in_count => 2, | |
:current_sign_in_at => Mon, 14 Jul 2014 20:50:48 UTC +00:00, | |
:last_sign_in_at => Thu, 10 Jul 2014 19:43:15 UTC +00:00, | |
:current_sign_in_ip => "127.0.0.1", | |
:last_sign_in_ip => "127.0.0.1", | |
:created_at => Tue, 10 Jun 2014 15:13:08 UTC +00:00, | |
:updated_at => Mon, 14 Jul 2014 21:22:02 UTC +00:00, | |
:facebook_id => nil, | |
:admin => true, | |
:status => "active", | |
:settings => {}, | |
:confirmation_token => nil, | |
:confirmed_at => nil, | |
:confirmation_sent_at => nil, | |
:unconfirmed_email => nil | |
} | |
main » u.settings | |
{} | |
main » u.settings["mouse"] = 'cat' | |
"cat" | |
main » u.settings | |
{ | |
"mouse" => "cat" | |
} | |
main » u.settings_changed? | |
false | |
main » u.save | |
D, [2014-07-14T19:13:02.176602 #58587] DEBUG -- : (0.2ms) BEGIN | |
D, [2014-07-14T19:13:02.179569 #58587] DEBUG -- : (0.1ms) COMMIT | |
true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserExperiment < ActiveRecord::Base | |
store_accessor :settings | |
# validates :email_price_alert, inclusion: [true, false] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment