1

My path helpers (like data_path, users_path) are now translating itself to use '.' instead of '/'.

For example, data_path(@data) translates to:

data.%23<datareport:0x7fcaba0c2970>

instead of '/data/id'.

My routes look like:

  map.resources :data
David C
  • 3,659
  • 5
  • 34
  • 46
  • It is possible to add new pluralization exceptions. I don't know if that will help for routes, though. http://as.rubyonrails.org/classes/ActiveSupport/Inflector/Inflections.html The singular of data is 'datum', if that helps. – x1a4 Jun 17 '10 at 08:02

2 Answers2

1

I believe the resources must be in plural form. As far as i see, in rails, 'data'.pluralize is 'datas'. You may also check out this: Ruby on rails path helpers

Community
  • 1
  • 1
morgan freeman
  • 6,041
  • 3
  • 25
  • 32
  • See this answer, which is a bit more descriptive: http://stackoverflow.com/questions/5674116/path-helpers-generate-paths-with-dots-instead-of-slashes – Anatortoise House Aug 31 '11 at 19:23
1

@cristian is right. If you are using :data instead of :datas then you should define your route to be map.resource :data

But the plural form is map.resources :datas

Shripad Krishna
  • 10,463
  • 4
  • 52
  • 65