Created
August 1, 2012 09:37
-
-
Save hannesfostie/3225469 to your computer and use it in GitHub Desktop.
This file contains 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
def operations_for_company | |
@operations = [] | |
offers.each do |offer| | |
@operations << offer.operations | |
end | |
@operations | |
end |
This file contains 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
NoMethodError in Companies#show | |
Showing /Users/hannes/dev/offers/app/views/operations/_operation_index_table.html.erb where line #1 raised: | |
undefined method `id' for #<ActiveRecord::Relation:0x007fde5ee11b00> | |
Extracted source (around line #1): | |
1: <tr id="operation_<%= operation.id %>"> | |
2: <td> | |
3: <% case operation.operationtype(:name) %> | |
4: <% when 'Meeting' %> |
This file contains 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
<table class="table table-striped" id='operations_for_company_<%= @company.id %>'> | |
<%= render :partial => 'operations/operation_index_table_headers' %> | |
<%= render :partial => 'operations/operation_index_table', :collection => @company.operations_for_company, :as => :operation %> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment