Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## controllers/foo_controller.rb class FooController < ApplicationController def index end def foo render :update do |p| p.insert_html :before, :log, hidden end end # This method is not available to the render(:update) block above, for reasons that defy all knowledge! def hidden "I am in FooController#hidden" end end ## views/foo/index.rhtml <ul> <li><%= link_to_remote 'do it', :url => {:action => :foo} %></li> </ul> <div id="log"></div> ## Error Processing FooController#foo (for 127.0.0.1 at 2007-07-02 16:13:16) [POST] Session ID: d68d417ce47c8c8565167723981dbdf2 Parameters: {"action"=>"foo", "controller"=>"foo"} NameError (undefined local variable or method `hidden' for #<#<Class:0x31a239c>:0x31a2374>): .//app/controllers/foo_controller.rb:7:in `__bind_1183407196_828125'
This paste will be private.
From the Design Piracy series on my blog: