Skip to content

Roadmap draft #14

Open
Open
@kirs

Description

@kirs

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
end

Instead of code above, we could provide some API.

Support other ORMs than ActiveRecord

Probably Mongoid and/or MongoMapper.

Guide about Form Objects on guides.rubyonrails.org

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions