rails generate controller
㧠controller ãçæããã¨ãå¿
è¦ã®ç¡ã helperã coffeeãstylesheet ãã¡ã¤ã«ãä¸ç·ã«çæãããã®ã§å¾ã§æ¶ãã®ãããã©ãããã§ããããããªã¨ãã¯ä¸è¨ã®ããã« âno-helper ãªãã·ã§ã³ã âno-assets ãªãã·ã§ã³ãä»ãããã¨ã§ãç¡é§ãªãã¡ã¤ã«ã®çæãæå¶ãããã¨ãåºæ¥ã¾ãã
rails generate controller users --no-helper --no-assets
ãã ãcontroller ãä½æãããã³ã«ãªãã·ã§ã³ãä»ããã®ã¯é¢åãããã§ããå¿ãã¾ãããããªã¨ã㯠config/application.rb ã«å¯¾ãã¦ä¸è¨ã®ãããªã³ã¼ãã追å ããã¨ãï½ã
module YourApp
class Application < Rails::Application
#...
config.generators do |g|
g.assets false
g.helper false
end
#...
end
end
ããã«ããããã©ã«ã㧠helper 㨠assets ãã¡ã¤ã«ãçæãããªããªãã¾ããããã£ããï¼