Lincoln
Daniel Day-Lewis (Lincoln)
Quvenzhané Wallis (Beasts of the Southern Wild)
| require 'securerandom' | |
| codes = Array.new(200) { SecureRandom.hex(8) } # => ["de988ab34e9ac058", "423198812a0152ad", … ] |
| module Filterable | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| def filter(filtering_params) | |
| filtering_params.reduce(self) do |relation, (scope_name, value)| | |
| relation.public_send(scope_name, value) if value.present? | |
| end | |
| end | |
| end |