Skip to content

Instantly share code, notes, and snippets.


Harlow Ward harlow

View GitHub Profile
alexbaldwin / gist:5548993
Created May 9, 2013
Middleman Blog Twitter card integration
View gist:5548993
<% if current_article %>
<title><%= "#{current_article.title}" %></title>
<meta name="twitter:card" content="summary">
<meta property="twitter:creator" content="@alexbaldwin">
<meta name="twitter:title" content="<%= truncate(current_article.title, length: 70) %>">
<meta name="twitter:image" content="<%= "#{}" %>">
<meta name="twitter:description" content="<%= truncate(strip_tags(current_article.summary), length: 200) %>">
<meta name="twitter:domain" content="<%= "{current_article.url}" %>">
<% else %>
dhh / gist:1014971
Created Jun 8, 2011
Use concerns to keep your models manageable
View gist:1014971
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
You can’t perform that action at this time.