search for: membership_ids

Displaying 5 results from an estimated 5 matches for "membership_ids".

Did you mean: membership_id
2009 May 11
0
updating join table (HMT) with checkbox and extra fields
...lds works great and I can update my db pretty well (barring minor issues). <% form_for :user, @user, :url => { :action => ''save_memberships''} do | form| %> <%= form.error_messages %> <% @groups.each do |g| %> <%= check_box_tag("user[membership_ids][]", g.id, @user.groups.include?(g)) %> <%= "#{g.name}"%><br> ----> I have to invoke my partial to collect membership id here. But can''t get the call right. The partial is below. <% end%> <% end%> This is the membership partial -...
2007 May 17
1
has_one_or_many
The problem is this: Here''s somewhat what I''m trying to get working: class Membership < ActiveRecord::Base end class Plan < ActiveRecord::Base end class MultiUser < Plan has_many :users end class SingleUser < Plan has_one :user end class User < ActiveRecord::Base end and then in my user table I would have a membership_id but no
2006 Nov 27
0
how to select with a kind of through relation(has_one)
I have a select issue with my members, my database structure is below User has many shops Shop belongs to a membership Shop has many items For front page I want to show items where membership of the shop has ad_enabled and this is what I have in mind but it returns with "Association named ''membership'' was not found; perhaps you misspelled it?" I tried to add to Item
2008 Mar 14
5
Branching scenarios, GivenScenario and database
I''m trying to use stories to drive some high-level design. I''ve got some branching scenarios where I want to follow a scenario, to establish a base situation, and then have different scenarios which ''branch'' out from that state, possibly several levels deep. I asked a bit about this a few days ago, and David pointed out the rather undocumented GivenScenario
2006 Jul 26
8
team captain - habtm w/has_one...
the below... class User < ActiveRecord::Base has_and_belongs_to_many :teams class Team < ActiveRecord::Base has_and_belongs_to_many :users has_one :captain, :class_name => ''User'' produces the error... Mysql::Error: Unknown column ''users.team_id'' in ''where clause'': SELECT * FROM users WHERE (users.team_id = 1) LIMIT 1 i