@games = Game.sorted.where(home_team = :id OR away_team = :id, id: params
[:id])
That should do the trick for you. You can have a string inside of your
where statement that equates to SQL. You can then have named parameters
that are used throughout the query as I have done above. In this case
Thanks Eric.
That did the trick.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I guess you are using Raiils 2.*, in rails 2.x, it should be
Batch.find(:all, :conditions = {:id = 1}, :select = name)
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To view this discussion on the web visit
3 matches
Mail list logo