Changeset 1172
- Timestamp:
- 01/05/08 15:10:22 (9 months ago)
- Files:
-
- plugins/merb_helpers/Rakefile (modified) (1 diff)
- plugins/merb_helpers/lib/merb_helpers/form_helpers.rb (modified) (1 diff)
- plugins/merb_helpers/spec/merb_helpers_spec.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/merb_helpers/Rakefile
r1170 r1172 35 35 desc "Run :package and install resulting .gem" 36 36 task :install => [:package] do 37 sh %{sudo gem install pkg/#{NAME}-#{GEM_VERSION} }37 sh %{sudo gem install pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri} 38 38 end 39 39 plugins/merb_helpers/lib/merb_helpers/form_helpers.rb
r1171 r1172 552 552 # Fall silently back to post if a method is given that is not supported here 553 553 def set_form_method(options = {}, obj = nil) 554 options[:method] ||= ( !obj || (obj.respond_to?(:new_record?) && !obj.new_record?) ? :put : :post)554 options[:method] ||= ((obj && obj.respond_to?(:new_record?) && !obj.new_record?) ? :put : :post) 555 555 if ![:get,:post].include?(options[:method]) 556 556 fake_form_method = options[:method] if [:put, :delete].include?(options[:method]) plugins/merb_helpers/spec/merb_helpers_spec.rb
r1171 r1172 43 43 end 44 44 _buffer.should match_tag(:form, :method => "post") 45 _buffer.should_not match_tag(:input, :type => "hidden", :name => "_method") 45 46 _buffer.should include("CONTENT") 46 47 end
