{"action":"created","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/367","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/367/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/367/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/367","id":99650430,"number":367,"title":"Incorrect URLs generated for namespace?","user":{"login":"al3x-edge","id":62131,"avatar_url":"https://avatars.githubusercontent.com/u/62131?v=3","gravatar_id":"","url":"https://api.github.com/users/al3x-edge","html_url":"https://github.com/al3x-edge","followers_url":"https://api.github.com/users/al3x-edge/followers","following_url":"https://api.github.com/users/al3x-edge/following{/other_user}","gists_url":"https://api.github.com/users/al3x-edge/gists{/gist_id}","starred_url":"https://api.github.com/users/al3x-edge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/al3x-edge/subscriptions","organizations_url":"https://api.github.com/users/al3x-edge/orgs","repos_url":"https://api.github.com/users/al3x-edge/repos","events_url":"https://api.github.com/users/al3x-edge/events{/privacy}","received_events_url":"https://api.github.com/users/al3x-edge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-07T13:47:18Z","updated_at":"2015-08-07T13:54:39Z","closed_at":"2015-08-07T13:54:39Z","body":"I'm getting mis-matched URLs while using namespaces. At one point, the resources seem to follow normal casing but then in relation urls, it seems everything is smashed together.\r\n\r\nCurrently have a routes as:\r\n```ruby\r\n  namespace :json_api do\r\n    namespace :v1 do\r\n      jsonapi_resources :example, only: [:show, :index]\r\n      ...\r\n    end\r\n  end\r\n```\r\n\r\nAlthough I'm getting responses for the top level resources with `json_api` in the url, sub-resources or relations inside of `:example` are giving links as `/jsonapi/v1/example_relation` instead.\r\n\r\nReal example output from rails logging (non-working):\r\n```\r\nweb_1   | [INFO ] GET     \"/json_api/v1/drum-pump-models/67/compatible-chemicals\"  for 192.168.59.3  at 2015-08-07 13:40:29 +0000\r\nweb_1   | [INFO ] === Processing by JsonApi::V1::DrumPumpChemicalsController#get_related_resources as HTML\r\nweb_1   | [INFO ]   Parameters: {\"relationship\"=>\"compatible_chemicals\", \"source\"=>\"json_api/v1/drum_pump_models\", \"drum_pump_model_id\"=>\"67\"}\r\nweb_1   | [DEBUG]   DrumPumpModel Load (0.5ms)  SELECT  `drum_pump_models`.* FROM `drum_pump_models`  WHERE `drum_pump_models`.`id` = 67  ORDER BY `drum_pump_models`.`id` ASC LIMIT 1\r\nweb_1   | [ERROR] Internal Server Error: JSONAPI: Could not find resource 'jsonapi/v1/drum_pump_chemical'. (Class Jsonapi::V1::DrumPumpChemicalResource not found) /usr/local/bundle/gems/jsonapi-resources-0.5.4/lib/jsonapi/resource.rb:277:in `resource_for'\r\n```\r\n\r\nReal example of parent level:\r\n```\r\nweb_1   | [INFO ] GET     \"/json_api/v1/drum-pump-models/67\"  for 192.168.59.3  at 2015-08-07 13:43:53 +0000\r\nweb_1   | [INFO ] === Processing by JsonApi::V1::DrumPumpModelsController#show as HTML\r\nweb_1   | [INFO ]   Parameters: {\"id\"=>\"67\"}\r\nweb_1   | [DEBUG]   DrumPumpModel Load (0.6ms)  SELECT  `drum_pump_models`.* FROM `drum_pump_models`  WHERE `drum_pump_models`.`id` = 67  ORDER BY `drum_pump_models`.`id` ASC LIMIT 1\r\nweb_1   | [INFO ] Completed 200 OK\r\n```"},"comment":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/comments/128705010","html_url":"https://github.com/cerebris/jsonapi-resources/issues/367#issuecomment-128705010","issue_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/367","id":128705010,"user":{"login":"al3x-edge","id":62131,"avatar_url":"https://avatars.githubusercontent.com/u/62131?v=3","gravatar_id":"","url":"https://api.github.com/users/al3x-edge","html_url":"https://github.com/al3x-edge","followers_url":"https://api.github.com/users/al3x-edge/followers","following_url":"https://api.github.com/users/al3x-edge/following{/other_user}","gists_url":"https://api.github.com/users/al3x-edge/gists{/gist_id}","starred_url":"https://api.github.com/users/al3x-edge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/al3x-edge/subscriptions","organizations_url":"https://api.github.com/users/al3x-edge/orgs","repos_url":"https://api.github.com/users/al3x-edge/repos","events_url":"https://api.github.com/users/al3x-edge/events{/privacy}","received_events_url":"https://api.github.com/users/al3x-edge/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T13:54:39Z","updated_at":"2015-08-07T13:54:39Z","body":"Not related. Found old issues where underscores in namespaces aren't allowed. Will just v2 it under current API namespace."}}