0.0
No commit activity in last 3 years
No release in over 3 years
This "acts_as" extension provides the capabilities for beautiful record finding by specified column(s).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

ActsAsFinder

This acts_as extension provides the capabilities for beautiful record finding by specified column(s).

Installation

Add this line to your application's Gemfile:

gem 'acts_as_finder'

And then execute:

$ bundle

Or install it yourself as:

$ gem install acts_as_finder

Example Usage

Assume you have following model:

class Language < ActiveRecord::Base
  acts_as_finder :short_name, :name
end

And records in database:

+----+------------+---------+
| id | short_name | name    |
+----+------------+---------+
| 1  | EN         | English |
| 2  | PL         | Polish  |
+----+------------+---------+

Now you can use this extension like this:

>> Language.EN
=> #<Language id: 1, short_name: "EN", name: "English"> 

>> Language.Polish
=> #<Language id: 2, short_name: "PL", name: "Polish">

Build Status

Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request