form_with from different model

20 views
Skip to first unread message

fugee ohu

unread,
Mar 3, 2020, 10:02:48 AM3/3/20
to Ruby on Rails: Talk
In tour_dates show view I've added a form to create a new press_release but on submit the request doesn't include a prepended press_release: { it just starts with {"authenticity token
This is my form Why doesn't the parameters include a prepended press_release object?

<%= form_with model: @press_release, url: create_user_tour_press_release_path(artist_id: @artist.id, tour_id: @tour.id, poster_id: current_user.id, poster_type: 'User') do |f| %>

Reply all
Reply to author
Forward
0 new messages