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

Fix resume form. As it did not create nested items when form is submitted #193

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

artemrakov
Copy link
Contributor

No description provided.

@@ -10,8 +10,9 @@ def new
end

def create
form = Web::Account::ResumeForm.new(resume_params)
@resume = current_user.resumes.build form.attributes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Когда мы эту штуку делаем, тут не передаются nested_attributes. Только attribute resume и все. Поэтому мы теряем наши nested при создании. Не знаю, как active_form_model должна юзера перекидывать. Сделал по самому простому. Если одобришь, добавлю еще example в сам гем, если нужно

@mokevnin mokevnin merged commit 1c95253 into Hexlet:master Oct 26, 2020
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.

2 participants