Skip to content

Instantly share code, notes, and snippets.

@Jaffery5
Last active August 29, 2015 14:06
Show Gist options
  • Save Jaffery5/d9e90bc4ce7a219732b7 to your computer and use it in GitHub Desktop.
Save Jaffery5/d9e90bc4ce7a219732b7 to your computer and use it in GitHub Desktop.
Query emails of all users who has a profile
class Profile < ActiveRecord::Base
attr_accessible :name, :number
belongs_to :user
end
class User < ActiveRecord::Base
attr_accessible :email, :password, :password_confirmation,:first_name, :last_name
has_one :profile
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment