Having trouble with #method() method

ActiveRecord doesn't actually create methods for every attribute in
your model. Instead it catches any missing methods by overriding the
missing_method() method on ActiveRecord::Base and passing it to
write_attribute().

If you want a list of attributes try:

new_foreign_object.attributes.keys

...

# or

?> Person.columns.map(&:name)
...

Yup. ActiveRecord::Base has a method_missing defined on the class
level which implement these finders...