Closed tombu closed 11 years ago
Looks like Rails 4 now wants camel case module names in config/routes.rb. Changing it to this worked for me locally (note the lower case v in "v1" instead of upper case "V1"):
api_version(:module => "v1", :header => {:name => "Accept", :value => "application/vnd.mycompany.com; version=1"}) do
match '/foos.(:format)' => 'foos#index', :via => :get
end
If you could file a separate issue for the generator/hash syntax problem with more detail, I'd appreciate it.
Thanks.
It also doesn't support :as
option. (Rails 4, Ruby 2)
You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
@elfassy please file a separate issue for the :as option instead of piggybacking on this one
I forgot I had already filed an issue for the case change to module prefixes:
@tombu I've pushed up a fix for this module name problem in Rails 4. Can you change your Gemfile dependency on Versionist to:
gem 'versionist', :git => 'https://github.com/bploetz/versionist.git', :branch => 'issue39'
Then run bundle update versionist
and see if it fixes the problem for you?
Thanks. I´ll give it a try the next days.
Sorry for letting you wait that long. This fix works for me. Thanks a lot
Cool, thanks @tombu. I've released versionist 1.2.0 with this fix.
I´m using the code from one of the examples:
I get the following error:
I´m using
rails-api
with ruby 2.0.0. Also the generators break when I try to use the new hash syntax inroutes.rb
.Any suggestions how to fix that?