ruby-on-railsrubyscaffoldjbuilder

Skip jbuilder files when I generate a scaffold?


When I scaffold I don't want it to generate these files:

invoke    jbuilder
create      app/views/tests/index.json.jbuilder
create      app/views/tests/show.json.jbuilder

But how? in my application.rb I have this:

config.generators do |g|
  g.assets            false
  g.helper            false
  g.test_framework    nil
end

Solution

  • Use

    config.generators.jbuilder = false

    or

    config.generators do |g|
      g.assets            false
      g.helper            false
      g.test_framework    nil
      g.jbuilder          false
    end