This file contains 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
# config/environments/production.rb: | |
config.action_controller.asset_host = "http://cdn%d.example.com" | |
# config/initializers/refinery/images.rb: | |
config.dragonfly_url_format = "/images/:job/:basename.:ext" | |
if Rails.env.production? | |
config.dragonfly_url_host = "http://cdn4.example.com" | |
end | |
# config/initializers/refinery/resources.rb: |
This file contains 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
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
# Bundler.require *Rails.groups(:assets => %w(development test)) | |
# If you want your assets lazily compiled in production, use this line | |
Bundler.require(:default, :assets, Rails.env) | |
end |
This file contains 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
# `ERROR: Error installing nokogiri: | |
# ERROR: Failed to build gem native extension. | |
# | |
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri | |
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries | |
# checking if the C compiler accepts ... yes | |
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no | |
# Building nokogiri using system libraries. | |
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed. | |
# *** extconf.rb failed *** |
This file contains 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
# src/pages/base_page.cr | |
abstract class BasePage | |
include LuckyWeb::HTMLPage | |
def render | |
html lang: "en" do | |
head do | |
utf8_charset | |
title page_title | |
css_link asset("css/app.css") |
This file contains 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
h2. Additional Menus | |
This guide will show you how to: | |
* configure and use +Refinery::Pages::MenuPresenter+ | |
* use a decorator to add custom functionality to +Refinery::Page+ class | |
* override Refinery's view | |
endprologue. | |
h3. Requirements |
This file contains 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
# app/decorators/controllers/refinery/blog/posts_controller_decorator.rb | |
Refinery::Blog::PostsController.class_eval do | |
layout "my_custom_layout" | |
end |
This file contains 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
App.Entry = DS.Model.extend({ | |
title: DS.attr("string"), | |
content: DS.attr("string") | |
}); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script> | |
<script src="http://builds.emberjs.com.s3.amazonaws.com/tags/v1.0.0/ember.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> |
This file contains 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
require "rspec" | |
class Grid | |
attr_reader :cells, :ships | |
SIZE = 10 | |
def initialize | |
@cells = SIZE.times.map { [nil] * SIZE } | |
@ships = [] |
This file contains 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
require "rspec" | |
class Grid | |
attr_reader :cells, :ships | |
SIZE = 10 | |
def initialize | |
@cells = SIZE.times.map { [nil] * SIZE } | |
@ships = [] |
NewerOlder