parrot 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -2
- data/app/controllers/parrot/comments_controller.rb +8 -3
- data/lib/parrot/version.rb +1 -1
- metadata +24 -9
data/README.md
CHANGED
@@ -42,6 +42,8 @@ Given <tt>@comment = Parrot::Comment.find(id)</tt>:
|
|
42
42
|
|
43
43
|
----
|
44
44
|
|
45
|
-
![Chef Surfing](https://chefsurfing.com/images/embed/logos/chef_surfing_header_logo_medium_red.png)
|
45
|
+
[![Chef Surfing](https://chefsurfing.com/images/embed/logos/chef_surfing_header_logo_medium_red.png)](https://chefsurfing.com/)
|
46
46
|
|
47
|
-
parrot is maintained and funded by [Chef Surfing](https://chefsurfing.com/)
|
47
|
+
parrot is maintained and funded by [Chef Surfing](https://chefsurfing.com/):
|
48
|
+
"Find and hire great cooking talent in your city for a catered event, cooking
|
49
|
+
class or weekly meal."
|
@@ -17,9 +17,14 @@ module Parrot
|
|
17
17
|
@comment.commentable_type = commentable_type
|
18
18
|
@comment.commentable_id = commentable_id
|
19
19
|
@comment.author_id = current_user.id
|
20
|
-
@comment.save
|
21
20
|
@commentable_type = commentable_type
|
22
|
-
|
21
|
+
if @comment.save
|
22
|
+
flash[:notice] = t('flash.actions.create.notice', resource_name: t('activerecord.models.comment'))
|
23
|
+
redirect_to after_comment_path(commentable, @comment)
|
24
|
+
else
|
25
|
+
flash[:notice] = t('flash.actions.create.alert', resource_name: t('activerecord.models.comment'))
|
26
|
+
redirect_to :back
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
def destroy
|
@@ -41,7 +46,7 @@ module Parrot
|
|
41
46
|
if params[:commentable_type].present?
|
42
47
|
params[:commentable_type]
|
43
48
|
else
|
44
|
-
commentable_fk.gsub('_id', '')
|
49
|
+
commentable_fk.gsub('_id', '').camelize
|
45
50
|
end
|
46
51
|
end
|
47
52
|
|
data/lib/parrot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parrot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: sqlite3
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :development
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: devise
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,7 +53,12 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
description: Add simple comments to any Rails resource.
|
48
63
|
email: tutecosta@gmail.com
|
49
64
|
executables: []
|
@@ -159,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
174
|
version: '0'
|
160
175
|
requirements: []
|
161
176
|
rubyforge_project:
|
162
|
-
rubygems_version: 1.8.
|
177
|
+
rubygems_version: 1.8.23
|
163
178
|
signing_key:
|
164
179
|
specification_version: 3
|
165
180
|
summary: Simple commenting Rails Engine. Adds commentable behavior to any model easily.
|