Yes `Type::Value` is the identity type. (And I recommend always using the class names never the symbol form personally)
-
-
Replying to @sgrif
Does it matter `ActiveModel::Type::Value` versus `ActiveRecord::Type::Value` matter? I have to call `.new` right?
1 reply 0 retweets 0 likes -
Replying to @ravinggenius
You need to call .new. You can just do `Type::http://Value.new `
1 reply 0 retweets 0 likes -
Replying to @sgrif
I tried that, but Ruby can't find `Type` correctly. :(
3 replies 0 retweets 0 likes -
Replying to @ravinggenius
So yeah you might need to do `ActiveModel::Type::http://Value.new `
1 reply 0 retweets 0 likes -
Replying to @sgrif
No worries! One more: I started using attribute instead of attr_accessor because it would show the attribute when inspecting... 1/n
3 replies 0 retweets 0 likes -
Replying to @ravinggenius
And yes I sometimes call the attributes API "my horrendously over-engineered replacement for attr_accessor". XD
1 reply 0 retweets 0 likes -
Replying to @sgrif
But I want to see my virtual attributes when inspecting. That was the only reason I started using attribute instead of attr_accessor.
1 reply 0 retweets 0 likes -
-
Monkey patch in the mean time: https://gist.github.com/sgrif/df12fe90fa44784ac8b6f2e6ac816d0a …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.