Fixed Item#parent_name again
This commit is contained in:
1 parent
93169b1098
commit
496d73487b
4 files changed
+8
-8
No files matched your search
@@ -32,7 +32,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def find_parent_item
|
||||
@parent_item = Item.find_by_name(params[:parent_name])
|
||||
@parent_item = Item.find_by_name(params[:parent_name] || 'root')
|
||||
unless @parent_item
|
||||
@parent_item = Page.create( :name => "root", :title => "root", :layout_name => "root" )
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user