Changeset 1172

Show
Ignore:
Timestamp:
01/05/08 15:10:22 (9 months ago)
Author:
rogelio.samo..@gmail.com
Message:

- Fix error introduced by issue #398 closes #403

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/merb_helpers/Rakefile

    r1170 r1172  
    3535desc "Run :package and install resulting .gem" 
    3636task :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
    3838end 
    3939 
  • plugins/merb_helpers/lib/merb_helpers/form_helpers.rb

    r1171 r1172  
    552552      # Fall silently back to post if a method is given that is not supported here 
    553553      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) 
    555555        if ![:get,:post].include?(options[:method]) 
    556556          fake_form_method = options[:method] if [:put, :delete].include?(options[:method]) 
  • plugins/merb_helpers/spec/merb_helpers_spec.rb

    r1171 r1172  
    4343    end 
    4444    _buffer.should match_tag(:form, :method => "post") 
     45    _buffer.should_not match_tag(:input, :type => "hidden", :name => "_method") 
    4546    _buffer.should include("CONTENT") 
    4647  end