diff --git a/app/models/forumthread.rb b/app/models/forumthread.rb index 0af46bd..6be73dd 100644 --- a/app/models/forumthread.rb +++ b/app/models/forumthread.rb @@ -4,8 +4,6 @@ class Forumthread < ActiveRecord::Base belongs_to :user_editor, class_name: "User", foreign_key: "user_editor_id" has_many :threadreplies - - validates_presence_of :title, :author, :forum validates_presence_of :content validates_length_of :content, in: 5..10000 @@ -37,6 +35,6 @@ class Forumthread < ActiveRecord::Base end def can_write?(user) - forum.can_write?(user) && (!locked? || mod?) + forum.can_write?(user) && (!locked? || user.mod?) end end \ No newline at end of file diff --git a/app/views/forumthreads/show.html.erb b/app/views/forumthreads/show.html.erb index 1cda450..0faea1f 100644 --- a/app/views/forumthreads/show.html.erb +++ b/app/views/forumthreads/show.html.erb @@ -3,7 +3,7 @@ <%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
Thank you for registering on Redstoner.com!
-To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %>your email address.
+To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %> your email address.