Forum: Ruby on Rails template choice error (layout.rb)

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.
19c9af375aca3001e3978cb16684803c?d=identicon&s=25 Parker Thompson (Guest)
on 2006-02-06 21:24
(Received via mailing list)
Hey,

I installed the rjs plugin yesterday and started using it for one set
of views.  Today I notice that in an entirely separate
controller/template I'm seeing this error:

TypeError (can't dup NilClass):
    /vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:41:in
`dup'
    /vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:41:in
`default_template_name'
    /vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:64:in
`candidate_for_layout?'
    /vendor/plugins/javascript_generator_templates/lib/add_rjs_to_action_controller.rb:58:in
`apply_layout?'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/layout.rb:212:in
`render_without_benchmark'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:53:in
`render'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:53:in
`measure'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:53:in
`render'
    /app/controllers/messages_controller.rb:52:in `get_messages_since'

It looks to me like layout.rb is incorrectly trying to use an rjs
template when none exists.  I looked briefly at layout.rb but don't
have enough context to know what's going on without significant
digging.  Anyone have a clue why the rjs stuff would get envoked when
no rjs templates exist in my views dir?

Thanks,

pt.
--
Parker Thompson
http://www.parkert.com/
510.541.0125
2ccb2f7699267d258faaafce4ee997df?d=identicon&s=25 Cody Fauser (Guest)
on 2006-02-07 02:00
(Received via mailing list)
Parker,

I had missed one of the patches from the Rails trunk, but that is
fixed now.  Try checking out the latest version of the plugin from the
svn repository.  The problem occurred when using render :layout =>
false. The latest revision is 17.  Let me know if you continue to have
problems with the latest version.

On 2/6/06, Parker Thompson <parkert@gmail.com> wrote:
> `default_template_name'
> 
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:53:in
>
> pt.
> --
> Parker Thompson
> http://www.parkert.com/
> 510.541.0125
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Cody Fauser
http://www.codyfauser.com
This topic is locked and can not be replied to.