Skip to content

Instantly share code, notes, and snippets.

@wdspkr
Last active January 4, 2022 07:25
Show Gist options
  • Save wdspkr/5e78a8c929af41a51ae25c8aa8fa1a36 to your computer and use it in GitHub Desktop.
Save wdspkr/5e78a8c929af41a51ae25c8aa8fa1a36 to your computer and use it in GitHub Desktop.
module InterestRepository
extend self
def my_index
Interest.where(fancy: 'query')
.and(more: 'fancy_stuff')
.order('wicked')
.joins('allthethings')
end
end
class Interest < ActiveRecord::Base
validates :account_id, :amount, :rate, presence: true
belongs_to :account
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment