public Method

GeneratorMethods.to_s(

There's no documentation for this item.

Source Code

# File action_view/helpers/prototype_helper.rb, line 638
def to_s #:nodoc:
  returning javascript = @lines * $/ do
    if ActionView::Base.debug_rjs
      source = javascript.dup
      javascript.replace "try {\n#{source}\n} catch (e) "
      javascript << "{ alert('RJS error:\\n\\n' + e.toString()); alert('#{source.gsub('\\','\0\0').gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }}'); throw e }"
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.