Skip to content

Commit

Permalink
Remove deprecated method
Browse files Browse the repository at this point in the history
It's been 4 years since it was deprecated :)
  • Loading branch information
carlosantoniodasilva committed Jan 3, 2015
1 parent 47736b3 commit dceb61a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
## Unreleased

### enhancements
* Remove deprecated `:method` in favor of `:using`.
* Improve support to Rails 4.x associations with more duck typing instead of Array checks.
* Support Rails 4.1 and Ruby 2.1.1.
* Add `skip_blanks` configuration option to skip generating blank attributes
Expand Down
6 changes: 0 additions & 6 deletions lib/show_for/association.rb
Expand Up @@ -39,12 +39,6 @@ def association(association_name, options={}, &block)

def values_from_association(association, options) #:nodoc:
sample = association.respond_to?(:to_ary) ? association.first : association

if options[:method]
options[:using] = options.delete(:method)
ActiveSupport::Deprecation.warn ":method is deprecated. Please use :using instead", caller
end

method = options.delete(:using) || ShowFor.association_methods.find { |m| sample.respond_to?(m) }

if method
Expand Down

0 comments on commit dceb61a

Please sign in to comment.