When the browser is pointed to <http://localhost:3000/feeds> there''s a CRUD interface. However, the interface doesn''t display all of the fields defined at <http://strawr.googlecode.com/svn/trunk/db/ migrate/001_feeds.rb>. I''ve done "rake db:migrate VERSION=0 ; rake db:migrate" and, also: thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ ll total 20 -rw-r--r-- 1 thufir users 9216 Dec 8 04:29 development.sqlite3 drwxr-xr-x 3 thufir users 4096 Dec 8 04:29 migrate -rw-r--r-- 1 thufir users 1430 Dec 8 04:29 schema.rb thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ sqlite3 development.sqlite3 SQLite version 3.4.1 Enter ".help" for instructions sqlite> .schema CREATE TABLE categories ("id" INTEGER PRIMARY KEY NOT NULL, "parent_num" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); CREATE TABLE feeds ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar (255) DEFAULT NULL, "location" varchar(255) DEFAULT NULL, "category_id" integer DEFAULT NULL, "item_id" integer DEFAULT NULL); CREATE TABLE items ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar (255) DEFAULT NULL, "is_read" integer DEFAULT NULL, "link" varchar(255) DEFAULT NULL, "pub_date" varchar(255) DEFAULT NULL, "description" varchar (255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); CREATE TABLE nodes ("id" INTEGER PRIMARY KEY NOT NULL, "obj_num" integer DEFAULT NULL, "norder" varchar(255) DEFAULT NULL, "type" varchar(255) DEFAULT NULL); CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "post" varchar (255) DEFAULT NULL); CREATE TABLE schema_info (version integer); sqlite> sqlite> .quit thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ Clearly the "feeds" table has "item_id" as a field; so why doesn''t it show in the CRUD? Perhaps I need to undo and then redo the scaffolding? based on <http://strawr.googlecode.com/svn/trunk/app/views/feeds/ show.rhtml>, I don''t see why all the fields for "feeds" aren''t being displayed :( thanks, Thufir --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8 Dec 2007, at 12:41, Thufir wrote:> > When the browser is pointed to <http://localhost:3000/feeds> there''s a > CRUD interface. However, the interface doesn''t display all of the > fields > defined at <http://strawr.googlecode.com/svn/trunk/db/ > migrate/001_feeds.rb>. >Scaffolding just iterates over content_columns. If you look a the doc for content_columns you''ll see that it doesn''t include columns ending in _id Fred> I''ve done "rake db:migrate VERSION=0 ; rake db:migrate" and, also: > > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ ll > total 20 > -rw-r--r-- 1 thufir users 9216 Dec 8 04:29 development.sqlite3 > drwxr-xr-x 3 thufir users 4096 Dec 8 04:29 migrate > -rw-r--r-- 1 thufir users 1430 Dec 8 04:29 schema.rb > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ sqlite3 development.sqlite3 > SQLite version 3.4.1 > Enter ".help" for instructions > sqlite> .schema > CREATE TABLE categories ("id" INTEGER PRIMARY KEY NOT NULL, > "parent_num" > integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "feed_id" > integer DEFAULT NULL); > CREATE TABLE feeds ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar > (255) DEFAULT NULL, "location" varchar(255) DEFAULT NULL, > "category_id" > integer DEFAULT NULL, "item_id" integer DEFAULT NULL); > CREATE TABLE items ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar > (255) DEFAULT NULL, "is_read" integer DEFAULT NULL, "link" > varchar(255) > DEFAULT NULL, "pub_date" varchar(255) DEFAULT NULL, "description" > varchar > (255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); > CREATE TABLE nodes ("id" INTEGER PRIMARY KEY NOT NULL, "obj_num" > integer > DEFAULT NULL, "norder" varchar(255) DEFAULT NULL, "type" varchar(255) > DEFAULT NULL); > CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "post" varchar > (255) DEFAULT NULL); > CREATE TABLE schema_info (version integer); > sqlite> > sqlite> .quit > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ > > > > Clearly the "feeds" table has "item_id" as a field; so why doesn''t it > show in the CRUD? Perhaps I need to undo and then redo the > scaffolding? > > > based on <http://strawr.googlecode.com/svn/trunk/app/views/feeds/ > show.rhtml>, I don''t see why all the fields for "feeds" aren''t being > displayed :( > > > > > thanks, > > Thufir > > > --~--~---------~--~----~------------~-------~--~----~ > 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--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, 08 Dec 2007 13:09:05 +0000, Frederick Cheung wrote:> Scaffolding just iterates over content_columns. If you look a the doc > for content_columns you''ll see that it doesn''t include columns ending in > _idYes, you''re absolutely correct (I even looked at the API after posting this last night). I tried a few variations, and did some light googling, but didn''t find a way to get it iterate over all fields. Can I just change that one line so that it shows all of the fields when doing any of the CRUD actions? thanks, Thufir --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 8 Dec 2007, at 19:33, Thufir wrote:> > On Sat, 08 Dec 2007 13:09:05 +0000, Frederick Cheung wrote: > > >> Scaffolding just iterates over content_columns. If you look a the doc >> for content_columns you''ll see that it doesn''t include columns >> ending in >> _id > > Yes, you''re absolutely correct (I even looked at the API after posting > this last night). I tried a few variations, and did some light > googling, > but didn''t find a way to get it iterate over all fields. > > Can I just change that one line so that it shows all of the fields > when > doing any of the CRUD actions? >does using Model.columns do what you want? Fred> > > > thanks, > > Thufir > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sat, 08 Dec 2007 19:57:04 +0000, Frederick Cheung wrote:> does using Model.columns do what you want?I still get the same result after using Feed.columns :( http://strawr.googlecode.com/svn/trunk/app/views/feeds/list.rhtml The database appears fine: thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ thufir@arrakis ~/Desktop/strawr/db $ sqlite3 development.sqlite3 SQLite version 3.4.1 Enter ".help" for instructions sqlite> .schema CREATE TABLE categories ("id" INTEGER PRIMARY KEY NOT NULL, "parent_num" integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); CREATE TABLE feeds ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar (255) DEFAULT NULL, "location" varchar(255) DEFAULT NULL, "category_id" integer DEFAULT NULL, "item_id" integer DEFAULT NULL); CREATE TABLE items ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar (255) DEFAULT NULL, "is_read" integer DEFAULT NULL, "link" varchar(255) DEFAULT NULL, "pub_date" varchar(255) DEFAULT NULL, "description" varchar (255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); CREATE TABLE nodes ("id" INTEGER PRIMARY KEY NOT NULL, "obj_num" integer DEFAULT NULL, "norder" varchar(255) DEFAULT NULL, "type" varchar(255) DEFAULT NULL); CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "post" varchar (255) DEFAULT NULL); CREATE TABLE schema_info (version integer); sqlite> sqlite> .quit thufir@arrakis ~/Desktop/strawr/db $ -Thufir --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 9 Dec 2007, at 07:02, Thufir wrote:> > On Sat, 08 Dec 2007 19:57:04 +0000, Frederick Cheung wrote: > > >> does using Model.columns do what you want? > > I still get the same result after using Feed.columns :( > > http://strawr.googlecode.com/svn/trunk/app/views/feeds/list.rhtml >Well you''ve still got a content_columns at the top of your page. Other than that I don''t see why it wouldn''t work (although you wouldn''t see anything if the _id columns were null) Fred> The database appears fine: > > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ > thufir@arrakis ~/Desktop/strawr/db $ sqlite3 development.sqlite3 > SQLite version 3.4.1 > Enter ".help" for instructions > sqlite> .schema > CREATE TABLE categories ("id" INTEGER PRIMARY KEY NOT NULL, > "parent_num" > integer DEFAULT NULL, "title" varchar(255) DEFAULT NULL, "feed_id" > integer DEFAULT NULL); > CREATE TABLE feeds ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar > (255) DEFAULT NULL, "location" varchar(255) DEFAULT NULL, > "category_id" > integer DEFAULT NULL, "item_id" integer DEFAULT NULL); > CREATE TABLE items ("id" INTEGER PRIMARY KEY NOT NULL, "title" varchar > (255) DEFAULT NULL, "is_read" integer DEFAULT NULL, "link" > varchar(255) > DEFAULT NULL, "pub_date" varchar(255) DEFAULT NULL, "description" > varchar > (255) DEFAULT NULL, "feed_id" integer DEFAULT NULL); > CREATE TABLE nodes ("id" INTEGER PRIMARY KEY NOT NULL, "obj_num" > integer > DEFAULT NULL, "norder" varchar(255) DEFAULT NULL, "type" varchar(255) > DEFAULT NULL); > CREATE TABLE posts ("id" INTEGER PRIMARY KEY NOT NULL, "post" varchar > (255) DEFAULT NULL); > CREATE TABLE schema_info (version integer); > sqlite> > sqlite> .quit > thufir@arrakis ~/Desktop/strawr/db $ > > > > -Thufir > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Sun, 09 Dec 2007 11:04:01 +0000, Frederick Cheung wrote:> Well you''ve still got a content_columns at the top of your page. Other > than that I don''t see why it wouldn''t work (although you wouldn''t see > anything if the _id columns were null)Doh, fixed that; thanks. The item_id field for a row in the feeds table will be null until I can edit that field; for instance, by displaying the field. Won''t it show: "item_id: NULL" as it does for other fields? thanks, Thufir --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10 Dec 2007, at 09:36, Thufir wrote:> > On Sun, 09 Dec 2007 11:04:01 +0000, Frederick Cheung wrote: > >> Well you''ve still got a content_columns at the top of your page. >> Other >> than that I don''t see why it wouldn''t work (although you wouldn''t see >> anything if the _id columns were null) > > Doh, fixed that; thanks. The item_id field for a row in the feeds > table > will be null until I can edit that field; for instance, by > displaying the > field. > > Won''t it show: "item_id: NULL" as it does for other fields? >no. It would show nil.to_s (ie blank), although you should of course get the column headings. Fred> > > thanks, > > Thufir > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---