search for: shop_view1

Displaying 1 result from an estimated 1 matches for "shop_view1".

2008 Jun 03
1
Model#find returns wrong class
Hi, I''ve one specific database view which troubles me. I set up a model mytestmodel.rb: class Mytestmodel < ActiveRecord::Base set_table_name "shop_view1" end ./script/console output (development environment) >> Mytestmodel.find(:first) => #<Product id: 260, ...> development.log output: Mytestmodel Load (0.030650) SELECT * FROM "shop_view1" LIMIT 1 Why do I get an object of Product class back here? I guess this...