Changeset 885
- Timestamp:
- 11/06/07 17:04:23 (1 year ago)
- Files:
-
- trunk/lib/merb/mixins/controller.rb (modified) (1 diff)
- trunk/spec/merb/controller_spec.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/merb/mixins/controller.rb
r874 r885 63 63 end 64 64 65 url = if !(new_params.keys & [:controller, :action, :id]).empty? 65 url = if new_params.respond_to?(:keys) && 66 !(new_params.keys & [:controller, :action, :id]).empty? 66 67 url_from_default_route(new_params) 67 68 elsif route_name.nil? && !route.regexp? trunk/spec/merb/controller_spec.rb
r874 r885 109 109 url.should match(%r{/foo/bar?.*user\[order\]\[\]=name}) 110 110 end 111 112 it "should handle an object as the second arg" do 113 c = new_url_controller(@resource_routes, :controller => "blogs", :action => "show") 114 blog = mock("blog") 115 blog.should_receive(:id).once.and_return(7) 116 url = c.url(:blog, blog) 117 url.should == "/blogs/7" 118 end 111 119 end
