improvements on how to get self link on pagination class

This commit is contained in:
Bruno Bacarini 2015-08-19 11:16:53 -03:00
parent f85027e631
commit 3c3578a9b8

View File

@ -41,8 +41,7 @@ module ActiveModel
end
def url(options)
self_link = options.fetch(:links) {{}}
self_link.fetch(:self) {} ? options[:links][:self] : original_url
@url ||= options.fetch(:links, {}).fetch(:self, nil) || original_url
end
def original_url