Module: NimbleshopSplitable::ExposedHelper

Defined in:
app/helpers/nimbleshop_splitable/exposed_helper.rb

Instance Method Summary collapse

Instance Method Details

#nimbleshop_splitable_available_payment_options_iconsObject



16
17
18
19
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 16

def nimbleshop_splitable_available_payment_options_icons
  return unless NimbleshopSplitable::Splitable.first
  nimbleshop_splitable_small_image
end

#nimbleshop_splitable_crud_formObject



26
27
28
29
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 26

def nimbleshop_splitable_crud_form
  return unless NimbleshopSplitable::Splitable.first
  render partial: '/nimbleshop_splitable/splitables/edit'
end

#nimbleshop_splitable_icon_for_order_payment(order) ⇒ Object



31
32
33
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 31

def nimbleshop_splitable_icon_for_order_payment(order)
  nimbleshop_splitable_small_image height: '10px'
end

#nimbleshop_splitable_imageObject



12
13
14
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 12

def nimbleshop_splitable_image
  image_tag "engines/nimbleshop_splitable/splitable.png", alt: 'splitable logo'
end

#nimbleshop_splitable_payment_form(order) ⇒ Object



21
22
23
24
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 21

def nimbleshop_splitable_payment_form(order)
  return unless NimbleshopSplitable::Splitable.first
  render partial: '/nimbleshop_splitable/payments/new', locals: {order: order}
end

#nimbleshop_splitable_picture_on_admin_payment_methodsObject



8
9
10
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 8

def nimbleshop_splitable_picture_on_admin_payment_methods
  image_tag "engines/nimbleshop_splitable/splitable_big.png", { alt: 'splitable logo' }
end

#nimbleshop_splitable_small_image(options = {}) ⇒ Object



4
5
6
# File 'app/helpers/nimbleshop_splitable/exposed_helper.rb', line 4

def nimbleshop_splitable_small_image( options = {} )
  image_tag "engines/nimbleshop_splitable/splitable_small.png", {alt: 'splitable icon'}.merge(options)
end