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

pass parameters to new forms when model is namespaced #2701

Merged
merged 2 commits into from
Feb 13, 2017

Conversation

loicginoux
Copy link
Contributor

When model is namespaced, the prepopulation of the new form via params didn't work.
That should fix it.

@loicginoux loicginoux changed the title pass parameters to new forms when model is namepsaced pass parameters to new forms when model is namespaced Aug 25, 2016
@mshibuya
Copy link
Member

mshibuya commented Oct 8, 2016

Why is this fix needed? Isn't it enough to pass 'cms~basic_page' => {title: 'Hello'}?

@loicginoux
Copy link
Contributor Author

No it didn't work, I committed a test for this case.

@lazebny
Copy link
Contributor

lazebny commented Feb 11, 2017

@mshibuya i see the same issue.

@lazebny
Copy link
Contributor

lazebny commented Feb 11, 2017

@loicginoux could you rebase these commits in one ? (might this is blocker for merge)


describe 'GET /admin/cms_basic_page/new with parameters for pre-population' do
it 'populates form field when corresponding parameters are passed in' do
visit new_path(model_name: 'cms~basic_page', cms_basic_page: {title: 'Hello'})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

which before block do you mean ? the one in line 20 is not called in this test.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh sorry, you are right.

@Eversilence
Copy link

I am having the same issues with forms.. Would be great if proposed PR would be merged

@mshibuya mshibuya merged commit bfdcf35 into railsadminteam:master Feb 13, 2017
@mshibuya
Copy link
Member

Merged in, thanks!

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.

4 participants