Class: CartoonistTwitter::EntityHooks

Inherits:
Object
  • Object
show all
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_partialObject


10
11
12
# File 'lib/cartoonist-twitter/engine.rb', line 10

def edit_entity_before_partial
  "admin/tweets/entity_tweet"
end