bugfixes
This commit is contained in:
@@ -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
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
||||
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if mod? %>
|
||||
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Hi <%= @user.name %>!
|
||||
|
||||
<p>Thank you for registering on Redstoner.com!</p>
|
||||
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %>your email address.</p>
|
||||
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %> your email address.</p>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: reply.author } %> <time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%m"), "#reply-#{reply.id}" %></time>
|
||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || thread.author.is?(current_user) %>
|
||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || reply.thread.author.is?(current_user) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
|
||||
Reference in New Issue
Block a user