Hi, What''s the problem with this line? <%= ''height="750" valign="top"'' if request.request_uri =~ /survey_result/i %> No problem with development environment but when uploading to server I get application error. And is there a better way to do this? Thanks
Post the error and backtrace from the log. -- -- Tom Mornini On Feb 5, 2006, at 5:38 AM, Human Dunnil wrote:> Hi, > What''s the problem with this line? > > <%= ''height="750" valign="top"'' if request.request_uri =~ / > survey_result/i %> > > No problem with development environment but when uploading to server I > get application error. > > And is there a better way to do this? > > Thanks > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
seems the error is : undefined local variable or method `request'' Isn''t request availabe to view? Processing PagesController#show_page (for 217.219.250.157 at 2006-02-05 22:28:22) [GET] Parameters: {"name"=>"home", "action"=>"show_page", "controller"=>"pages"} Rendering within layouts/surveys Rendering pages/show_page ActionView::TemplateError (undefined local variable or method `request'' for #<#<Class:0x607195bc>:0x60719508>) on line #17 of app/views/layouts/surveys.rhtml: 14: <td><div id="menu"><%= render(:partial => "shared/menu") %></div></td> 15: </tr> 16: <tr> 17: <td <%= ''height="750" valign="top"'' if request.request_uri =~ /survey_result/i %>> 18: <%19: if session[:user_id] 20: render(:partial => "shared/admin_menu") ../config/../app/views/layouts/surveys.rhtml:17 /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_view/base.rb:269:in `compile_and_render_template'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_view/base.rb:245:in `render_template'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_view/base.rb:206:in `render_file'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/layout.rb:223:in `render_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/benchmarking.rb:53:in `render'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/benchmarking.rb:53:in `render'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/base.rb:835:in `perform_action_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/filters.rb:295:in `perform_action_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/rescue.rb:82:in `perform_action'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/base.rb:365:in `process_without_session_management_support'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_controller/session_management.rb:116:in `process'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/dispatcher.rb:36:in `dispatch'' dispatch.cgi:10