Ruby on Rails

Also known as: Rails, RoR, ROR

Ruby on Rails (Rails, RoR) is a full-stack web framework for Ruby. Convention over configuration, Active Record ORM, MVC routing, and generators for CRUD apps.

# config/routes.rb
resources :posts

# app/controllers/posts_controller.rb
class PostsController < ApplicationController
  def show
    @post = Post.find(params[:id])
  end
end

# app/models/post.rb
class Post < ApplicationRecord
  validates :title, presence: true
end

← Back to CS Glossary