Here is some additional notes:
If anybody know please explain:

class Contact < ActiveRecord::Base
  belongs_to :user
  belongs_to :contact_type, :class_name => "ContactType", :foreign_key
=> "contact_type_id"

  has_many :request_contacts, :dependent => :destroy
  has_many :requests, :through => :request_properties

  validates_presence_of :name, :on => :create, :message => "can't be
blank"
  validates_presence_of :type, :on => :create, :message => "can't be
blank"
  validates_presence_of :number, :on => :create, :message => "can't be
blank"

  validates_presence_of :contact_type_id
  validates_associated :contact_type
end

Full model class

If I run script/console on heroku and localhost and make some
commands:

@c = Contact.new
@c.methods.grep(/cont/).sort

on heroku
=> ["autosave_associated_records_for_contact",
"autosave_associated_records_for_contact_type",
"autosave_associated_records_for_request_contacts", "build_contact",
"build_contact_type", "contact", "contact=", "contact_type",
"contact_type=", "contact_type_id", "contact_type_id=",
"contact_type_id?", "create_contact", "create_contact_type",
"has_many_dependent_destroy_for_request_contacts", "loaded_contact?",
"loaded_contact_type?", "request_contact_ids", "request_contact_ids=",
"request_contacts", "request_contacts=", "set_contact_target",
"set_contact_type_target",
"validate_associated_records_for_request_contacts"]

localhost
=> ["autosave_associated_records_for_contact_type",
"autosave_associated_records_for_request_contacts",
"build_contact_type", "contact_type", "contact_type=",
"create_contact_type",
"has_many_dependent_destroy_for_request_contacts",
"loaded_contact_type?", "request_contact_ids", "request_contact_ids=",
"request_contacts", "request_contacts=", "set_contact_type_target",
"validate_associated_records_for_request_contacts"]

There are different numbers of methods. Why? What are the methods
contact and contact= for Contact class?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to