I am tring to set up a my directory structure for the pages. Right now i have /admin/news.rhtml and admin and news are controlers. Now i need to make the news section to be the place where i add all the news articals in to the site. how do i go about doing this? -- 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 -~----------~----~----~----~------~----~------~--~---
Mike wrote:> I am tring to set up a my directory structure for the pages. Right now i > have /admin/news.rhtml and admin and news are controlers. Now i need to > make the news section to be the place where i add all the news articals > in to the site. how do i go about doing this?opps news is not a controler but i think i have to make it one. And if that is the case how do i make it a controler taht in under another controler? -- 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 -~----------~----~----~----~------~----~------~--~---
You need to be clear on how things are setup by default and what can be changed. If you are using the standard routes then there is a directory app/ controllers where your controller files *.rb live. There will also be a directory app/views/<controllername> for the *.rhtml and *.rjs and *.rxml files that go with that controller. For normal operations there will be one of the above files for each action on each controller. The URL you indicated /admin/news would indicate admin as the controller and news as the action. If news is really a controller the URL would normally be /news or /news/<action> with index being the default action. I would recommend the book Agile Web Development with Rails as it has a very fast intro tutorial in the first few chapters to get you oriented, then goes into everything in more detail. The book is well written and easy to read. Michael On May 27, 3:05 pm, Mike <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I am tring to set up a my directory structure for the pages. Right now i > have /admin/news.rhtml and admin and news are controlers. Now i need to > make the news section to be the place where i add all the news articals > in to the site. how do i go about doing this? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
Yea I have read half the book. But it dose not do what I am looking for. So what I am trying to do is make all my files for updating and adding content go thru the admin controller so that my URL always looks like your in the admin directory. (example: http://localhost:3000/admin/news/list) Is that posible or should i create a compleatly new rails project just for the CMS. -- 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 -~----------~----~----~----~------~----~------~--~---