-
Michael4
-
a posté un article :
Article list display in Ruby on Rails
Let's go back to our controller in app/controllers/articles_controller.rb and change the index action to retrieve all the articles from the database: class ArticlesController < ApplicationController def index &...Lundi 9 Janvier 2023 à 09:30
-
a posté un article :
Initialization of the object using Ruby
It's important to note that we've only initialized this object. This object is not stored in the database at all. It is currently only available in the console. To save it to the database, you need to call save: irb> article.save ...Lundi 9 Janvier 2023 à 09:29
-
a posté un article :
Creating a directory in Ruby
Now let's try to create a directory. We will use script/generate to generate the model, controller and views for the directory. <code>$>ruby script/generate scaffold_resource article title:string body_format:string bo...Mercredi 1er Juin 2022 à 16:13
-
a posté un article :
Introduction to working with a database in Ruby
Communication of objects and databases in ruby on rails is carried out using an OR mapper, which is called ActiveRecord. It deals with mapping fields from a database table to object fields, validating objects before saving, generating ...Mercredi 1er Juin 2022 à 16:01
Blogs de Michael4
Blogs favoris
Michael4 n'a pas encore de blogs favorisSuit 0 membres
Michael4 ne suit pas de membreSuivi par 0 membres
Michael4 n'est suivi par aucun membre -