Added excludeFields for built in fields (like authenticity token).

Added requirements for jquery rather than dependencies.
Added non-minified version of sisyphus with fix for object === null check when looking to see if browser is msie.
This commit is contained in:
Devon Noonan 2012-10-02 16:52:07 -04:00
parent f117df00ba
commit e8cfc01f5b
3 changed files with 466 additions and 5 deletions

View File

@ -6,7 +6,7 @@ module ActionView
buf = ActiveSupport::SafeBuffer.new buf = ActiveSupport::SafeBuffer.new
if options.has_key?(:id) && Sisyphus::process if options.has_key?(:id) && Sisyphus::process
buf.safe_concat("<script type=\"text/javascript\">$(document).ready(function() {$('##{options[:id]}').sisyphus();});</script>") buf.safe_concat("<script type=\"text/javascript\">$(document).ready(function() {$('##{options[:id]}').sisyphus({excludeFields: $('input[name=utf8], input[name=_method], input[name=authenticity_token]')});});</script>")
end end
buf << form_tag_without_sisyphus(url_for_options, options, &block) buf << form_tag_without_sisyphus(url_for_options, options, &block)
@ -15,4 +15,4 @@ module ActionView
alias_method_chain :form_tag, :sisyphus alias_method_chain :form_tag, :sisyphus
end end
end end
end end

View File

@ -16,6 +16,9 @@ Gem::Specification.new do |gem|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"] gem.require_paths = ["lib"]
gem.add_dependency "railties", "~> 3.1" gem.requirements << 'requires jQuery 1.4+ to be included before Sisyphus'
gem.add_dependency "jquery-rails" gem.requirements << 'requires jQuery 1.8+ to be included if you require jStorage'
gem.add_dependency "rails", ">= 3.1.0"
end end

File diff suppressed because one or more lines are too long