mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Add URL to serializers (closes #61)
Thanks so much to @vanstee for the initial implementation!
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user