ActiveRecord includes. Specify included columns
Rails doesn’t have the facility to pass the options for include query. But we can pass these params with the association declaration under the model. For your scenario, you need to create a new association with users model under the profile model, like below belongs_to :user_only_fetch_email, :select => “users.id, users.email”, :class_name => “User” I just … Read more