/Food-Log

A Ruby on Rails based food logger that keeps track of the food I consume

Primary LanguageRuby

WIP


Food Logger

Installation

Install Ruby

Install Rails

To install Rails, run the following command:

gem install rails

Creating a New Rails App

To create a new Rails application, use the following command, replacing <app-name> with your desired application name:

rails new <app-name>

Starting the Rails Server

Navigate to your application directory and start the Rails server with:

rails server

Creating a New Table in Rails

Using Rails Model

To create a new model, use the following command, replacing <model-name> with your desired model name:

rails generate model <model-name>

Using Rails Scaffold (Not Recommended)

To create a new scaffold, use the following command, replacing <model-name> with your desired model name:

rails generate scaffold <model-name>

Migrating the Database

To apply the migrations and update the database schema, use the following command:

rails db:migrate