I want to create a model 'Relation' which extends ActiveRecord::Base, set it's table name as 'questions_tags', and without primary key. What should I do?
class Relation < ActiveRecord::Base
set_table_name 'questions_tags' # set table name, right?
# how to define 'no-pk'?
end
UPDATE
Hi, guys. I know use 'create_table' can solve this problem, but this is just what I want to know: What is the magic behind create_table(:id=>false)
? How can I get the same effect without using create_table(:id=>false)
?