[Radiant] adding my controller in an extension
Adam Williams
adam at thewilliams.ws
Tue Apr 3 14:51:55 CDT 2007
On Apr 3, 2007, at 3:50 AM, Raphael Bauduin wrote:
> When working with the latest 0.6 gems, the controller is not found. I
> had to add this to simple_mailer_extension.rb:
>
> require File.dirname(__FILE__) + '/app/controllers/simple_mailer'
>
> but then I got
>
> /usr/lib/ruby/gems/1.8/gems/radiant-0.6.0/vendor/rails/
> activesupport/lib/active_support/dependencies.rb:266:in
> `load_missing_constant': uninitialized constant ApplicationController
> (NameError)
This is a problem that continues to come up. In the latest extension
generator, as found in mental today, you will see that there is a
line at the top of the generated extension:
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'
So, that could help.
> I then went another way and checked out radiant from the svn
> repository. ...
> ... When I try to access http://localhost:3000/simple_mailer/index
> I get
> an error. Here's what I get in the log file:
>
> Processing SiteController#show_page (for 127.0.0.1 at 2007-04-03
> 09:40:25) [GET]
> Parameters: {"action"=>"show_page", "url"=>["simple_mailer",
> "index"], "controller"=>"site"}
>
>
> NameError (undefined local variable or method `behavior_id' for
> #<Page:0xb7642820>):
Now this is interesting. You can see in migration 010 that
behavior_id's should not be an aspect of Radiant in 0.6.0.
adam williams
More information about the Radiant
mailing list