Simple.
type is a "reserved word" in Ruby. Not really a reserved word like in
other language but a synonym for the Object.class method. Since
everything an object in Ruby...
deviced_id is maybe ignored because it is a foreign key. If you want to
display the linked records, you should do it by yourself by customizing
the scaffold and use select or collection_select.
Nicolas.
Gioele wrote:> Hello,
>
> somehow the ''scaffold'' method does not emits HTML fields
for all the
> fields
> of my models. For example, this simple controller:
>
> class CatalogController < ApplicationController
> scaffold :fact
> end
>
> and a model backed by (sqlite3, tested also with mysql)
>
> create table "facts" (
> "id" integer primary key autoincrement,
> "type" varchar not null,
> "device_id" integer not null,
> "stated_on" date not null,
> "created_at" datetime not null,
> "updated_at" datetime not null,
> "approved" boolean default false
> );
>
> produces HTML fields only for "Stated on", "Created
at", "Updated at"
> and "Approved". "type" and "device_id" are
ignored. Why?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---