Hi all, I have the following helper method: def collapsible_fragment(collapsed, &block) html = ''<div>'' html << capture(&block) if( block_given? && !collapsed) html << ''</div>'' Binding.of_caller do |binding| concat(html, binding) end end and within the template this helper is used as follows <a href="?collapsed=<%=params[:collapsed]==''1'' ? ''0'' : ''1''%>">collapsed</a> <% collapsible_fragment( params[:collapsed]==''1'' ) do %> Am I visible ? <%end%> On production env everything works fine, but when I switch to production env exception ''undefined method `of_caller'' for Binding:Class'' is thrown... any clue ? --l00p -- Posted via http://www.ruby-forum.com/.
l00p
2006-Feb-07 10:58 UTC
[Rails] Re: Error undefined method `of_caller'' for Binding:Class
l00p wrote:> <a href="?collapsed=<%=params[:collapsed]==''1'' ? ''0'' : ''1''%>">collapsed</a> > <% collapsible_fragment( params[:collapsed]==''1'' ) do %> > Am I visible ? > <%end%> > > On production env everything works fine, but when I switch to production > env exception ''undefined method `of_caller'' for Binding:Class'' is > thrown...arrgh, sorry on development env everything is fine, when switched to production exception is thrown --l00p -- Posted via http://www.ruby-forum.com/.