delegate

A collection of 1 post
Rails Delegate
rails

Rails Delegate

A model should only talk to its immediate association. According to the Law of Demeter, you shouldn’t talk to the association’s property or association’s association. Here we talk about Rails delegate approach. BAD SMELL class Profile < ActiveRecord::Base belongs_to :user end <%= @profile.user.address %> <%= @profile.user.
1 min read
Page 1 of 1
Novi Sad, Serbia, Europe
  • Company
  • About Us
  • Careers
  • Blog
  • Contact
  • Services
  • Our Process
  • Portfolio
  • Solutions
  • Design Review
  • Code Review
  • Open Source
Copyright © 2023 KOLOSEK. All rights reserved.