simple_search 0.1.0 → 0.1.1
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/VERSION +1 -1
 - data/lib/simple_search/search.rb +3 -3
 - data/simple_search.gemspec +1 -1
 - metadata +2 -2
 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.1. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.1.1
         
     | 
    
        data/lib/simple_search/search.rb
    CHANGED
    
    | 
         @@ -39,7 +39,7 @@ module SimpleSearch 
     | 
|
| 
       39 
39 
     | 
    
         
             
              #
         
     | 
| 
       40 
40 
     | 
    
         
             
              # == Dates/DateTimes
         
     | 
| 
       41 
41 
     | 
    
         
             
              #
         
     | 
| 
       42 
     | 
    
         
            -
              # * +gipe+ - Supplied value  
     | 
| 
      
 42 
     | 
    
         
            +
              # * +gipe+ - Supplied value can be a String, Date or DateTime. This method will always search on
         
     | 
| 
       43 
43 
     | 
    
         
             
              #   a range against a datetime column.
         
     | 
| 
       44 
44 
     | 
    
         
             
              #   
         
     | 
| 
       45 
45 
     | 
    
         
             
              #   If a string, it will be parsed to a Date or DateTime, depending on the type of column it is
         
     | 
| 
         @@ -54,7 +54,7 @@ module SimpleSearch 
     | 
|
| 
       54 
54 
     | 
    
         
             
              #
         
     | 
| 
       55 
55 
     | 
    
         
             
              # == Associations
         
     | 
| 
       56 
56 
     | 
    
         
             
              #
         
     | 
| 
       57 
     | 
    
         
            -
              # When you pass a list of associations to SimpleSearch::Search#new (in the  
     | 
| 
      
 57 
     | 
    
         
            +
              # When you pass a list of associations to SimpleSearch::Search#new (in the <tt>:search_associations</tt>
         
     | 
| 
       58 
58 
     | 
    
         
             
              # option) SimpleSearch will add methods for that association as well. These work as you might expect,
         
     | 
| 
       59 
59 
     | 
    
         
             
              # so a <tt>:search_association => [:manufacturer, :owner, :users]</tt> on a model that +belongs_to+ a
         
     | 
| 
       60 
60 
     | 
    
         
             
              # manufacturer and owner, and +has_many+ users will gain methods like users_first_name_starts_with and
         
     | 
| 
         @@ -110,7 +110,7 @@ module SimpleSearch 
     | 
|
| 
       110 
110 
     | 
    
         
             
                end
         
     | 
| 
       111 
111 
     | 
    
         | 
| 
       112 
112 
     | 
    
         
             
                # Runs the current search against the database, returning all results, or paginated
         
     | 
| 
       113 
     | 
    
         
            -
                # results, depending on whether a  
     | 
| 
      
 113 
     | 
    
         
            +
                # results, depending on whether a <tt>:page</tt> parameter has been received (and, of course,
         
     | 
| 
       114 
114 
     | 
    
         
             
                # whether your model responds to paginate). All other options are passed through to the
         
     | 
| 
       115 
115 
     | 
    
         
             
                # paginate/find call.
         
     | 
| 
       116 
116 
     | 
    
         
             
                def search(args = {})
         
     | 
    
        data/simple_search.gemspec
    CHANGED