search for: object_assign

Displaying 2 results from an estimated 2 matches for "object_assign".

Did you mean: object_assigns
2008 Mar 23
6
Locals do not appear in partial unless collection is explici
Maybe I''m misunderstanding something but it appears as if <%= render :partial => @items, @locals => { :this => ''that'' } %> does not give the local variable this but this one does: <%= render :partial => ''items/item'', :collection => @items, @locals => { :this => ''that'' } %> Shouldn''t they mean
2008 May 08
0
stub sub partials when testing partial with rspec
...ery dirty and IMHO dangerous function def block_render_except unblocked ActionView::Partials.class_eval do public def self.set_unblocked partial @@unblocked = partial end alias_method :orig_render_partial,:render_partial def render_partial(partial_path, object_assigns = nil, local_assigns = nil) #:nodoc: if partial_path.to_s == @@unblocked orig_render_partial(partial_path, object_assigns, local_assigns) else return " " end end end ActionView::Partials.set_unblocked unblocked end usage: bl...