I hereby claim:
- I am jcypret on github.
- I am jcypret (https://keybase.io/jcypret) on keybase.
- I have a public key whose fingerprint is 7A1B A777 0AA5 6016 264C CA30 6CD8 25D3 010E 798A
To claim this, I am signing this object:
| name: build | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v1 |
| def deep_permit(args) | |
| case args | |
| when ActionController::Parameters | |
| args.to_unsafe_hash.deep_symbolize_keys | |
| when Hash | |
| args.symbolize_keys.transform_values(&method(:deep_permit)) | |
| when Array | |
| args.map(&method(:deep_permit)) | |
| else | |
| args |
| gem "phonelib" |
| # Store enums in database as strings rather than integers. | |
| # | |
| # Wraps `ActiveRecord::Enum`; just use `string_enum` instead of `enum`. | |
| # https://api.rubyonrails.org/v4.2.11.1/classes/ActiveRecord/Enum.html | |
| # | |
| # Usage: | |
| # extend StringEnum | |
| # string_enum status: [:active, :archived] | |
| # | |
| module StringEnum |
| export function objectToQueryString(obj) { | |
| return Object.keys(obj) | |
| .map(k => encodeURIComponent(k) + "=" + encodeURIComponent(obj[k] || "")) | |
| .join("&"); | |
| } |
| def inside_layout(layout = "application", &block) | |
| render inline: capture(&block), layout: "layouts/#{layout}" | |
| end |
| image: node:latest | |
| cache: | |
| paths: | |
| - node_modules/ | |
| - bower_components/ | |
| before_script: | |
| - npm install | |
| - npm install -g phantomjs-prebuilt |
I hereby claim:
To claim this, I am signing this object:
| if (!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1')) { | |
| $('img[src*="svg"]').attr('src', function () { return $(this).data('svg-fallback'); }); | |
| } |
| module HashidsSupport | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def hashids | |
| Hashids.new(table_name, 6) | |
| end | |
| def encode_id(id) | |
| hashids.encode(id) |