Topic: Why won't this work?
Maybe I'm just too tired to figure this out.. I have a Stores table in my database populated with stores with id's ranging from 1 through 100. I'm trying to grab one of them using this code:
@place = Store.find(:all, :conditions => "id = '10'")
When I do that, I want to see @place.id also show me 10 but I'm getting some random number like 18881682. The above code is not in my stores_controller.rb but rather in a controller called events_controller.rb
Full code for the controller action looks like this where @event.venue returns 10 correctly:
@event = Event.find(params[:id])
@place = Store.find(:all, :conditions => ['id = ?', @event.venue])