I have this model :
class Employment < ActiveRecord::Base
accepts_nested_attributes_for :month_lines
end
and there forms :
employment.new
= form_for @employment do |f|
= f.fields_for :month_lines do |builder|
= render "/month_lines/fields", :f => builder
month_lines/_fields
= f.number_field :days
I want to display month_line.year in the partial
How do I access the month_line object from in the _fields partial ?