Add rake dev:build for pages
This commit is contained in:
1 parent
32e8bd108f
commit
aab1199aee
15 files changed
+103
-11
No files matched your search
@@ -11,13 +11,7 @@ class PagesController < ApplicationController
|
||||
|
||||
def show
|
||||
@page = Page.find_by_name(params[:page_name])
|
||||
|
||||
if @page && !@page.external_link.blank?
|
||||
redirect_to @page.external_link
|
||||
else
|
||||
render_liquid_page
|
||||
end
|
||||
|
||||
render_liquid_page
|
||||
end
|
||||
|
||||
end
|
||||
+1
-1
@@ -7,7 +7,7 @@ class Item
|
||||
key :name, String, :required => true, :index => true
|
||||
|
||||
key :parent_name, String, :index => true
|
||||
key :parent_id, String, :index => true
|
||||
key :parent_id, String, :index => true
|
||||
|
||||
key_i18n :title, String, :required => true
|
||||
|
||||
|
||||
@@ -4,7 +4,16 @@ class Snippet
|
||||
|
||||
key :name, String, :required => true, :index => true
|
||||
key :parent_name, String, :required => true, :index => true
|
||||
key :parent_id, String, :required => true, :index => true
|
||||
|
||||
key_i18n :content, String
|
||||
|
||||
before_validation :setup_default_value
|
||||
|
||||
protected
|
||||
|
||||
def setup_default_value
|
||||
self.parent_id = Item.find_by_name( self.parent_name ).id
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user