Skip to content

Commit

Permalink
Remove deprecation message from route_for_model method.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugisozols committed May 14, 2012
1 parent bd870f4 commit 1ef9ff7
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions core/lib/refinery/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,6 @@ def version
# Refinery.route_for_model(Refinery::Blog::Post, {:plural => true}) => "blog_admin_posts_path"
# Refinery.route_for_model(Refinery::Blog::Post, {:admin => false}) => "blog_post_path"
def route_for_model(klass, options = {})
if [TrueClass, FalseClass].include? options.class
options = {:plural => options}
Refinery.deprecate "[Refinery.route_for_model] 'plural' argument",
:when => '2.1',
:replacement => '{:plural => false}'
end

options = {:plural => false, :admin => true}.merge options

klass = klass.constantize if klass.respond_to?(:constantize)
Expand Down

0 comments on commit 1ef9ff7

Please sign in to comment.