forked from bofh/fetsite
attachments for studium
This commit is contained in:
@@ -33,7 +33,7 @@ class Studium < ActiveRecord::Base
|
|||||||
has_many :moduls, :through=>:modulgruppen
|
has_many :moduls, :through=>:modulgruppen
|
||||||
has_many :lvas, :through=>:moduls
|
has_many :lvas, :through=>:moduls
|
||||||
has_many :semester, :dependent => :destroy
|
has_many :semester, :dependent => :destroy
|
||||||
|
has_many :attachments, :as=>:parent
|
||||||
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
|
validates :abkuerzung, :length=>{:maximum=>5}, :format=>{:with=>/^[a-zA-z]{0,5}$/}
|
||||||
validates :typ, :inclusion => {:in => ["Bachelor","Master"] }
|
validates :typ, :inclusion => {:in => ["Bachelor","Master"] }
|
||||||
validates :name, :uniqueness => true, :presence=>true
|
validates :name, :uniqueness => true, :presence=>true
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<p><%= link_to "Qualifikationsprofil", studium_path( @studium, :ansicht=>"qualifikationsprofil")%> </p>
|
<p><%= link_to "Qualifikationsprofil", studium_path( @studium, :ansicht=>"qualifikationsprofil")%> </p>
|
||||||
|
<%= render_attachments_for(@studium) %>
|
||||||
|
|
||||||
<%= raw(@studium.desc) %>
|
<%= raw(@studium.desc) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -15,7 +17,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user