fields_for object methods - no you see them, now you don't

I have this:

          <%-f.fields_for(:clearances, :index => ) do |ff|

                puts ff.object.methods.sort                 if ff.object.newrecord?                   ff_id = "new_"                 else                   ff_id = "show_"                 end

          -%>

Which gives me this:

. . . metaclass method method_missing methods nested_attributes_options new_record? nil? object_id partial_updates . . .

    And we follow the new user roles link # features/app/models/ clearances/step_definitions/clearance_steps.rb:14       undefined method `newrecord?' for #<Clearance:0x2b203e415238> (ActionView::TemplateError)

So, where does the missing method go between the puts and the if?

Never mind. I see my error.

newrecord? vs new_record?

you're missing an underscore in your code.

Which was? We all like to learn from questions here.

Colin

newrecord? should be new_record? instead.