Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multipart convenience argument to form_for helper. #1200

Merged
merged 1 commit into from Jun 22, 2020
Merged

Add multipart convenience argument to form_for helper. #1200

merged 1 commit into from Jun 22, 2020

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!

@@ -24,6 +23,16 @@ module Lucky::FormHelpers
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