Hi, all
I’ve trying to look for answers for my problem but so far couldn’t
find one, hopefully someone can tell me what to do. In my application,
I
have to let user can create new table, and they can add or
delete columns. The tables they created, I can’t do things that RoR
usually
can do, like ( Table.find_by_id ), because they are not modeled. Is
there any
way that I can setup model for a table that user created on fly?
Thanks for your help!
The code I used to create table is like this:
ActiveRecord::Base.connection.create_table :table_name do |t|
t.column :name, :string
end