Skip to content

Commit

Permalink
Merge pull request #16 from yammer/issue-15
Browse files Browse the repository at this point in the history
Update readme and Travis file
  • Loading branch information
dwaller authored May 9, 2019
2 parents 06fb196 + 86d167d commit d09660c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
*.so
*.o
*.a
*.gem
mkmf.log
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ language: ruby
install:
- bundle install --without interactive
rvm:
- "2.1.10"
- "2.2.9"
- "2.3.6"
- "2.4.3"
- "2.5.0"
- "jruby-9.1.16.0"
- "2.3.8"
- "2.4.6"
- "2.5.5"
- "2.6.3"
- "jruby-9.1.17.0"
- "jruby-9.2.7.0"
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ Also in favor of ModelAttribute:
[am-dirty]:https://github.com/rails/rails/blob/master/activemodel/lib/active_model/dirty.rb
[source]:https://github.com/yammer/model_attribute/blob/master/lib/model_attribute.rb

## Integrating with Rails

If you're using ModelAttribute in a Rails application, you will probably want to
augment your model with other methods to make it behave more like
`ActiveRecord`. `ActiveModel` provides a very useful set of mixins,
described in the [Rails guide][active-model-guide]. You can also see an example
of the methods we found useful at Yammer described in [this blog
post][yammer-blog-post], with full source in [this Gist][active-record-mimic].

[active-model-guide]:https://guides.rubyonrails.org/active_model_basics.html
[yammer-blog-post]:https://medium.com/yammer-engineering/activerecord-stole-my-data-and-now-i-want-it-back-3041ac4eb163
[active-record-mimic]:https://gist.github.com/dwaller/5474304cfea354a9701d

## Usage

```ruby
Expand Down
2 changes: 1 addition & 1 deletion model_attribute.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.1"
end

0 comments on commit d09660c

Please sign in to comment.