On Jan 5, 2006, at 9:02 AM, Jim wrote:
>
> Question 1: In a scaffold-generated view, wouldn''t it be better to
> generate more user friendly rhtml and code? I mean, it generates a
> loop
> that goes through each column in the database table and generates html
> table columns from these. I''m sure it''s very efficient
and has
> hyper-ruby-coolness, but''s it''s not extremely helpful. It
doesn''t
> actually tell you anything about the database table. If the view were
> generated in a way that listed each column, I could go though and
> comment out things I don''t want. It would be a time saver.
>
Hmm, that''s a good point. *EVERY* time I''ve ever used a
generated
list view, I''ve had to remove that loop code and replace it with the
actual columns I want. I''d like to see that changed, too.
> Question 2: It must be very common to have foreign keys in most
> databases. For example recepies have categories, etc. Isn''t there
some
> helper to put in the edit form that that can create a select from the
> key automatically? For example I''d like to write this in my
> _form.rhtml:
>
> <%= select_from_foreign_key(categories) %>
>
> and have a select come up with the proper value, especially when
> editing.
>
Take a look at "Scaffolding Extensions" in the plugin list at
http://wiki.rubyonrails.com/rails/pages/Plugins.
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060105/b9aea024/attachment.html