This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
title |
---|
Layouts & Partials |
Layouts allow the common HTML surrounding individual pages to be shared across all your templates. The most basic layout has some shared content and a yield
call where templates will place their contents. Furthermore, With wrap_layout
, content_for
and partial
you can build a complex layout inheritance, reduce the duplication of you code in templates to a minimal amount.
Domain model is an effective tool for software development. It can be used to express really complex business logic, and to verify and validate the understanding of the domain among stakeholders. Building rich domain models in Rails is hard. Primarily, because of Active Record, which doesn't play well with the domain model approach.
One way to deal with this problem is to use an ORM implementing the data mapper pattern. Unfortunately, there is no production ready ORM doing that for Ruby. DataMapper 2 is going to be the first one.
Another way is to use Active Record just as a persistence mechanism and build a rich domain model on top of it. That's what I'm going to talk about in this article.
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
# Karma configuration | |
# Generated on Tue Aug 20 2013 16:26:25 GMT-0400 (EDT) | |
module.exports = (config) -> | |
config.set | |
# base path, that will be used to resolve all patterns, eg. files, exclude | |
basePath: '..' | |
# frameworks to use |
{ | |
"app/adapters/*.js": { | |
"command": "adapter", | |
"template": [ | |
"// export default DS.{capitalize}Adapter.extend();", | |
] | |
}, | |
"app/components/*.js": { | |
"command": "component", |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |