I'm wondering if it???s possible to differentiate two association instances ??? one that was eager loaded and one that wasn't. example: https://gist.github.com/remiprev/3dbe87971e0841e2930f
I'm trying to get ActiveSupport autoloading and inflector work with an HTMLHelper module but I'm getting a circular dependency error. Here are the relevant files: https://gist.github.com/remiprev/f331f48576ef409babf4
pskrz: but I'm not including it manually. Rails does it because it's in app/helpers, right?
is there way to know if a certain record has been loaded from .find_by_sql?
for example, User.find_by_sql("select id from users limit 1") returns [<User id=1>] but User has more fields
I mean, is there a way to check if a loaded record has all its attributes?
tubbo: exactly. but in an "after_initialize" callback, I'd like to know if the object has more attributes than the ones that are loaded
tubbo: just thought of something. all possible fields for User are available in User.columns; I could check if the record has the same number of attributes as the count of User.columns