1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update guides with controller generator producing asset stubs

This commit is contained in:
Sebastian Martinez 2011-04-14 10:04:10 -03:00
parent 02883a1090
commit 9aff7e0898

View file

@ -144,10 +144,13 @@ $ rails generate controller Greetings hello
create app/helpers/greetings_helper.rb
invoke test_unit
create test/unit/helpers/greetings_helper_test.rb
invoke assets
create app/assets/javascripts/greetings.js
create app/assets/stylesheets/greetings.css
</shell>
What all did this generate? It made sure a bunch of directories were in our application, and created a controller file, a functional test file, a helper for the view, and a view file.
What all did this generate? It made sure a bunch of directories were in our application, and created a controller file, a view file, a functional test file, a helper for the view, a javascript file and a stylesheet file.
Check out the controller and modify it a little (in +app/controllers/greetings_controller.rb+):