Use local variables in _form.html.erb generated by scaffold. - #13434
Merged
Conversation
Member
There was a problem hiding this comment.
`_form.html.erb` partial generated by scaffold.
Member
|
👍 |
Contributor
|
@tanraya can you squash your commits please? Also, they don't apply cleanly into master. You'll need to rebase. |
Contributor
Author
|
@dmathieu I will do. |
Contributor
Author
|
@dmathieu done |
Member
There was a problem hiding this comment.
you should verify what should be there, not what shouldn't be there.
Contributor
|
I added the suggested test case, see jamo@a0b548d (all tests passes) |
Member
|
@tanraya did you get some time to update this PR? thanks |
Contributor
Author
|
@arunagw Yes. Updated now. |
Member
|
@tanraya seems test broke. Can you see those as well ? |
Member
There was a problem hiding this comment.
It seems this should not be removed.
It seems a good idea to use local variables in generated partials instead of using instance variables.
Before
<%= render 'form' %>
After
<%= render 'form', product: @Product %>
Contributor
Author
|
@carlosantoniodasilva @arunagw Now its done. All tests passed. |
carlosantoniodasilva
added a commit
that referenced
this pull request
Jan 3, 2015
Use local variables in _form.html.erb generated by scaffold. Conflicts: railties/CHANGELOG.md
carlosantoniodasilva
added a commit
that referenced
this pull request
Jan 3, 2015
prathamesh-sonpatki
added a commit
to prathamesh-sonpatki/rails
that referenced
this pull request
Jun 11, 2016
christiannelson
added a commit
to carbonfive/raygun-rails
that referenced
this pull request
Jul 1, 2016
See rails/rails#13434 for reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems a good idea to use local variables in generated partials instead of using instance variables.
Before
After