I hereby claim:
- I am willcosgrove on github.
- I am willcosgrove (https://keybase.io/willcosgrove) on keybase.
- I have a public key ASCgfVUsESgwzlDDf7XB5Oui4uzbJyrKNcQZrVa3OISqQQo
To claim this, I am signing this object:
| def blank_or(attribute, blank_text: "N/A", blank_test: :blank?) | |
| if attribute.send(blank_test) | |
| return blank_text | |
| else | |
| return yield(attribute) if block_given? | |
| return attribute | |
| end | |
| end |
| module ClientID | |
| extend ActiveSupport::Concern | |
| included do | |
| attr_writer :cid | |
| after_commit :_save_cid, on: :create, if: -> { @cid.present? } | |
| end | |
| def cid | |
| Thread.current[_cid_key] |
I hereby claim:
To claim this, I am signing this object:
| # This concern will augment the default rendering behavior of a controller. If | |
| # no matching view template is found for an action, a Phlex view will be | |
| # searched for. First at a constant defined within the controller that matches | |
| # the name of the action (`Edit`, `Index`, etc), and then within the views | |
| # folder defined under `#{controller_name}::#{action_name}Page` | |
| # (e.g. Admin::Bottles::IndexPage) | |
| # | |
| # If a matching Phlex view is found, it will be initialized with the defined | |
| # instance variables that match it's own attributes (defined using the | |
| # `attribute` macro). |
| require "bundler/inline" | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'phlex' | |
| end | |
| class Field < Phlex::HTML | |
| def template |