51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/contentable.rb', line 51
def safe_find_by_name(name)
found_by_name = find_by_title(name)
if found_by_name
return found_by_name
else
content_missing = find_or_create_by_name(:name => "content_missing", :title => "Content Missing", :description => "This is the display page returned when there is no content found that matches a particular name.", :text => "This content has yet to be created.")
content_missing.missing = name
return content_missing
end
end
|