--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<% if goal.object.new_record? %>
and that seems to be working well.
You should be able to pass in the object you want instead. Please take a look at the fields_for documentation in Rails, Simple Form pretty much delegates to it: http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html#method-i-fields_forHope that helps.
On Wed, Sep 2, 2015 at 9:49 PM, Bob Larrick <lar...@gmail.com> wrote:
<%= f.simple_fields_for :goals do |goal| %>...<% end %>Shows inputs for all goals, both the existing ones and the new one set up in the controller with @user.goals.build.How can I only show inputs for the new one, and not the existing ones?
--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simpleform+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--At.
Carlos Antonio
Thanks!I ended up doing something like<% if goal.object.new_record? %>
and that seems to be working well.
On Thursday, September 3, 2015 at 6:41:34 AM UTC-4, Carlos Antonio da Silva wrote:
You should be able to pass in the object you want instead. Please take a look at the fields_for documentation in Rails, Simple Form pretty much delegates to it: http://api.rubyonrails.org/classes/ActionView/Helpers/FormBuilder.html#method-i-fields_forHope that helps.
On Wed, Sep 2, 2015 at 9:49 PM, Bob Larrick <lar...@gmail.com> wrote:
<%= f.simple_fields_for :goals do |goal| %>...<% end %>Shows inputs for all goals, both the existing ones and the new one set up in the controller with @user.goals.build.How can I only show inputs for the new one, and not the existing ones?
--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--At.
Carlos Antonio--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.