サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
やる気の出し方
longliveruby.com
Simplified when we talk about the request that is coming to the Rails application, we usually consider two elements of the application: routes configuration and controller action. The route configuration decides which controller action should be triggered when the given request comes. However, there is a lot more than that. Knowing the request cycle’s nuances allows us to understand the Rails appl
Basic usage Employee = Struct.new(:first_name, :last_name) employee = Employee.new(“John”, “Doe”) employee.first_name # => “John” employee.last_name # => “Doe” As you can see, it behaves like a simple Ruby class. The above code is equivalent to: class Employee attr_reader :first_name, :last_name def initialize(first_name, last_name) @first_name = first_name @last_name = last_name end end employee
DSL’s around you Before diving into the technical aspects of building DSL in Ruby, let’s explore more examples for domain-specific languages used in popular Ruby solutions and libraries. Database migrations Creating and updating databases with Rails is an effortless and straightforward thing. A special DSL allows you to define columns, types, indexes, and many more. The definition is later transla
Rails design patterns — The big picture This article is a high-level overview of design patterns that are commonly used in Ruby on Rails applications. I will also mention the advantages and disadvantages of using design patterns as, in some cases, we can harm the architecture instead of making it better. A design pattern is a repeatable solution to solve common problems in a software design. When
このページを最初にブックマークしてみませんか?
『https://longliveruby.com/』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く