Forum: Radiant CMS Extensions problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
071bcd947c31f0e41e3c7749ae843f50?d=identicon&s=25 Joseph Method (Guest)
on 2007-04-15 00:02
(Received via mailing list)
This isn't the easiest way to start out with extensions, but I am
trying to integrate Instiki into Radiant. There will obviously be lots
of issues with this, but I'm experimenting to see how much refactoring
of the actual Instiki code will be required. So the first steps I've
taken: edited the Instiki migrations so that all redundant tables are
removed or renamed (pages becomes wiki_pages, etc.). Then I've pointed
my instiki_extension.rb to map /admin/instiki/create_wiki to
:controller=> 'wiki'.  I don't expect it to work when it reaches
index.rhtml, but it stops when it reaches password_check, a method
belonging to the subclassed parent ApplicationController. So in the
original Instiki code, the Rails magic is able to access the parent
class. Is this a problem in the extensions implementation?
6ec6f77ea603dd75b3a7a7775b059e79?d=identicon&s=25 John W. Long (Guest)
on 2007-04-15 00:39
(Received via mailing list)
Joseph Method wrote:
> original Instiki code, the Rails magic is able to access the parent
> class. Is this a problem in the extensions implementation?

You can use the no_login_required class method to turn authentication
off on for a specific controller:

class MyController < ApplicationController
   no_login_required
end

--
John Long
http://wiseheartdesign.com
071bcd947c31f0e41e3c7749ae843f50?d=identicon&s=25 Joseph Method (Guest)
on 2007-04-15 07:15
(Received via mailing list)
Thanks, John (good to know), but the problem is that WikiController <
ApplicationController, and password_check is a method of
ApplicationController, but I get

undefined method `password_check' for #<WikiController:0xb6928cac>

I really just need to investigate the Instiki magic some more. The
practical question, though, was whether these class relationships
aren't preserved for controllers in extensions?
This topic is locked and can not be replied to.