My 2 paisas

using routes.rb to change the default home page in redmine

Posted on: September 9, 2009

After installing Redmine on the server, I wanted the default home page when to be shown as the home page of my project and not the complete redmine directory. After searching for a while, I found that it can be dome by doing necessary changes in routes.rb file in the config directory. Then I asked it in #redmine channel on freenode server in IRC. And I found the solution there thanks to “relaxdiego”.
I have copied the chat here so that I dont miss anything that was pointed out by him(Also I am too lazy to write it all again).
iggy_prabhu> hi friends
viggy_prabhu> I have installed redmine and added one of my projects
viggy_prabhu> now i want that whenever i open the redmine domain, it directly opens the home page of the project and not the home page
viggy_prabhu> Can I do this by route.rb file or should I use rewrite mod in apache to do this
viggy_prabhu> ?
relaxdiego> viggy_prabhu: try modifying the map.home entry in routes.rb
viggy_prabhu> relaxdiego, any good HOWTO before I start modifying it?
* jas4711_ has quit (“Ex-Chat”)
relaxdiego> none that I know of
relaxdiego> map.home ”, :controller => ‘projects’, :project_id => (your project’s id)
relaxdiego> try that
relaxdiego> and for Rails routing:
viggy_prabhu> relaxdiego, i have done the necessary changes
viggy_prabhu> should I restart my apache?
relaxdiego> yep
viggy_prabhu> i did it and got the changes
viggy_prabhu> but i want projects/show/myproject to appear instead of the list of projects
viggy_prabhu> (at present I have only one project)
viggy_prabhu> relaxdiego, hope you got my doubt?
relaxdiego> what’s your project’s id?
relaxdiego> map.home ”, :controller => ‘projects’, :action => ‘show’, :project_id => (your project’s id)
* kibaho1 ( has joined #redmine
viggy_prabhu> relaxdiego, “The page you were trying to access doesn’t exist or has been removed” i am getting this error now
viggy_prabhu> map.home ”, :controller => ‘projects’, :action => ‘show’, :project_id => ‘myproject’
relaxdiego> sorry, i think i got it wrong
relaxdiego> this works for me –> map.home ”, :controller => ‘projects’, :action => ‘show’, :id => (project id)
viggy_prabhu> relaxdiego, finally it is working
viggy_prabhu> relaxdiego, thanks a lot for your time 🙂
relaxdiego> np 🙂


2 Responses to "using routes.rb to change the default home page in redmine"

Thank you very much !! It works like a charm 🙂

[…] using routes.rb to change the default home page in redmine September 2009 1 comment 5 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Links that I liked to save

Blog Stats

  • 44,958 hits
%d bloggers like this: