Ruby on Rails - Railscasts PRO #403 Dynamic Forms (pro)
Why Stack Overflow recommends it
Stack Overflow users link it when answering or asking about Rails forms that need dynamic fields, nested attributes, or serialized properties.
Recommended by 1 people across 1 different months, 2016 to 2016.
What it is
A 14-minute Railscasts PRO episode (#403) on building dynamic forms in Ruby on Rails, where one form defines the fields of another, including custom field types. It is presented in the Railscasts screencast style and re-hosted on the Railscasts Reloaded channel.
What people said
Recommends kjmagic13 · 2016-01 · Stack Overflow · on “has_and_belongs_to_many: how to get correct relations? (JSON output)”
@MuteMinute, I'm taking a shot in the dark here and assuming you're trying to accomplish something along the lines of Ryan Bate's example of Dynamic Forms. Check out his video on YouTube [this video] . I also recommend you read this great article on Why You Don’t Need Has_and_belongs_to_many Relationships [LINK] .
Cites user1682647 · 2016-08 · Stack Overflow · on “How to insert serialized data into database using rails console”
I added dynamic form fields to my rails app folowing the tutorial on this link railscasts [LINK] or [this video] and the source code github [LINK] creating/updating using forms data works well as expected. however, I get the following error undefined method `humanize' for :author:Symbol when I try viewing the product inserted using console with this command for example Product.create(product_type_id: 1, name: "refactoring", price: 24.99, properties: {author: "Martin Fowler", page_count: 197, paperback: 1 } ) examining the database I noticed that the data inserted through the console doesn't get serialized example data submitted through form: --- !ruby/hash:ActionController::Parameters author: Mar
Cites beastlyCoder · 2016-12 · Stack Overflow · on “NoMethod error fields Nested Attributes”
I've been following this railscast: [this video] for learning how to implement nested attributes into my application. When I implement his code in the certain areas necessary I always get the same NoMethod error on the fields. [LINK] On the events show page where you can add songs, I am trying to add a 'Add Field' link that will add another group of songs(a field for artist, title, and genre). Here is my EventController: class EventsController < ApplicationController def new @event = Event.new @event.songs.build end def index @songs = Song.all end def show @event = Event.find(params[:id]) @songs = @event.songs.paginate(page: params[:page]) end def create @event = current_user.events.build(event_p