Sha256: 51bd84884d19b1f1f6743583b84e5390dc6e5873000132bd1b90be8485433533
Contents?: true
Size: 772 Bytes
Versions: 12
Compression:
Stored size: 772 Bytes
Contents
module Bhf module FrontendHelper def bhf_edit(object, options = {}, &block) return unless session[Bhf.configuration.session_auth_name.to_s] == true options[:platform_name] ||= object.class.to_s.pluralize.downcase if object.respond_to?(:'bhf_can_edit?', true) return unless object.bhf_can_edit?(options) end area = if options[:area] options[:area] elsif object.respond_to?(:bhf_area, true) object.bhf_area(options) end render partial: 'bhf/helper/frontend_edit', locals: { area: area, platform_name: options[:platform_name], object: object, block: (with_output_buffer(&block) if block_given?)} end def bhf_main_logo(area) Bhf.configuration.logo.call(area) end end end
Version data entries
12 entries across 12 versions & 1 rubygems