Quellcode durchsuchen

Restored directorate/payments association

pull/3/head
Adrian Short vor 14 Jahren
Ursprung
Commit
0041f8ab72
2 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. +1
    -0
      lib/models.rb
  2. +5
    -6
      views/payment.haml

+ 1
- 0
lib/models.rb Datei anzeigen

@@ -38,6 +38,7 @@ class Directorate
has n, :services, :order => ['name']
has n, :suppliers, { :through => :services, :order => ['name'] }
has n, :payments, { :through => :services }

before :save, :slugify



+ 5
- 6
views/payment.haml Datei anzeigen

@@ -5,12 +5,11 @@
%tr
%td Date
%td= @payment.d.strftime("%d %b %Y")
-#
%tr
%td Directorate
%td
%a{ :href => "/directorates/#{@payment.directorate.slug}" }
= @payment.directorate.name
%tr
%td Directorate
%td
%a{ :href => "/directorates/#{@payment.directorate.slug}" }
= @payment.directorate.name
%tr
%td Service
%td


Laden…
Abbrechen
Speichern