Class: MyImageHelper
- Inherits:
-
Object
- Object
- MyImageHelper
- Includes:
- ImageHelper
- Defined in:
- app/my_lib/my_image_helper.rb
Instance Method Summary collapse
Methods included from ImageHelper
Instance Method Details
#is_openrice?(vendor_app_name) ⇒ Boolean
4 5 6 |
# File 'app/my_lib/my_image_helper.rb', line 4 def is_openrice?(vendor_app_name) vendor_app_name == ApiVendorV1::Constants::OPEN_RICE_VENDOR_NAME end |
#qrcode_image_url(object) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/my_lib/my_image_helper.rb', line 8 def qrcode_image_url(object) qrcode = RQRCode::QRCode.new(object.id.to_s) png = qrcode.as_png( bit_depth: 1, border_modules: 0, color_mode: ChunkyPNG::COLOR_GRAYSCALE, color: 'black', file: nil, fill: 'white', module_px_size: 6, resize_exactly_to: false, resize_gte_to: false, size: 500, ) png.to_data_url end |