Sha256: 8ad86995397987fe4abe58501e20b4b658539558bcfcb365f315912ee25af6da
Contents?: true
Size: 647 Bytes
Versions: 3
Compression:
Stored size: 647 Bytes
Contents
# # RJS handler was kicked out of Rails 3.1 along with Prototype # so, here is a little substitute coz we use it here and there # module ActionView module Template::Handlers class RJS # Default format used by RJS. class_attribute :default_format self.default_format = Mime::JS def call(template) "update_page do |page|;#{template.source}\nend" end end end end ActiveSupport.on_load(:action_view) do ActionView::Base.class_eval do cattr_accessor :debug_rjs self.debug_rjs = false end ActionView::Template.register_template_handler :rjs, ActionView::Template::Handlers::RJS.new end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
right-rails-1.3.2 | lib/rjs_renderer.rb |
right-rails-1.3.1 | lib/rjs_renderer.rb |
right-rails-1.3.0 | lib/rjs_renderer.rb |