I can't reproduce this on a basic Rails installation:
$ rails new empty && cd empty
$ rails g scaffold Post title desc:text
$ rails g scaffold product name:string information:text 'price:decimal{7,2}' stock:integer available:boolean
After this, app/controllers/products_controller.rb
has all the lines I'd expect it to have:
$ wc -l app/controllers/products_controller.rb
74 app/controllers/products_controller.rb
That said, if I add ActiveAdmin to the Gemfile:
$ echo 'gem "activeadmin", github: "gregbell/active_admin"' >> Gemfile && bundle
and generate the scaffold:
$ rails g scaffold product name:string information:text 'price:decimal{7,2}' stock:integer available:boolean
my app/controllers/products_controller.rb
contains a lot less code. It's not empty, but almost:
class ProductsController < InheritedResources::Base
end
If this is also what you're seeing, your problem comes from the fact that ActiveAdmin uses inherited_resources to do some of the heavy lifting. And you've ended up with am InheritedResource controller.
The controller should work perfectly fine, though.