search for: foodinstructions

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

2006 Aug 11
2
Aliasing a table in ActiveRecord.
Assuming I can''t rename my MySQL tables, how would I modify a model so that it''s called one thing but references a table of a completely different name. For example: class Recipe < ActiveRecord::Base # The actual table is called "FoodInstructions", but I don''t want to use that. end class HomeController < ApplicationController def index @Recipe = Recipes.find_all end end -- Posted via http://www.ruby-forum.com/.