Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 933
Filipe Fernandes Avatar asked Mar 18 '14 15:03

Filipe Fernandes


2 Answers

Use

config.generators.jbuilder = false

or

config.generators do |g|
  g.assets            false
  g.helper            false
  g.test_framework    nil
  g.jbuilder          false
end
like image 94
Kirti Thorat Avatar answered Nov 13 '22 17:11

Kirti Thorat


Deleting or commenting out jbuilder from you Gemfile will do the trick.

https://stackoverflow.com/a/24104811/5521564

like image 1
Matthias Avatar answered Nov 13 '22 17:11

Matthias