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
ConsenSys Software Inc | |
Individual Contributor License Agreement ("Agreement") V2.0 | |
http://www.apache.org/licenses/ | |
Thank you for your interest in ConsenSys Software Inc (ConsenSys). | |
In order to clarify the intellectual property license | |
granted with Contributions from any person or entity, ConsenSys | |
must have a Contributor License Agreement ("CLA") on file that has | |
been signed by each Contributor, indicating agreement to the license | |
terms below. This license is for your protection as a Contributor as |
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
curl https://%ES-SERVER:PORT%/_nodes/stats/thread_pool |jq '.nodes |to_entries[].value.thread_pool.bulk' |
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 Member::Index < Trailblazer::Operation | |
attr_reader :members | |
def process(params) | |
office = Office::Show.(params.merge(id: params[:office_id])).office | |
@members = office.office_members | |
end | |
end | |
# more stuff that extends from Member::Index |
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 ModelClass < ActiveRecord::Base | |
attr_protected | |
end | |
def up | |
ModelClass.reset_column_information | |
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
class Employee | |
belongs_to: :department | |
has_one :organization, through: :department | |
end | |
class Departmet | |
belongs_to :organization | |
has_many :project_departments | |
has_many :projects, through: :project_departments | |
has_many :employees |
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 Project | |
# as above | |
has_one :project_department, ->(department) { where department: department }, class_name: 'ProjectDepartment' | |
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
class Project | |
has_many :project_departments | |
has_many :departments, through: :project_departments | |
end | |
class ProjectDepartment | |
belongs_to :project | |
belongs_to :project | |
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
class Employee | |
belongs_to: :department | |
has_one :organization, through: :department | |
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
belongs_to :organization through: :department # Does not exist |
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 Employee | |
belongs_to: :department | |
end | |
class Departmet | |
belongs_to :organization | |
has_many :employees | |
end | |
class Organization |
NewerOlder