# Multiple Scaffold

**URL:** <https://www.ruby-forum.com/t/multiple-scaffold/122813>\
**Category:** Rails\
**Created:** [December 12, 2007, 1:22pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813 "2007-12-12T13:22:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyavorski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dyavorski](https://www.ruby-forum.com/u/dyavorski)\
**Post date:** [December 12, 2007, 1:22pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813/1 "2007-12-12T13:22:53Z")

</div>

Hi ALL  
I am new to the Rails mechanism and so far what I did some tutorial apps  
in ROR. On of those contained a practice of the “Scaffold” utility, And  
used the “scaffold” to manage a table in an admin section.  
This was quite simple but now “In the real world” My new ROR admin  
system should consist of several tables.  
I am trying (unsuccessfully) to generate a page that has a side menu  
with all the tables that I have in my db. Clicking a table will move the  
browser to a scaffold page of that table where the side menu stays.  
I have already created the side menu, but the links on each table are  
tricky.

Any ideas anyone?  
Danny

---

<div class="post-metadata">

**Author:** ![dyavorski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dyavorski](https://www.ruby-forum.com/u/dyavorski)\
**Post date:** [December 12, 2007, 1:42pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813/2 "2007-12-12T13:42:09Z")

</div>

don’t use scaffolding

link\_to “tablename”, table\_path

will give you the link and is easy enough to use

---

<div class="post-metadata">

**Author:** ![dyavorski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dyavorski](https://www.ruby-forum.com/u/dyavorski)\
**Post date:** [December 12, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813/3 "2007-12-12T13:51:17Z")

</div>

Thorsten M. wrote:

> don’t use scaffolding
> 
> link\_to “tablename”, table\_path
> 
> will give you the link and is easy enough to use

What do you mean by table\_path?  
The one thins I liked about Scaffolding is that it enables me the  
list/add/edit operations. Can it be achieved your way?  
Thanks  
Dannt

---

<div class="post-metadata">

**Author:** ![dyavorski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dyavorski](https://www.ruby-forum.com/u/dyavorski)\
**Post date:** [December 12, 2007, 2:01pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813/4 "2007-12-12T14:01:07Z")

</div>

scaffolding is a code generator. all it does is generating  
some controllers, actions and html-views  
you can easily write those lines of code by hand, using  
html-helper functions like link\_to in your html.erb files  
like:  
\<%= link\_to “tablename”, table\_path %\>  
this calls the link\_to helper function and places it’s output  
(a li tag) in the html response, sent to the browser

sooner or later you will have to learn that anyway, since  
scaffolding covers only the very basic operations you mentioned

---

<div class="post-metadata">

**Author:** ![dyavorski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eada6e/32.png) [@dyavorski](https://www.ruby-forum.com/u/dyavorski)\
**Post date:** [December 12, 2007, 9:52pm UTC](https://www.ruby-forum.com/t/multiple-scaffold/122813/5 "2007-12-12T21:52:07Z")

</div>

So, you need help generating a link??

\<%= link\_to ‘link\_label’, :controller =\> ‘controller\_name’, :action =\>  
‘method\_name’ %\>

or, for example, if you had a controller called users\_controller.rb  
and a ‘list’ action, you can create a link to the ‘list’ page with:

\<%= link\_to ‘Users’, :controller =\> ‘users’, :action =\> ‘list’ %\>

link\_to Documentation:  
[http://api.rubyonrails.com/classes/ActionView/Helpers/UrlHelper.html#M000900](http://api.rubyonrails.com/classes/ActionView/Helpers/UrlHelper.html#M000900)

On Dec 12, 7:22 am, Danny Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
