Class: AgentZipCode
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AgentZipCode
- Defined in:
- app/models/agent_zip_code.rb
Class Method Summary collapse
-
.get_agent_zipcodes(agent) ⇒ Object
Get Agent’s zipcodes.
Instance Method Summary collapse
Class Method Details
.get_agent_zipcodes(agent) ⇒ Object
Get Agent’s zipcodes
9 10 11 |
# File 'app/models/agent_zip_code.rb', line 9 def self.get_agent_zipcodes(agent) AgentZipCode.where(agent_id: agent.id).pluck(:zip_code).map{|code| {zip_code: code}} end |
Instance Method Details
#describe_id ⇒ Object
13 14 15 |
# File 'app/models/agent_zip_code.rb', line 13 def describe_id "AgentZipCode ##{id}" end |