Created
February 29, 2012 21:05
-
-
Save tdouce/1944339 to your computer and use it in GitHub Desktop.
Not sure why 'MR Credit 5 Regional Materials' isn't show up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From console: | |
?> project | |
=> #<Project id: 1, user_id: 1, publisher_id: 2, name: "Travis_test_1", street_address: "407 Greenwood Drive", suite: "", city: "Athens", state: "GA", postal_code: "49508", country: "United States", confidential: false, owner_occupied: false, gross_square_feet: 5000, total_budget: #<BigDecimal:10b745c50,'0.5E5',9(18)>, project_type_id: nil, owner_type_id: nil, occupant_type_id: nil, project_scope_id: nil, project_phase_id: nil, session_id: nil, created_at: "2012-02-28 16:06:46", updated_at: "2012-02-29 13:41:41", saved: true, auto_project_source: true> | |
>> project.name | |
=> "Travis_test_1" | |
>> project.project_items | |
=> [#<ProjectItem id: 1, project_id: 1, product_id: 29, quantity: 1, unit_price: #<BigDecimal:10b71cff8,'0.75E2',9(18)>, postal_code_of_manufacture: "53551", params: nil, postal_code_of_fabrication: nil>, #<ProjectItem id: 2, project_id: 1, product_id: 16, quantity: 1, unit_price: #<BigDecimal:10b7164a0,'0.1E3',9(18)>, postal_code_of_manufacture: "49456", params: nil, postal_code_of_fabrication: nil>, #<ProjectItem id: 3, project_id: 1, product_id: 17, quantity: 1, unit_price: #<BigDecimal:10b7126e8,'0.2E3',9(18)>, postal_code_of_manufacture: "49508", params: nil, postal_code_of_fabrication: nil>] | |
>> project.project_items.map {|pi| [pi.product.name, pi.postal_code_of_manufacture]} | |
=> [["Product 29", "53551"], ["Product 16", "49456"], ["Product 17", "49508"]] | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To add locations of extraction to Product 17, do this