1

The last couple of times that I've used 'rails generate scaffold [ModelName]' everything has been generated except that the controller is blank. It contains no methods at all. It's easy enough to copy that in from other sources, but I'm wondering what is going on.

The only unique thing about this application for me is that it's using the ActiveAdmin gem.

Any suggestions for how I could get this working as expected again?

Kevin K
  • 2,191
  • 2
  • 28
  • 41
  • might not be super helpful, but you can disable all gems that you think might be causing the problem and see if the problem persists. If that fixes it then enable them 1 at a time to find which one is being naughty – hajpoj Sep 13 '12 at 05:38
  • 1
    duplicate (you need to know thy keywords however): http://stackoverflow.com/questions/8919170/rails-3-1-how-override-inherited-resources-and-permit-rails-scaffolding-to-work – prusswan Sep 13 '12 at 06:07

1 Answers1

0

+1 to hajpoj, but there are a couple additional steps you could use to troubleshoot.

What does rails generate scaffold_controller give you? My first suggestion to be to isolate the controller generator and go from there.

Following that, I would actually look in the Rails generator code at the point of controller generation and work backwards from there. Here is (I believe) the entry point, from there, you can follow the code to where things are failing. This is, obviously, not the easiest path, but would probably teach you a lot about the rails internals.

JohnMetta
  • 18,782
  • 5
  • 31
  • 57