--A library is a set of complex programs. Even complicated function implementation can be easily implemented by loading the library into the application. ――What is RubyGems? A system that manages Ruby libraries --What is Gem? Each library in RubyGems --Gemfile is a file that describes and manages the Gem name and version of the Gem used in the application. --Gemfile.lock is a file that records bundle-installed gems.
--Creating a model, rails g model ~ --Edit migration, run migration, rails db: migrate --Restart local server, rails s --Start console, rails c, add data on console, check with Sequel --index Set routing for actions --CRUD is an acronym for Create Create, Read Read, Update Update, Delete Delete --7 actions → index, show, new, create, edit, update, destroy --What is the resource method? A method that automatically generates routes to seven actions. --If you specify the symbol: tweets as an argument, the routing corresponding to the path of / tweets is generated. --What is the only option? If you add only as an option to resources, it will automatically generate the routing for the specified action only. --Controller creation rails g controller ~ → index Action is defined in the controller --Display the tweet content in the view with each method
Recommended Posts