Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
diaspora
Commits
a4ce6e26
Commit
a4ce6e26
authored
Jan 14, 2014
by
Ivan Zotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix after_create to after_commit
parent
42f790fa
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
9 deletions
+9
-9
app/models/account_deletion.rb
app/models/account_deletion.rb
+1
-1
app/models/comment.rb
app/models/comment.rb
+1
-1
app/models/like.rb
app/models/like.rb
+1
-1
app/models/message.rb
app/models/message.rb
+1
-1
app/models/photo.rb
app/models/photo.rb
+1
-1
app/models/post.rb
app/models/post.rb
+1
-1
app/models/reshare.rb
app/models/reshare.rb
+1
-1
app/models/status_message.rb
app/models/status_message.rb
+1
-1
lib/diaspora/relayable.rb
lib/diaspora/relayable.rb
+1
-1
No files found.
app/models/account_deletion.rb
View file @
a4ce6e26
...
@@ -7,7 +7,7 @@ class AccountDeletion < ActiveRecord::Base
...
@@ -7,7 +7,7 @@ class AccountDeletion < ActiveRecord::Base
belongs_to
:person
belongs_to
:person
after_c
reate
:queue_delete_account
after_c
ommit
:queue_delete_account
,
:on
=>
:create
xml_name
:account_deletion
xml_name
:account_deletion
xml_attr
:diaspora_handle
xml_attr
:diaspora_handle
...
...
app/models/comment.rb
View file @
a4ce6e26
...
@@ -41,7 +41,7 @@ class Comment < ActiveRecord::Base
...
@@ -41,7 +41,7 @@ class Comment < ActiveRecord::Base
self
.
post
.
touch
self
.
post
.
touch
end
end
after_create
do
after_c
ommit
:on
=>
:c
reate
do
self
.
parent
.
update_comments_counter
self
.
parent
.
update_comments_counter
end
end
...
...
app/models/like.rb
View file @
a4ce6e26
...
@@ -13,7 +13,7 @@ class Like < Federated::Relayable
...
@@ -13,7 +13,7 @@ class Like < Federated::Relayable
end
end
end
end
after_create
do
after_c
ommit
:on
=>
:c
reate
do
self
.
parent
.
update_likes_counter
self
.
parent
.
update_likes_counter
end
end
...
...
app/models/message.rb
View file @
a4ce6e26
...
@@ -17,7 +17,7 @@ class Message < ActiveRecord::Base
...
@@ -17,7 +17,7 @@ class Message < ActiveRecord::Base
validates
:text
,
:presence
=>
true
validates
:text
,
:presence
=>
true
validate
:participant_of_parent_conversation
validate
:participant_of_parent_conversation
after_create
do
after_c
ommit
:on
=>
:c
reate
do
#sign comment as commenter
#sign comment as commenter
self
.
author_signature
=
self
.
sign_with_key
(
self
.
author
.
owner
.
encryption_key
)
if
self
.
author
.
owner
self
.
author_signature
=
self
.
sign_with_key
(
self
.
author
.
owner
.
encryption_key
)
if
self
.
author
.
owner
...
...
app/models/photo.rb
View file @
a4ce6e26
...
@@ -46,7 +46,7 @@ class Photo < ActiveRecord::Base
...
@@ -46,7 +46,7 @@ class Photo < ActiveRecord::Base
before_destroy
:ensure_user_picture
before_destroy
:ensure_user_picture
after_destroy
:clear_empty_status_message
after_destroy
:clear_empty_status_message
after_create
do
after_c
ommit
:on
=>
:c
reate
do
queue_processing_job
if
self
.
author
.
local?
queue_processing_job
if
self
.
author
.
local?
end
end
...
...
app/models/post.rb
View file @
a4ce6e26
...
@@ -26,7 +26,7 @@ class Post < ActiveRecord::Base
...
@@ -26,7 +26,7 @@ class Post < ActiveRecord::Base
belongs_to
:o_embed_cache
belongs_to
:o_embed_cache
belongs_to
:open_graph_cache
belongs_to
:open_graph_cache
after_create
do
after_c
ommit
:on
=>
:c
reate
do
self
.
touch
(
:interacted_at
)
self
.
touch
(
:interacted_at
)
end
end
...
...
app/models/reshare.rb
View file @
a4ce6e26
...
@@ -17,7 +17,7 @@ class Reshare < Post
...
@@ -17,7 +17,7 @@ class Reshare < Post
self
.
public
=
true
self
.
public
=
true
end
end
after_create
do
after_c
ommit
:on
=>
:c
reate
do
self
.
root
.
update_reshares_counter
self
.
root
.
update_reshares_counter
end
end
...
...
app/models/status_message.rb
View file @
a4ce6e26
...
@@ -34,7 +34,7 @@ class StatusMessage < Post
...
@@ -34,7 +34,7 @@ class StatusMessage < Post
before_create
:filter_mentions
before_create
:filter_mentions
after_create
:create_mentions
after_create
:create_mentions
after_c
reate
:queue_gather_oembed_data
,
:if
=>
:contains_oembed_url_in_text?
after_c
ommit
:queue_gather_oembed_data
,
:on
=>
:create
,
:if
=>
:contains_oembed_url_in_text?
after_commit
:queue_gather_open_graph_data
,
:on
=>
:create
,
:if
=>
:contains_open_graph_url_in_text?
after_commit
:queue_gather_open_graph_data
,
:on
=>
:create
,
:if
=>
:contains_open_graph_url_in_text?
#scopes
#scopes
...
...
lib/diaspora/relayable.rb
View file @
a4ce6e26
...
@@ -20,7 +20,7 @@ module Diaspora
...
@@ -20,7 +20,7 @@ module Diaspora
delegate
:public?
,
to: :parent
delegate
:public?
,
to: :parent
delegate
:author
,
:diaspora_handle
,
to: :parent
,
prefix:
true
delegate
:author
,
:diaspora_handle
,
to: :parent
,
prefix:
true
after_create
do
after_c
ommit
:on
=>
:c
reate
do
parent
.
touch
(
:interacted_at
)
if
parent
.
respond_to?
(
:interacted_at
)
parent
.
touch
(
:interacted_at
)
if
parent
.
respond_to?
(
:interacted_at
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment