Skip to content

Add Forms support #35

Description

@sam

Something like [bureaucrat]. I'm imagining a /forms directory off the application root. So Forms are a first-class-citizen just like /controllers, /models, etc.

This would be a good place to stick much of the standard logic that makes up an action so actions could be boiled down to something like:

update do |id|
  @form = UserForm.new(User.get(id))
  if @form.save
    redirect "users/index"
  else
    render "users/edit"
  end
end

We could riff on that as a starting point perhaps. Hopefully that gives the general idea though. Forms would handle Validation and Security. Not models.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions