Sha256: cbbcaee491c905122b05891996d8116692dc71af5919cc6d252e71524d24fd54

Contents?: true

Size: 881 Bytes

Versions: 101

Compression:

Stored size: 881 Bytes

Contents

# wrap the action rendering for ActiveScaffold controllers
module ActionController #:nodoc:
  class Base
    def render_with_active_scaffold(*args, &block)
      if self.class.uses_active_scaffold? and params[:adapter] and @rendering_adapter.nil?
        @rendering_adapter = true # recursion control
        # if we need an adapter, then we render the actual stuff to a string and insert it into the adapter template
        render :partial => params[:adapter][1..-1],
               :locals => {:payload => render_to_string(args.first, &block)},
               :use_full_path => true, :layout => false
        @rendering_adapter = nil # recursion control
      else
        render_without_active_scaffold(*args, &block)
      end
    end
    alias_method_chain :render, :active_scaffold

    # Rails 2.x implementation is post-initialization on :active_scaffold method
  end
end

Version data entries

101 entries across 101 versions & 3 rubygems

Version Path
brisk-bills-0.8.2 vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
brisk-bills-0.8.1 vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.15 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.14 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.13 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.12 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.11 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.10 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.9 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.8 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.7 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.6 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.5 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
brisk-bills-0.7.0 vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.4 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.3 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.2 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.1 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.24.0 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb
six-updater-web-0.23.7 lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb