KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 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) ?
Tags (comma-separated)
Save Edits
Cancel