Let's say we do:
default_scope :select => '*, 1+1 AS woah'
in the model, we can access woah as a method on the model, but this is the line. How can we do this so that it is an integer?
In my real example, I actually select the identifier from the joined table, but it is typed as a string. I need it to be an integer in a ruby.
source
share