0

I try to add the location header to my versioned API.

NoMethodError (undefined method `forum_url' for #<V1::ForumsController:0x00000004fabaa0>):app/controllers/v1/forums_controller.rb:24:in `create'

How can I override the render location: forum helper to use v1_forum_urlinstead of forum_url?

DimaSan
  • 12,264
  • 11
  • 65
  • 75

1 Answers1

0

You could simply define a method forum_url in your controller:

def forum_url
  v1_forum_url
end

Or pass a custom method to location parameter.

Mat
  • 2,156
  • 2
  • 16
  • 29