plugins/adva_cells/vendor/plugins/cells/lib/cell.rb
# Render the view belonging to the given state.
Render the view belonging to the given state.
Render the view belonging to the given state .
def render_view_for_state(state)
      view_class  = Class.new(Cell::View)
      action_view = view_class.new(@@view_paths, {}, @controller)
      action_view.cell = self
      action_view.template_format = :html 
      include_helpers_in_class(view_class)
      action_view.assigns = assigns_for_view
      template = find_family_view_for_state(state, action_view)
      if template.nil?
        return "ATTENTION: cell view for #{cell_name}##{state} is not readable/existing.
                Further on, your cell method did not return a String."
      end
      action_view.render(:file => template)
    end
def render_view_for_state ( state ) view_class = Class . new ( Cell :: View ) action_view = view_class . new ( @@view_paths , { } , @controller ) action_view . cell = self action_view . template_format = :html include_helpers_in_class ( view_class ) action_view . assigns = assigns_for_view template = find_family_view_for_state ( state , action_view ) if template . nil? return "ATTENTION: cell view for #{cell_name}##{state} is not readable/existing.
                Further on, your cell method did not return a String." end action_view . render ( :file => template ) end
Render the view belonging to the given state.
Render the view belonging to the given state .
### FIXME/DISCUSS: # otherwise it's set to :js in AJAX context! # Make helpers and instance vars available ### TODO: cache family_view for this cell_name/state in production mode, ###   so we can save the call to possible_paths_for_state. ### DISCUSS: throw exception?
state