Upgraded to Rails 4

This commit is contained in:
2019-02-24 15:47:27 +01:00
parent f52ec0411d
commit f809f36c06
86 changed files with 732 additions and 662 deletions

View File

@@ -5,9 +5,9 @@ class Comment < ActiveRecord::Base
acts_as_nested_set :scope => [:commentable_id, :commentable_type]
belongs_to :commentable, :polymorphic=> true
belongs_to :user
validate :text, :presence=>true
validate :user, :presence=>true
validate :commentable, :presence=>true
validates :text, :presence=>true
validates :user, :presence=>true
validates :commentable, :presence=>true
include IsCommentable
NUM = {"Beispiel"=> 2, "Survey::Question"=> 7}
def parent_object