Problem with name spaced resources


I have the following in my routes.rb:

namespace :accounting do
  resource :settings

resource :settings

Two models


And corresponding controllers…

For some reason when I submit data to the Accounting::SettingsController the params[:setting] is empty, after some experiments I found that it actually accepts params, but according to the global settings model.

What I’m missing? :smile:

Thanks in advance.

fixed by renaming Accounting::Settings to Accounting::Setting, i.e. to singular

1 Like

Models should always be singular in any context. Technically all class names are (Controller is singular)