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 | |
# | |
# Just save this as .git/hooks/post-checkout in your Rails application | |
# | |
env ARCHFLAGS="-arch x86_64" bundle install | |
touch tmp/restart.txt |
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
class ApplicationController < ActionController::Base | |
... | |
before_filter :save_or_clear_session | |
def save_or_clear_session | |
if controller_name.eql?('sessions') and action_name.eql?('destroy') | |
request.reset_session | |
flash[:notice] = "Signed out successfully." | |
end | |
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
var next_path; | |
var form_stages; | |
var check_a; | |
var check_s; | |
var prev_path; | |
var field_val; | |
;(function($) { | |
var app = new Sammy.Application(function() { | |
with(this) { | |
get('#/stage/:id', function() { with(this) { |
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
//get first part of current url, without hash | |
var base_path = window.location.href.split("#")[0]; | |
var real_id = 0; | |
var current_page; | |
;(function($) { | |
//create new sammy app | |
var app = new Sammy.Application(function() { | |
with(this) { | |
//corresponds to routes like #/slide/1 | |
get('#/slide/:page_id', function() { with(this) { |
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
$(function() { | |
//run the accordion plugin, set height of sections to height of content | |
$("#accordion").accordion({ autoHeight: false }); | |
}); | |
;(function($) { | |
//write new sammy application | |
var app = new Sammy.Application(function() { | |
with(this) { | |
//corresponds to routes such as #/section/1 | |
get('#/section/:section_id', function() { with(this) { |
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
# Helps to organize and structure your tests with | |
# * human readable test names | |
# * flagging tests as pending | |
# * structuring the test implementation with blocks | |
# Please see the documentation of single methods below. | |
# Written by Vladimir Dobriakov | |
# See http://blog.geekq.net/2009/11/25/minimalist-testing-ruby/ for explanation | |
require 'test/unit' | |
class << Test::Unit::TestCase |
NewerOlder