Beispiele hinzugefügt
This commit is contained in:
7
app/models/beispiel.rb
Normal file
7
app/models/beispiel.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Beispiel < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
attr_accessible :desc, :name, :file, :lva_id
|
||||
has_attached_file :file
|
||||
belongs_to :lva
|
||||
translates :desc, :fallbacks_for_empty_translations => true
|
||||
end
|
||||
@@ -4,4 +4,5 @@ class Lva < ActiveRecord::Base
|
||||
has_and_belongs_to_many :modul
|
||||
has_and_belongs_to_many :semester
|
||||
translates :desc, :fallbacks_for_empty_translations => true
|
||||
has_many :beispiele , :class_name => "Beispiel"
|
||||
end
|
||||
|
||||
@@ -9,7 +9,5 @@ def moderator
|
||||
end
|
||||
end
|
||||
|
||||
def moderator=(id)
|
||||
User.find(id).add_role(:newsmoderator, self)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user