generic_form_builder 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/generic_form_builder.gemspec +1 -1
- data/lib/generic_form_builder.rb +4 -2
- metadata +41 -19
| @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            # -*- encoding: utf-8 -*-
         | 
| 2 2 | 
             
            Gem::Specification.new do |s|
         | 
| 3 3 | 
             
              s.name          = "generic_form_builder"
         | 
| 4 | 
            -
              s.version       = '0.4. | 
| 4 | 
            +
              s.version       = '0.4.5'
         | 
| 5 5 | 
             
              s.platform      = Gem::Platform::RUBY
         | 
| 6 6 | 
             
              s.authors       = ["Elliot Crosby-McCullough", "George Brocklehurst", "Elise Huard", "Tom Stuart"]
         | 
| 7 7 | 
             
              s.email         = ["elliot.cm@gmail.com"]
         | 
    
        data/lib/generic_form_builder.rb
    CHANGED
    
    | @@ -23,13 +23,15 @@ class GenericFormBuilder < ActionView::Helpers::FormBuilder | |
| 23 23 | 
             
              def select(field, collection, options = {}, html_options = {})
         | 
| 24 24 | 
             
                return super if options[:default_builder]
         | 
| 25 25 | 
             
                label_text = options[:label] || field.to_s.humanize
         | 
| 26 | 
            -
                content_tag(: | 
| 26 | 
            +
                note       = content_tag(:span, options[:note], :class => 'note') if options[:note]
         | 
| 27 | 
            +
                content_tag(:p, label(field, "#{label_text} #{errors_text(field)}") + note + super)
         | 
| 27 28 | 
             
              end
         | 
| 28 29 |  | 
| 29 30 | 
             
              def collection_select(field, collection, value_method, name_method, options = {}, html_options = {})
         | 
| 30 31 | 
             
                return super(field, collection, value_method, name_method) if options[:default_builder]
         | 
| 31 32 | 
             
                label_text = options[:label] || field.to_s.humanize
         | 
| 32 | 
            -
                content_tag(: | 
| 33 | 
            +
                note       = content_tag(:span, options[:note], :class => 'note') if options[:note]
         | 
| 34 | 
            +
                content_tag(:p, label(field, "#{label_text} #{errors_text(field)}") + note + super(field, collection, value_method, name_method))
         | 
| 33 35 | 
             
              end
         | 
| 34 36 |  | 
| 35 37 | 
             
              def check_box(field, options = {})
         | 
    
        metadata
    CHANGED
    
    | @@ -1,10 +1,15 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification
         | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: generic_form_builder
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 5
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 4
         | 
| 9 | 
            +
              - 5
         | 
| 10 | 
            +
              version: 0.4.5
         | 
| 6 11 | 
             
            platform: ruby
         | 
| 7 | 
            -
            authors:
         | 
| 12 | 
            +
            authors: 
         | 
| 8 13 | 
             
            - Elliot Crosby-McCullough
         | 
| 9 14 | 
             
            - George Brocklehurst
         | 
| 10 15 | 
             
            - Elise Huard
         | 
| @@ -12,40 +17,57 @@ authors: | |
| 12 17 | 
             
            autorequire: 
         | 
| 13 18 | 
             
            bindir: bin
         | 
| 14 19 | 
             
            cert_chain: []
         | 
| 15 | 
            -
             | 
| 20 | 
            +
             | 
| 21 | 
            +
            date: 2012-04-19 00:00:00 +01:00
         | 
| 22 | 
            +
            default_executable: 
         | 
| 16 23 | 
             
            dependencies: []
         | 
| 24 | 
            +
             | 
| 17 25 | 
             
            description: 
         | 
| 18 | 
            -
            email:
         | 
| 26 | 
            +
            email: 
         | 
| 19 27 | 
             
            - elliot.cm@gmail.com
         | 
| 20 28 | 
             
            executables: []
         | 
| 29 | 
            +
             | 
| 21 30 | 
             
            extensions: []
         | 
| 31 | 
            +
             | 
| 22 32 | 
             
            extra_rdoc_files: []
         | 
| 23 | 
            -
             | 
| 33 | 
            +
             | 
| 34 | 
            +
            files: 
         | 
| 24 35 | 
             
            - README.md
         | 
| 25 36 | 
             
            - generic_form_builder.gemspec
         | 
| 26 37 | 
             
            - lib/generic_form_builder.rb
         | 
| 38 | 
            +
            has_rdoc: true
         | 
| 27 39 | 
             
            homepage: http://github.com/elliotcm/generic_form_builder
         | 
| 28 40 | 
             
            licenses: []
         | 
| 41 | 
            +
             | 
| 29 42 | 
             
            post_install_message: 
         | 
| 30 43 | 
             
            rdoc_options: []
         | 
| 31 | 
            -
             | 
| 44 | 
            +
             | 
| 45 | 
            +
            require_paths: 
         | 
| 32 46 | 
             
            - lib
         | 
| 33 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 47 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| 34 48 | 
             
              none: false
         | 
| 35 | 
            -
              requirements:
         | 
| 36 | 
            -
              - -  | 
| 37 | 
            -
                - !ruby/object:Gem::Version
         | 
| 38 | 
            -
                   | 
| 39 | 
            -
             | 
| 49 | 
            +
              requirements: 
         | 
| 50 | 
            +
              - - ">="
         | 
| 51 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 52 | 
            +
                  hash: 3
         | 
| 53 | 
            +
                  segments: 
         | 
| 54 | 
            +
                  - 0
         | 
| 55 | 
            +
                  version: "0"
         | 
| 56 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 40 57 | 
             
              none: false
         | 
| 41 | 
            -
              requirements:
         | 
| 42 | 
            -
              - -  | 
| 43 | 
            -
                - !ruby/object:Gem::Version
         | 
| 44 | 
            -
                   | 
| 58 | 
            +
              requirements: 
         | 
| 59 | 
            +
              - - ">="
         | 
| 60 | 
            +
                - !ruby/object:Gem::Version 
         | 
| 61 | 
            +
                  hash: 3
         | 
| 62 | 
            +
                  segments: 
         | 
| 63 | 
            +
                  - 0
         | 
| 64 | 
            +
                  version: "0"
         | 
| 45 65 | 
             
            requirements: []
         | 
| 66 | 
            +
             | 
| 46 67 | 
             
            rubyforge_project: 
         | 
| 47 | 
            -
            rubygems_version: 1. | 
| 68 | 
            +
            rubygems_version: 1.5.0
         | 
| 48 69 | 
             
            signing_key: 
         | 
| 49 70 | 
             
            specification_version: 3
         | 
| 50 71 | 
             
            summary: Generic Rails 3 form builder
         | 
| 51 72 | 
             
            test_files: []
         | 
| 73 | 
            +
             |