Class: Kuhsaft::ImageBrick

Inherits:
Brick
  • Object
show all
Defined in:
app/models/kuhsaft/image_brick.rb

Instance Method Summary collapse

Methods inherited from Brick

#available_display_styles, #backend_label, #brick_list_type, #has_siblings?, #parents, #set_position, #to_edit_childs_partial_path, #to_edit_partial_path, #to_style_class, #to_style_id, #update_fulltext

Methods included from BrickList

#allowed_brick_types, #brick_types, included, #renders_own_childs?, #to_brick_item_id, #to_brick_list_id, #uploader?, #user_can_delete?, #user_can_save?

Instance Method Details

#collect_fulltextObject



15
16
17
# File 'app/models/kuhsaft/image_brick.rb', line 15

def collect_fulltext
  [super, caption].join(' ')
end

#image_present?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/models/kuhsaft/image_brick.rb', line 23

def image_present?
  image.present?
end

#resize_image_if_size_changedObject



11
12
13
# File 'app/models/kuhsaft/image_brick.rb', line 11

def resize_image_if_size_changed
  image.recreate_versions! if image_size_changed? && image_present?
end

#user_can_add_childs?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/models/kuhsaft/image_brick.rb', line 19

def user_can_add_childs?
  false
end