Changeset 1086
- Timestamp:
- 12/13/07 00:02:22 (1 year ago)
- Files:
-
- trunk/lib/merb/view_context.rb (modified) (1 diff)
- trunk/spec/fixtures/views/partials/_erubis.html.erb (modified) (1 diff)
- trunk/spec/merb/render_spec.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/merb/view_context.rb
r991 r1086 69 69 # and delegate them back to the controller. 70 70 def method_missing(sym, *args, &blk) 71 @_merb_partial_locals[sym] || @web_controller.send(sym, *args, &blk) 71 if @_merb_partial_locals.key?(sym) 72 @_merb_partial_locals[sym] 73 else 74 @web_controller.send(sym, *args, &blk) 75 end 72 76 end 73 77 trunk/spec/fixtures/views/partials/_erubis.html.erb
r795 r1086 1 <%= respond_to?(:yo) ? yo : "No Locals!" %>1 <%= respond_to?(:yo) && yo ? yo : "No Locals!" %> trunk/spec/merb/render_spec.rb
r1078 r1086 20 20 content = c.partial "partials/#{@engine}", :yo => "Locals!" 21 21 content.clean.should == "Locals!" 22 end 23 24 it "should render a partial with nil locals" do 25 c = new_controller 26 content = c.partial "partials/#{@engine}", :yo => nil 27 content.clean.should == "No Locals!" 22 28 end 23 29
