Class: CartoonistTwitter::EntityHooks
- Inherits:
-
Object
- Object
- CartoonistTwitter::EntityHooks
- Defined in:
- lib/cartoonist-twitter/engine.rb
Class Method Summary collapse
Class Method Details
.after_entity_save(entity) ⇒ Object
4 5 6 7 8 |
# File 'lib/cartoonist-twitter/engine.rb', line 4 def after_entity_save(entity) return if Setting[:"#{entity.entity_type}_tweet_style"] == :disabled result = Tweet.find_for entity Tweet.create_for entity unless result end |
.edit_entity_before_partial ⇒ Object
10 11 12 |
# File 'lib/cartoonist-twitter/engine.rb', line 10 def edit_entity_before_partial "admin/tweets/entity_tweet" end |