Project

General

Profile

Actions

Refactor #9486

closed

pool.rb lazy_accessor tech debt

Added by Thomas McKay over 9 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
Branch:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

File is overwhelmingly bad, having grown over the years into a big pile of crud. @jsherrill suggested updating things to properly use lazy_accessor. A lot of these attributes will/should move into the model directly for scoped search as well.

       lazy_accessor :remote_data, :pool_derived, :product_name, ...
                      :initializer => (lambda do |pool|
                        attributes = {}
                        pool.remote_data['attributes'].map do |attribute|
                          attributes[attribute[:name].camel_case] = attribute['value']
                        end
                      end)
Actions

Also available in: Atom PDF