You can precompile the assets in app/assets using rake assets:precompile and remove those compiled assets using rake assets:clean. ![]() Middleware Rack::Sendfile, ActionDispatch::Static, Rack::Lock, #, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::Quer圜ache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETagĪpplication root /home/foobar/commandsapp We'll talk more about Rake in-depth in a little while. Which database? The sqlite3 database that Rails will create for you when we run the rake db:migrate command. The migration requires that we migrate, that is, run some Ruby code (living in that 20130717151933_create_high_scores.rb) to modify the schema of our database. The generator checks that there exist the directories for models, controllers, helpers, layouts, functional and unit tests, stylesheets, creates the views, controller, model and database migration for HighScore (creating the high_scores table and fields), takes care of the route for the resource, and new tests for everything. $ bin/rails generate scaffold HighScore game:string score:integerĬreate db/migrate/20130717151933_create_high_scores.rbĬreate app/controllers/high_scores_controller.rbĬreate app/views/high_scores/Ĭreate app/views/high_scores/Ĭreate app/views/high_scores/Ĭreate app/views/high_scores/Ĭreate app/views/high_scores/_Ĭreate test/controllers/high_scores_controller_test.rbĬreate test/helpers/high_scores_helper_test.rbĬreate app/views/high_scores/Ĭreate app/views/high_scores/Ĭreate app/assets/javascripts/high_scores.js.coffeeĬreate app/assets/stylesheets/high_ ![]() Start Here Getting Started with Rails Models Active Record Basics Rails Database Migrations Active Record Validations Active Record Callbacks Active Record Associations Active Record Query Interface Views Layouts and Rendering in Rails Action View Form Helpers Controllers Action Controller Overview Rails Routing from the Outside In Digging Deeper Active Support Core Extensions Rails Internationalization API Action Mailer Basics Securing Rails Applications Debugging Rails Applications Configuring Rails Applications Rails Command Line Tools and Rake Tasks Asset Pipeline Working with JavaScript in Rails Extending Rails Rails on Rack Creating and Customizing Rails Generators Contributing to Ruby on Rails Contributing to Ruby on Rails API Documentation Guidelines Ruby on Rails Guides Guidelines Maintenance Policy Maintenance Policy Release Notes Upgrading Ruby on Rails Ruby on Rails 4.1 Release Notes Ruby on Rails 4.0 Release Notes Ruby on Rails 3.2 Release Notes Ruby on Rails 3.1 Release Notes Ruby on Rails 3.0 Release Notes Ruby on Rails 2.3 Release Notes Ruby on Rails 2.2 Release Notes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |