Roadmap draft
Opened this issue · 2 comments
kirs commented
Me and @m-Peter discussed some plans about the future of activeform.
Composite resources
Imagine the case when in user signup form user can enter company name and the company will be automatically created:
class UserWithCompanyForm > ActiveForm::Base
self.main_model = :user
attributes :email, :password, :company_name, presence: true
def save
if @model.save
Company.create(owner_id: @model.id, name: company_name)
true
else
false
end
end
endInstead of code above, we could provide some API.
Support other ORMs than ActiveRecord
Probably Mongoid and/or MongoMapper.