lib/active_scaffold/extensions/action_view_rendering.rb
#
# Adds two rendering options.
#
# ==render :super
#
# This syntax skips all template overrides and goes directly to the provided ActiveScaffold templates.
# Useful if you want to wrap an existing template. Just call super!
#
# ==render :active_scaffold => #{controller.to_s}, options = {}+
#
# Lets you embed an ActiveScaffold by referencing the controller where it's configured.
#
# You may specify options[:constraints] for the embedded scaffold. These constraints have three effects:
#   * the scaffold's only displays records matching the constraint
#   * all new records created will be assigned the constrained values
#   * constrained columns will be hidden (they're pretty boring at this point)
#
# You may also specify options[:conditions] for the embedded scaffold. These only do 1/3 of what
# constraints do (they only limit search results). Any format accepted by ActiveRecord::Base.find is valid.
#
# Defining options[:label] lets you completely customize the list title for the embedded scaffold.
#
# options[:xhr] force to load embedded scaffold with AJAX even when render_component gem is installed.
#
Adds two rendering options.
render :super

This syntax skips all template overrides and goes directly to the provided ActiveScaffold templates.
Useful if you want to wrap an existing template. Just call super!

render :active_scaffold => #{controller.to_s}, options = {}+

Lets you embed an ActiveScaffold by referencing the controller where it's configured.

You may specify options[:constraints] for the embedded scaffold. These constraints have three effects:
the scaffold's only displays records matching the constraint
all new records created will be assigned the constrained values
constrained columns will be hidden (they're pretty boring at this point)

You may also specify options[:conditions] for the embedded scaffold. These only do 1/3 of what
constraints do (they only limit search results). Any format accepted by ActiveRecord::Base.find is valid.

Defining options[:label] lets you completely customize the list title for the embedded scaffold.

options[:xhr] force to load embedded scaffold with AJAX even when render_component gem is installed.
Adds two rendering options . render : super This syntax skips all template overrides and goes directly to the provided ActiveScaffold templates . Useful if you want to wrap an existing template . Just call super! render : active_scaffold = > # { controller . to_s } options = {} + Lets you embed an ActiveScaffold by referencing the controller where it ' s configured . You may specify options [ : constraints ] for the embedded scaffold . These constraints have three effects : the scaffold ' s only displays records matching the constraint all new records created will be assigned the constrained values constrained columns will be hidden ( they ' re pretty boring at this point ) You may also specify options [ : conditions ] for the embedded scaffold . These only do 1 / 3 of what constraints do ( they only limit search results ) . Any format accepted by ActiveRecord :: Base . find is valid . Defining options [ : label ] lets you completely customize the list title for the embedded scaffold . options [ : xhr ] force to load embedded scaffold with AJAX even when render_component gem is installed .
def options_for_render_super(options)
      options ||= {}
      options[:locals] ||= {}
      if view_stack.last
        options[:locals] = view_stack.last[:locals].merge!(options[:locals]) if view_stack.last[:locals]
        options[:object] ||= view_stack.last[:object] if view_stack.last[:object]
      end
      parts = @virtual_path.split('/')
      options[:template] = parts.pop
      prefix = parts.join('/')
      if prefix != 'active_scaffold_overrides'
        options[:prefixes] = lookup_context.prefixes.drop((lookup_context.prefixes.find_index(prefix) || -1) + 1)
      else
        options[:prefixes] = ['active_scaffold_overrides']
        update_view_paths
      end
      options
    end
def options_for_render_super ( options ) options ||= { } options [ :locals ] ||= { } if view_stack . last options [ :locals ] = view_stack . last [ :locals ] . merge! ( options [ :locals ] ) if view_stack . last [ :locals ] options [ :object ] ||= view_stack . last [ :object ] if view_stack . last [ :object ] end parts = @virtual_path . split ( '/' ) options [ :template ] = parts . pop prefix = parts . join ( '/' ) if prefix != 'active_scaffold_overrides' options [ :prefixes ] = lookup_context . prefixes . drop ( ( lookup_context . prefixes . find_index ( prefix ) || - 1 ) + 1 ) else options [ :prefixes ] = [ 'active_scaffold_overrides' ] update_view_paths end options end
Adds two rendering options.
Adds two rendering options .
# if prefix is active_scaffold_overrides we must try to render with this prefix in following paths
options
<not_specific>