lib/bhf/view_helpers.rb in bhf-0.3.7 vs lib/bhf/view_helpers.rb in bhf-0.3.8
- old
+ new
@@ -4,11 +4,13 @@
def bhf_edit(object, options = {})
return unless session[Bhf::Engine.config.session_auth_name.to_s] == true
options[:platform_name] ||= object.class.to_s.pluralize.downcase
-
- return unless object.bhf_can_edit?(options)
+
+ if object.respond_to?(:'bhf_can_edit?', true)
+ return unless object.bhf_can_edit?(options)
+ end
render :partial => 'bhf/helper/frontend_edit', :locals => { :platform_name => options[:platform_name], :object => object }
end
end
\ No newline at end of file