attachments for studium

This commit is contained in:
Andreas Stephanides
2015-04-07 23:22:31 +02:00
parent 6c3c98c919
commit 04b6bcac8a
2 changed files with 3 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ class Studium < ActiveRecord::Base
has_many :moduls, :through=>:modulgruppen
has_many :lvas, :through=>:moduls
has_many :semester, :dependent => :destroy
has_many :attachments, :as=>:parent
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
validates :typ, :inclusion => {:in => ["Bachelor","Master"] }
validates :name, :uniqueness => true, :presence=>true

View File

@@ -3,6 +3,8 @@
<div class="row-fluid">
<div class="span12">
<p><%= link_to "Qualifikationsprofil", studium_path( @studium, :ansicht=>"qualifikationsprofil")%> </p>
<%= render_attachments_for(@studium) %>
<%= raw(@studium.desc) %>
</div>
</div>
@@ -15,7 +17,6 @@
<% end %>
</ul>
</div>
</div>
</div>