search for: sport_id

Displaying 3 results from an estimated 3 matches for "sport_id".

Did you mean: port_id
2011 Apr 27
2
Can not create model instance via params on specific model but can on others....
...tion.find_by_bet_id(3) #<PaymentTransaction id: 3, purchase_id: 3, action: nil, amount: nil, success: nil, authorization: nil, message: nil, params: nil, created_at: "2011-04-27 18:22:46", updated_at: "2011-04-27 18:22:46"> And this works: (rdb:1) Team Team(id: integer, sport_id: integer, name: string, created_at: datetime, updated_at: datetime) (rdb:1) Team.create(:sport_id => 5, :name => ''xxxx'') #<Team id: 1, sport_id: 5, name: "xxxx", created_at: "2011-04-27 18:18:31", updated_at: "2011-04-27 18:18:31"> -- Yo...
2005 Mar 10
2
NoMethodError in Event_type#create
...ness of a filed: class EventType < ActiveRecord::Base belongs_to :sport validates_uniqueness_of :event_type end When I run it, I get this error message: Showing /event_type/new.rhtml where line #27 raised undefined method `each'' for nil:NilClass <select name="event_type[sport_id]"> 27: <% @sports.each do |sport| %> 28: <option value="<%= sport.id %>" 29: <%= '' selected'' if sport.id == @event_type.sport.id %>> 30: <%= sport.sport %> However, if I take validates_uniqueness_of off,...
2006 Jul 27
2
Saving records in mySQL for many-to-many relationship
...s = Sport.find(1) end And I keep getting this error: undefined method `each'' for #<Sport:0x36a3488 @attributes={"name"=>"Basketball", "id"=>"1"}> Im pretty sure that I set up the database right. I have a sports_users table with sport_id and user_id. And when I put records into the database manually, the records are finding each other, Im just having trouble getting this to work from a submit form. Anybody encounter this? -- Posted via http://www.ruby-forum.com/.