fixed problem with pagination url, it was creating a relative path instead of an absolute path

This commit is contained in:
Jaime Andres 2011-04-19 00:33:54 -05:00
parent 7b30c34a9b
commit 860b206b0a

View File

@ -82,13 +82,13 @@ module Locomotive
previous_link = (if paginate['previous'].blank?
"<span class=\"disabled prev_page\">#{previous_label}</span>"
else
"<a href=\"#{paginate['previous']['url']}\" class=\"prev_page\">#{previous_label}</a>"
"<a href=\"/#{paginate['previous']['url']}\" class=\"prev_page\">#{previous_label}</a>"
end)
links = ""
paginate['parts'].each do |part|
links << (if part['is_link']
"<a href=\"#{part['url']}\">#{part['title']}</a>"
"<a href=\"/#{part['url']}\">#{part['title']}</a>"
elsif part['hellip_break']
"<span class=\"gap\">#{part['title']}</span>"
else
@ -99,7 +99,7 @@ module Locomotive
next_link = (if paginate['next'].blank?
"<span class=\"disabled next_page\">#{next_label}</span>"
else
"<a href=\"#{paginate['next']['url']}\" class=\"next_page\">#{next_label}</a>"
"<a href=\"/#{paginate['next']['url']}\" class=\"next_page\">#{next_label}</a>"
end)
%{<div class="pagination #{options[:css]}">