Fixed JavascriptHelper#visual_effect to use camelize such that :blind_up will...

Fixed JavascriptHelper#visual_effect to use camelize such that :blind_up will work #1639 [pelletierm@eastmedia.net]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 863948fc
*SVN*
* Fixed JavascriptHelper#visual_effect to use camelize such that :blind_up will work #1639 [pelletierm@eastmedia.net]
* Fixed that a SessionRestoreError was thrown if a model object was placed in the session that wasn't available to all controllers. This means that it's no longer necessary to use the 'model :post' work-around in ApplicationController to have a Post model in your session.
......
......@@ -419,7 +419,7 @@ def text_field_with_auto_complete(object, method, tag_options = {}, completion_o
# http://script.aculo.us for more documentation.
def visual_effect(name, element_id = false, js_options = {})
element = element_id ? "'#{element_id}'" : "element"
"new Effect.#{name.to_s.capitalize}(#{element},#{options_for_javascript(js_options)});"
"new Effect.#{name.to_s.camelize}(#{element},#{options_for_javascript(js_options)});"
end
# Makes the element with the DOM ID specified by +element_id+ sortable
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册