Displaying 1 result from an estimated 1 matches for "organisations_helper".
2005 Mar 30
0
Help - dependencies.rb - `const_missing': uninitialized constant
...id (primary key)
name
ORGANISATIONS_REPRESENTATIVES
organisation_id
representative_id
My models are:
class Organisation < ActiveRecord::Base
has_and_belongs_to_many :representatives
end
class Representative < ActiveRecord::Base
has_and_belongs_to_many :organisations
end
In organisations_helper.rb I have:
module OrganisationsHelper
def reps_list(organisation)
a = []
for r in organisation.representatives
a << r.name
end
a.join(",")
end
end
In my organisations list view I have:
<% @organisations.each do |o| %>
<tr>
<td><%= reps_list...