Skip to content

Commit

Permalink
CDC #27 - Updating README.md with basic instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Apr 18, 2024
1 parent ece374b commit d6e7789
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FuzzyDates
Short description and motivation.
Fuzzy Dates is designed to store date values within a specified amount of accuracy. Each date is stored as a range and a descriptor, so that programmatic operations can still be performed, while providing a user-friendly label.

## Installation
Add this line to your application's Gemfile:
Expand All @@ -19,7 +19,21 @@ $ gem install fuzzy_dates
```

## Usage
How to use my plugin.

```ruby
class MyModel < ApplicationRecord
include FuzzyDates::FuzzyDateable

has_fuzzy_dates :start_date, :end_date
end
```

```ruby
class MyModelsSerializer < BaseSerializer
index_attributes :id, :name, start_date: FuzzyDates::FuzzyDateSerializer, end_date: FuzzyDates::FuzzyDateSerializer
show_attributes :id, :name, start_date: FuzzyDates::FuzzyDateSerializer, end_date: FuzzyDates::FuzzyDateSerializer
end
```

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

0 comments on commit d6e7789

Please sign in to comment.