Skip to content

Add multipart convenience argument to form_for helper.#1200

Merged
paulcsmith merged 1 commit intomasterfrom
unknown repository
Jun 22, 2020
Merged

Add multipart convenience argument to form_for helper.#1200
paulcsmith merged 1 commit intomasterfrom
unknown repository

Conversation

@wout
Copy link
Contributor

@wout wout commented Jun 20, 2020

Purpose

Closes #1192.

Description

Allows us to do:

form_for Project::Create, multipart: true do
  # ...
end

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this looks good!

end
end

private def build_form_options(route, html_options) : Hash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the abstraction!

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely implementation. Thanks @wout!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow multipart: true in forms.

3 participants