refinerycms 0.9.2 → 0.9.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -57,7 +57,8 @@ class Page < ActiveRecord::Base
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.top_level(include_children = false)
|
60
|
-
include_associations = [:parts
|
60
|
+
include_associations = [:parts]
|
61
|
+
include_associations.push(:slugs) if self.class.methods.include? "find_one_with_friendly"
|
61
62
|
include_associations.push(:children) if include_children
|
62
63
|
find_all_by_parent_id(nil, :order => "position ASC", :include => include_associations)
|
63
64
|
end
|
@@ -16,7 +16,7 @@ module Refinery
|
|
16
16
|
ActiveRecord::Base.class_eval do
|
17
17
|
def self.has_friendly_id(column, options = {}, &block)
|
18
18
|
end
|
19
|
-
end unless ActiveRecord::Base.
|
19
|
+
end unless ActiveRecord::Base.methods.include? 'has_friendly_id'
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|