Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #4441 - Overriden link_to method should be public, not protected

  • Loading branch information...
commit 8cf10332a45283feba57c6263ff4a0eda86ac52f 1 parent 832c092
@ehelms ehelms authored domcleal committed
Showing with 14 additions and 14 deletions.
  1. +14 −14 app/helpers/application_helper.rb
View
28 app/helpers/application_helper.rb
@@ -2,20 +2,6 @@
module ApplicationHelper
include HomeHelper
- protected
- def contract model
- model.to_label
- end
-
- def show_habtm associations
- render :partial => 'common/show_habtm', :collection => associations, :as => :association
- end
-
- def edit_habtm klass, association, prefix = nil, options = {}
- render :partial => 'common/edit_habtm', :locals =>{:prefix => prefix, :klass => klass, :options => options,
- :associations => association.all.sort.delete_if{|e| e == klass}}
- end
-
# Add autogenerated html data-id attribute if not present (prefixed with "aid_")
def link_to(*args, &block)
if block_given?
@@ -41,6 +27,20 @@ def link_to(*args, &block)
end
end
+ protected
+ def contract model
+ model.to_label
+ end
+
+ def show_habtm associations
+ render :partial => 'common/show_habtm', :collection => associations, :as => :association
+ end
+
+ def edit_habtm klass, association, prefix = nil, options = {}
+ render :partial => 'common/edit_habtm', :locals =>{:prefix => prefix, :klass => klass, :options => options,
+ :associations => association.all.sort.delete_if{|e| e == klass}}
+ end
+
def link_to_remove_fields(name, f, options={})
f.hidden_field(:_destroy) + link_to_function(icon_text("remove", name), "remove_fields(this)", options.merge(:title => _("Remove Parameter")))
end
Please sign in to comment.
Something went wrong with that request. Please try again.