tamed_beast 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/posts_controller.rb +0 -13
- data/app/models/post.rb +3 -1
- data/lib/tamed_beast/version.rb +1 -1
- data/tamed_beast.gemspec +3 -3
- metadata +7 -7
@@ -27,7 +27,6 @@ class PostsController < ApplicationController
|
|
27
27
|
@post = @topic.posts.build(params[:post])
|
28
28
|
@post.user = current_user
|
29
29
|
@post.save!
|
30
|
-
email_users_in_topic(@topic)
|
31
30
|
respond_to do |format|
|
32
31
|
format.html do
|
33
32
|
redirect_to forum_topic_path(:forum_id => params[:forum_id], :id => params[:topic_id], :anchor => @post.dom_id, :page => params[:page] || '1')
|
@@ -65,7 +64,6 @@ class PostsController < ApplicationController
|
|
65
64
|
|
66
65
|
def destroy
|
67
66
|
@post.destroy
|
68
|
-
#flash[:notice] = "Post of '{title}' was deleted."[:post_deleted_message, @post.topic.title]
|
69
67
|
respond_to do |format|
|
70
68
|
format.html do
|
71
69
|
redirect_to(@post.topic.frozen? ?
|
@@ -84,15 +82,4 @@ class PostsController < ApplicationController
|
|
84
82
|
def find_post
|
85
83
|
@post = Post.find_by_id_and_topic_id_and_forum_id(params[:id], params[:topic_id], params[:forum_id]) || raise(ActiveRecord::RecordNotFound)
|
86
84
|
end
|
87
|
-
|
88
|
-
def email_users_in_topic(topic)
|
89
|
-
sent = []
|
90
|
-
topic.posts.find(:all, :conditions => ["user_id <> ?", current_user.id]).each do |post|
|
91
|
-
unless sent.include?(post.user.id)
|
92
|
-
UserMailer.send_later(:deliver_forum_notification, post.user, topic) if post.user.notify_forum?
|
93
|
-
sent << post.user_id
|
94
|
-
end
|
95
|
-
end
|
96
|
-
UserMailer.send_later(:deliver_forum_notification_admin, topic)
|
97
|
-
end
|
98
85
|
end
|
data/app/models/post.rb
CHANGED
data/lib/tamed_beast/version.rb
CHANGED
data/tamed_beast.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Luca Bonmassar, Andrea Pavoni"]
|
10
10
|
s.email = ["info@coderloop.com"]
|
11
|
-
s.homepage = ""
|
12
|
-
s.summary = %q{Bullettin board for Rails}
|
13
|
-
s.description = %q{Provides a simple bullettin board for Rails apps.}
|
11
|
+
s.homepage = "http://github.com/coderloop/tamed_beast"
|
12
|
+
s.summary = %q{Bullettin board for Rails 3}
|
13
|
+
s.description = %q{Provides a simple bullettin board for Rails 3 apps.}
|
14
14
|
|
15
15
|
s.add_dependency 'rails', "~> 3.0.3"
|
16
16
|
s.add_dependency 'will_paginate', "~> 3.0.beta"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tamed_beast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Luca Bonmassar, Andrea Pavoni
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-14 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -64,7 +64,7 @@ dependencies:
|
|
64
64
|
version: "0"
|
65
65
|
type: :runtime
|
66
66
|
version_requirements: *id003
|
67
|
-
description: Provides a simple bullettin board for Rails apps.
|
67
|
+
description: Provides a simple bullettin board for Rails 3 apps.
|
68
68
|
email:
|
69
69
|
- info@coderloop.com
|
70
70
|
executables: []
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
- vendor/plugins/white_list/test/white_list_test.rb
|
125
125
|
- vendor/plugins/white_list_formatted_content/init.rb
|
126
126
|
has_rdoc: true
|
127
|
-
homepage:
|
127
|
+
homepage: http://github.com/coderloop/tamed_beast
|
128
128
|
licenses: []
|
129
129
|
|
130
130
|
post_install_message:
|
@@ -156,6 +156,6 @@ rubyforge_project:
|
|
156
156
|
rubygems_version: 1.3.7
|
157
157
|
signing_key:
|
158
158
|
specification_version: 3
|
159
|
-
summary: Bullettin board for Rails
|
159
|
+
summary: Bullettin board for Rails 3
|
160
160
|
test_files: []
|
161
161
|
|