I have the following code in My View:
<%= simple_form_for @user do |f| %>
<%= f.input :email %>
<%= simple_fields_for :profile do |p| %>
<%= render 'profile_fields', f => p %>
<% end %>
<%= f.submit %>
So I was trying to pass locales for 'profile_fields' partial the following way and am trying access that locale in partial, it was throwing an error like "Undefined method type".
<%= simple_fields_for :profile do |p| %>
<%= render 'profile_fields', f => p, :type => "Test" %>
<% end %>
Can anyone help me?
Aucun commentaire:
Enregistrer un commentaire