app/helpers/works_helper.rb
def work_parent_value(field)
    if params[:work] && params[:work][:parent_attributes]
      params[:work][:parent_attributes][field]
    end
  end
# Passes value of fields for related works back to form when an error occurs on posting
Passes value of fields for related works back to form when an error occurs on posting
Passes value of fields for related works back to form when an error occurs on posting
def work_parent_value(field)
    if params[:work] && params[:work][:parent_attributes]
      params[:work][:parent_attributes][field]
    end
  end
def work_parent_value ( field ) if params [ :work ] && params [ :work ] [ :parent_attributes ] params [ :work ] [ :parent_attributes ] [ field ] end end
Passes value of fields for related works back to form when an error occurs on posting
Passes value of fields for related works back to form when an error occurs on posting
field