Displaying 2 results from an estimated 2 matches for "simple_model".
Did you mean:
sample_model
2009 Sep 07
11
autoincrement for non-id column
There is a table:
execute (<<-SQL)
CREATE TABLE "tasks" (
"id" serial primary key,
"number" serial,
"version" integer DEFAULT 0 NOT NULL,
"latest_version" boolean DEFAULT ''t'' NOT NULL,
"hidden" boolean DEFAULT ''f'' NOT NULL,
"type" character varying (1) NOT
2006 May 10
0
tableize and model modules
As my database and application grows, I''m starting to run into a large
number of models and naming conflicts. I found out that I can switch
big_complex_named_model.rb to module/simple_model.rb which changes
BigComplexNamedModel to Module::SimpleModel which cleans things up quite
a bit. However, if I run:
''Module::SimpleModel''.tableize
I get ''module/simple_models'' which is not a valid table name.
If it were ''module_simple_model'',...