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
#models/my_thing.rb | |
class MyThing < ActiveRecord::Base | |
belongs_to :user | |
acts_as_activity :user | |
end | |
#views/activities/_unhandled_item.html.haml | |
- case activity.item_type | |
- when 'MyThing' | |
="created a MyThing: #{link_to(activity.item.name, user_my_thing_path(activity.item.user, activity.item))}" |
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
# getting nil.merge errors in production when overriding a controller in CE? | |
AppConfig ||= OpenStruct.new | |
AppConfig.default_mce_options = { | |
:theme => 'advanced', | |
:browsers => %w{msie gecko safari}, | |
:theme_advanced_layout_manager => "SimpleLayout", | |
:theme_advanced_statusbar_location => "bottom", | |
:theme_advanced_toolbar_location => "top", | |
:theme_advanced_toolbar_align => "left", |
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
desc "Deploy to Heroku" | |
task :deploy_heroku do | |
app = 'myappname' | |
temp_path = "/tmp/heroku-deploys/#{app}" | |
deploy_path = "~/heroku-deploys/#{app}" | |
system "mkdir -p #{temp_path}" | |
system "rm -rf #{temp_path}/*" | |
system "tar -C . -cf - . | tar -C #{temp_path}/ -xpf -" | |
system "cd #{temp_path} && find . -regex '.*git.*' -exec rm -rf {} \\;" |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
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
#!/bin/sh -e | |
APP_NAME=$1 | |
PIPELINE_APP_NAME=$APP_NAME-slug | |
HEROKU_APP_REMOTE=git@heroku.com:$APP_NAME.git | |
HEROKU_PIPELINE_REMOTE=git@heroku.com:$PIPELINE_APP_NAME.git | |
WORKERS_COUNT=$(heroku ps --app $APP_NAME | grep "^worker." | wc -l | tr -d ' ') | |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
LOCAL_DEPLOY_START=`date +%s` |
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
<a class="rcptr" href="http://www.rafflecopter.com/rafl/display/2faae1235/" rel="nofollow" data-raflid="2faae1235" data-theme="classic" data-template="" id="rcwidget_953v93k7">a Rafflecopter giveaway</a> | |
<script src="//widget-prime.rafflecopter.com/launch.js"></script> |
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 rangy | |
#= require rangy/rangy-selectionsaverestore | |
#= require jquery.debounce | |
#= require jquery-observe/jquery-observe | |
#= require medium/undo | |
class @UndoManager | |
defaults = { | |
debounceRate: 100 | |
} |
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
<div style="margin: 10px 0; max-width: 550px;"><a data-width="100%" data-height="auto" id="ld-8508-352" href="http://lockerdome.com/7756894043381057/7808653298244634">Adobe Photoshop Elements 13 Giveaway</a><span id="ld-8508-352-equiv"> in <a href="http://lockerdome.com/7756894043381057">ManMade Polls & Giveaways</a> on <a href="http://lockerdome.com">LockerDome</a></span><script>(function(d,s,id,elid) {window.ldInit = window.ldInit || []; ldInit.push(elid);if (d.getElementById(id)) return;var js, fjs = d.getElementsByTagName(s)[0];js=d.createElement(s); js.id=id;js.async=true;js.src="//cdn2.lockerdome.com/_js/embed.js";fjs.parentNode.insertBefore(js,fjs);}(document, "script", "lockerdome-wjs", "ld-8508-352"));</script></div> |
OlderNewer