Module: Bhf::ViewHelpers::ActionView
- Defined in:
- lib/bhf/view_helpers.rb
Instance Method Summary collapse
-
#bhf_edit(object, options = {}) ⇒ Object
TODO: add a block of html for custom editing buttons and links.
Instance Method Details
#bhf_edit(object, options = {}) ⇒ Object
TODO: add a block of html for custom editing buttons and links
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/bhf/view_helpers.rb', line 5 def bhf_edit(object, = {}) # TODO: add a block of html for custom editing buttons and links return unless session[Bhf::Engine.config.session_auth_name.to_s] == true [:platform_name] ||= object.class.to_s.pluralize.downcase if object.respond_to?(:'bhf_can_edit?', true) return unless object.bhf_can_edit?() end render partial: 'bhf/helper/frontend_edit', locals: { platform_name: [:platform_name], object: object } end |