search for: venue_id

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

Did you mean: fence_id
2006 Apr 06
2
using select() to relate tables
...e done this by adding <%= select('''', '''', venue.find_all.collect {|venue| venue.name}) %> to my _form.rhtml for registering new PC''s. Now when you register a new PC, you can choose the venue that it belongs to by name, but I need to then send the venue_id (the foreign key in pcs) and not the venue name from the form. Can someone advise me on how I might do this? Also, I know that I''m really supposed to write something in the appropriate controller or write a helper method to populate a variable which I can then use in my _form.rhtml, but I...
2006 Jan 31
2
Relationship navigation issue
...ty < ActiveRecord::Base belongs_to :state end I want to retrieve all event records belonging to a state. Coming from hibernate background I tried something like this: def self.list_for_a_state(state_id) find_by_sql(["select e.* from venues v, events e where v.city.state_id=? and e.venue_id = v.id",state_id]) end Error: Unknown table ''v.city'' in where clause How do I handle this case? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060131/f1aea7d9/attachment.ht...
2006 Jan 09
3
Include with two references of one model of the same table
...d more than once : SELECT matches."awayteam_goals" AS t2_r1, matches."season_id" AS t1_r7, teams_seasons."division_id" AS t0_r6, matches."hometeam_goals" AS t2_r2, matches."league_id" AS t1_r8, matches."awayteam_id" AS t2_r3, matches."venue_id" AS t1_r9, matches."hometeam_id" AS t2_r4, matches."matchtime_start" AS t2_r5, matches."id" AS t1_r0, matches."matchtime_stop" AS t2_r6, matches."awayteam_goals" AS t1_r1, teams_seasons."id" AS t0_r0, matches."season_id" AS...
2008 Sep 04
3
Can you use observe_field to watch a select list and then update the contents of a text field?
Before I waste more time trying to figure that out, I was wondering if it''s even possible? The Rails Way says that observe_field by default will trigger changes in text fields and text areas, and on clicks for radio buttons and check boxes. So perhaps I''m using the wrong tool here? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Apr 23
0
Pagination issue because of join
...er => "start_date DESC" This query is made against table ''EVENTS'' and everything works fine. Now the query gets complex. I need to make a join to a different table namely ''STATES''. The ''EVENTS'' table has a column named ''VENUE_ID''. ''VENUE'' table has a column named ''STATE_ID''. ''STATES'' table has the primary column ''ID''. How do I retrieve events only belonging to a particular state using pagination? Thanks. -------------- next part ----------...