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 -- 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 -~----------~----~----~----~------~----~------~--~---
don''t use scaffolding link_to "tablename", table_path will give you the link and is easy enough to use -- 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 -~----------~----~----~----~------~----~------~--~---
Thorsten Mueller wrote:> don''t use scaffolding > > link_to "tablename", table_path > > will give you the link and is easy enough to useWhat 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 -- 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 -~----------~----~----~----~------~----~------~--~---
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 -- 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 -~----------~----~----~----~------~----~------~--~---
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 On Dec 12, 7:22 am, Danny Yavorski <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---