Models and Nested Forms
问题 I'm building an app that provides functionality for both consumers and businesses. In creating my models, I'm thinking of having user (consumer) and business...where each business would also have user(s), but users wouldn't necessarily belong to a business. To reduce redundancy I'd collect name, email, etc in User and specific business info (address, phone) in Business. class Business < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_one :business #only if business