[Instiki] Change wiki_controller action

Joel W. Garman joel.w.garman at biola.edu
Wed Mar 25 17:00:39 EDT 2009

I don't know very little ruby so I have no idea what I am doing.  I would
like to change the default behavior of Instiki.  When people go to
mywiki.mysite.com:2500 the web_list page generates.  I have multiple
wikis, one published one private.  By default I would love it intiki
pulled the published wiki rather than web_list.  The published wiki is the
first wiki listed in my tables.  I know the change needs to be made in
wiki_contoller but I'm not sure what.  Here's what I have:

I changed index from
redirect_to :action => 'web_list'

redirect_to :action => 'reference_published'

And have created:

  def reference_published
    if @web.published?
      redirect_home @wiki.webs.values.first.address
     redirect_to :action => 'web_list' 

What do I need to change?  I know this code is hard for some of you to
see, I'm sorry I butchered it.


More information about the Instiki-users mailing list