質問

I have a few specific questions. I have tried googling these but I get a lot of extremely general info. I've also looked at tutorials but generally they are so long I can't find my specific Question.

Thanks!

  • what is the difference between :test, :development and :assets? Rails 3.2.1 groups :development, :test but in the "Rails 3 Tutorial" videos i'm watching he breaks them out separately.
  • how many tests do you usually write? It seems you could write 5... or infinite. Where is the sweet spot?
  • which javascript folder do I use? I notice there is a public folder and then theres a folder i can place stuff into under assets called 'javascript' and 'images'. Do i need to use those assets folders or is it ok to put 'js' and 'img' (my preferred naming convention) inside of /public
  • how do i compile scripts/stylesheets? I noticed uglifier is in there, is there some command that compresses css and js and combines them into one file? (one css, one js)
  • how do i run commands whenever i run rails console? I know how to put gem 'hirb' in Gemfile, but I want to run extend Hirb::Console every time rails console is run for that project so I don't have to type it, and i can generate my tables nicely

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top