How to use Reform to prepopulate for featured objects?
问题 When a user clicks, for example, "Take a Picture" how can we prepopulate the create.html.erb form with attributes specifically set for that featured challenge, like do for 12 days and do on Tue, Thu ? I am using the reform gem. #challenges_controller def new @challenge = Challenge.new respond_modal_with @challenge, location: root_path end #challenges/new.html.erb <%= simple_form_for(@challenge, html: { data: { modal: true } }) do |f| %> <%= f.text_field :action, placeholder: 'Enter a Custom