This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [24] pry(main)> u = User.first | |
| User Load (0.8ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT $1 [["LIMIT", 1]] | |
| #<User:0x007ff5557830c8> { | |
| :id => "173e4d20-8487-4848-97b9-ef6fbd92ca78", | |
| :email => "email", | |
| :name => "matt", | |
| :created_at => Fri, 22 Jul 2016 20:12:13 UTC +00:00, | |
| :updated_at => Fri, 22 Jul 2016 20:12:13 UTC +00:00, | |
| :email_verified_at => nil | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class User < ApplicationRecord | |
| validates :name, :email, presence: true | |
| has_one :current_auth_token, class_name: AuthToken | |
| #has_many :auth_tokens | |
| has_many :sessions | |
| has_many :credentials, through: :sessions | |
| has_many :application_users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Option 1 - sideload the Person owner | |
| { | |
| "data": { | |
| "id": "{{profile.id}}", | |
| "type": "profiles", | |
| "relationships": { | |
| "owner": { | |
| "data": { | |
| "id": "{{person.id}}", | |
| "type": "person" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST /v1/profiles?application_id=some-app-id | |
| { | |
| "data": { | |
| "type": "profiles", | |
| "relationships": { | |
| "owner": { | |
| "data": { | |
| "type": "people", | |
| "attributes": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def included_relationships | |
| [ | |
| (credentials.present? ? 'credentials' : nil), | |
| (users.present? ? 'users' : nil) | |
| ].compact | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Homebrew build logs for vim on Mac OS X 10.11.5 | |
| Build date: 2016-05-31 17:54:44 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # in gatekeeper/app/models/credential.rb | |
| # session.credential_id | |
| # credential.session | |
| def token_data | |
| { | |
| # registered claims | |
| jti: "#{self.id}", | |
| iss: "opentransact/v1", | |
| sub: "session|#{session_id}", | |
| iat: Time.now.utc, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # to be run from within a sandbox and production rails console instance | |
| table_names = %w( | |
| ach_file_transitions | |
| ach_file_deliveries | |
| ach_file_archives | |
| ach_files | |
| delivery_targets | |
| batches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Zipmark | |
| module Actions | |
| module Deposits | |
| class UnmarkReturned | |
| include Virtus.model | |
| include ActiveModel::Validations | |
| attribute :id, String | |
| attribute :dry_run, Boolean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| delivery_target = DeliveryTarget.new(delivery_target_params) | |
| [1] pry(#<DeliveryTargetsController>)> delivery_target.connection_settings.class | |
| => ActionController::Parameters | |
| [2] pry(#<DeliveryTargetsController>)> delivery_target.save! | |
| TypeError: can't cast ActionController::Parameters | |
| from /Users/mec/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/bundler/gems/rails-1ad94e760d7a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb:40:in `rescue in type_cast' | |
| [3] pry(#<DeliveryTargetsController>)> delivery_target.connection_settings = delivery_target.connection_settings.to_h | |
| => {"sftp_url"=>"sftp@foo.zipmark.com"} | |
| [4] pry(#<DeliveryTargetsController>)> delivery_target.connection_settings.class |