Created
November 28, 2016 15:56
-
-
Save staycreativedesign/e48b3efa107b3b6ba9f787998f6e6df2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Completed 500 Internal Server Error in 176ms (ActiveRecord: 16.6ms) | |
ActionView::Template::Error (undefined method `area_1' for #<Page::ActiveRecord_Relation:0x007ff61fcbd4d8>): | |
9: .row | |
10: .col-md-12.text-center | |
11: = @main_area.editable_area.html_safe | |
12: = @page.area_1.html_safe | |
13: %section.section-pt.section-no-pa | |
14: - MiddleBox.all.order("position ASC").each_slice(2) do |rows| | |
15: .row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.main-container | |
%section.section-hero-2.slider.height-80{"data-animation" => "slide", "data-arrows" => "true"} | |
.flex-viewport{:style => "overflow: hidden; position: relative;"} | |
%ul.slides{:style => "width: 800%; transition-duration: 0.6s; transform: translate3d(-4995px, 0px, 0px);"} | |
%li.imagebg.clone{"aria-hidden" => "true", "data-overlay" => "3", :style => "width: 1665px; float: left; display: block;"} | |
.background-image-holder | |
= image_tag("#{@main_area.file}") | |
.container.pos-vertical-center | |
.row | |
.col-md-12.text-center | |
= @main_area.editable_area.html_safe | |
= @page.area_1.html_safe | |
%section.section-pt.section-no-pa | |
- MiddleBox.all.order("position ASC").each_slice(2) do |rows| | |
.row | |
- rows.each do |box| | |
.col-sm-6.no-p | |
.hover-element.service-element.hover--active.no-mb.flex-center.text-center | |
.hover-element__initial | |
%h3 | |
= box.header | |
%p | |
= box.description | |
= link_to("#{box.link_text}", "#{box.link}", class: "link-underline") | |
.hover-element__reveal{"data-overlay" => "7"} | |
.background-image-holder | |
= image_tag("#{box.file}") | |
= @page.area_2.html_safe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PagesController < ApplicationController | |
def index | |
@page = Page.where(template: "main") | |
@main_area = MainArea.first | |
end | |
def show | |
@page = Page.friendly.find(params[:id]) | |
@staffs = Staff.all | |
prepare_meta_tags( | |
title: @page.url_link_name, | |
# image: root_url + @blog.image.path, | |
description: @page.meta_description, | |
keywords: @page.meta_keywords, | |
current_url: request.original_url, | |
og: { | |
title: @page.url_link_name, | |
type: "article" | |
} | |
) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_table "pages", force: :cascade do |t| | |
t.string "meta_title" | |
t.string "url_link_name" | |
t.text "meta_description" | |
t.text "meta_keywords" | |
t.text "main_description" | |
t.string "slug" | |
t.text "initial_paragraph" | |
t.text "left_area" | |
t.text "right_area" | |
t.string "image" | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.string "name" | |
t.string "template" | |
t.text "area_1" | |
t.text "area_2" | |
t.text "area_3" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment