Commit dee10f40 authored by Martin Markech's avatar Martin Markech
Browse files

fix problem, when you edit news item and you change item name and click save &...

fix problem, when you edit news item and you change item name and click save & continue. Item slug has changed, but browser addres no. Fixing by using ID
parent 2ad8dc5e
......@@ -25,7 +25,11 @@ module Refinery
acts_as_indexed :fields => [:title, :body, :teaser]
default_scope order('position DESC, publish_date DESC')
default_scope order('position ASC, publish_date DESC')
def to_param
"#{id}-#{slug}"
end
def not_published? # has the published date not yet arrived?
publish_date > Time.now
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment