Hi
Can we add impression.rb to app/models that takes in user_id from a table other than users table? I tried adding belongs_to association but it does not work.
class SomeUser < ActiveRecord::Base
validate :user_name
end
Is there some way I can access this as Impression.first.user_name => which gives me the current user name for that particular impression
Hi Can we add
impression.rb
toapp/models
that takes in user_id from a table other thanusers
table? I tried addingbelongs_to
association but it does not work.class SomeUser < ActiveRecord::Base validate :user_name end
Is there some way I can access this as Impression.first.user_name => which gives me the current user name for that particular impression
Kind Regards Sithara