Add URL to serializers (closes #61)

Thanks so much to @vanstee for the initial
implementation!
This commit is contained in:
Yehuda Katz
2012-05-16 18:35:30 -07:00
parent 43f32c868a
commit 56b61b1532
6 changed files with 40 additions and 0 deletions

View File

@@ -20,11 +20,13 @@ require 'rails'
module TestHelper
Routes = ActionDispatch::Routing::RouteSet.new
Routes.draw do
resource :hypermedia
match ':controller(/:action(/:id))'
match ':controller(/:action)'
end
ActionController::Base.send :include, Routes.url_helpers
ActiveModel::Serializer.send :include, Routes.url_helpers
end
ActiveSupport::TestCase.class_eval do