Pārlūkot izejas kodu

Moved back to belongs_to rather than has 1 association

pull/3/head
Adrian Short pirms 14 gadiem
vecāks
revīzija
bb6a49349f
2 mainītis faili ar 1 papildinājumiem un 6 dzēšanām
  1. +1
    -1
      lib/models.rb
  2. +0
    -5
      views/payment.haml

+ 1
- 1
lib/models.rb Parādīt failu

@@ -19,7 +19,7 @@ class Payment
belongs_to :service belongs_to :service
belongs_to :supplier belongs_to :supplier
has 1, :directorate, { :through => :service }
belongs_to :directorate, { :through => :service }


def url def url
SITE_URL + "payments/" + @id.to_s SITE_URL + "payments/" + @id.to_s


+ 0
- 5
views/payment.haml Parādīt failu

@@ -23,9 +23,4 @@
%tr %tr
%td Amount £ %td Amount £
%td= sprintf("%0.2f", @payment.amount) %td= sprintf("%0.2f", @payment.amount)
%tr
%td Transaction Number
%td= @payment.trans_no.nil? ? "unknown" : @payment.trans_no



Notiek ielāde…
Atcelt
Saglabāt