From 4e99ca2613c26215048b47d99e23831ad6721e9e Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 15 Dec 2011 10:57:25 -0500 Subject: [PATCH] changes to flags/appeals --- app/helpers/post_flags_helper.rb | 8 +++++++- app/models/post_appeal.rb | 4 ++-- app/views/post_appeals/new.html.erb | 11 +---------- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/helpers/post_flags_helper.rb b/app/helpers/post_flags_helper.rb index f6cb58e1b..8f5be3962 100644 --- a/app/helpers/post_flags_helper.rb +++ b/app/helpers/post_flags_helper.rb @@ -4,7 +4,13 @@ module PostFlagsHelper html << '' diff --git a/app/models/post_appeal.rb b/app/models/post_appeal.rb index 68675422f..c7c407416 100644 --- a/app/models/post_appeal.rb +++ b/app/models/post_appeal.rb @@ -12,8 +12,8 @@ class PostAppeal < ActiveRecord::Base scope :recent, lambda {where(["created_at >= ?", 1.day.ago])} def validate_creator_is_not_limited - if appeal_count_for_creator >= 5 - errors[:creator] << "can appeal 5 posts a day" + if appeal_count_for_creator >= 1 + errors[:creator] << "can appeal one post a day" false else true diff --git a/app/views/post_appeals/new.html.erb b/app/views/post_appeals/new.html.erb index 9f19935e1..ad2bd8dcc 100644 --- a/app/views/post_appeals/new.html.erb +++ b/app/views/post_appeals/new.html.erb @@ -2,16 +2,7 @@

If this post was automatically deleted, then it means at least ten janitors all thought it didn't belong on the site. If you still believe this image was wrongfully deleted, then you can appeal its deletion.

-

Some valid reasons for appealing include:

- - - -

All users are limited to 5 appeals a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.

+

All users are limited to one appeal a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.

<%= simple_form_for(@post_appeal, :remote => true, :format => :js) do |f| %> <%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>