Skip to content

Commit

Permalink
Merge pull request #2 from travisvalentine/refactoring
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
travisvalentine committed May 7, 2012
2 parents 0dbce76 + 7051683 commit a994d67
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/sales_engine/transaction.rb
Expand Up @@ -25,18 +25,12 @@ class << self
define_method "find_by_#{attribute}" do |input|
find_by_(attribute, input)
end
end

[:id, :invoice_id, :credit_card_number,
:credit_card_expiration_date, :result,
:created_at, :updated_at].each do |attribute|
define_method "find_all_by_#{attribute}" do |input|
find_all_by_(attribute, input)
end
end
end


def self.create(invoice_id, attributes={})
t = Transaction.new(
:id => database.transactions.count + 1,
Expand Down

0 comments on commit a994d67

Please sign in to comment.