This file contains hidden or 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() { | |
$('#summaries tr').live('click', clearDetail).live('click', selectRow); | |
$('form#search').submit(clearSummaries); | |
function clearDetail(e) { | |
$('#detail').empty(); | |
} | |
function clearSummaries(e) { |
This file contains hidden or 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
Scenario: Filter by controller | |
Given I am on the initial page | |
When I filter results for the "users" controller | |
Then all entries in the summary list should be for the "users" controller |
This file contains hidden or 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
def choose_last_radio_in_selector(selector) | |
within(selector) do | |
choose field_by_xpath('.//input[@type="radio"][last()]') | |
end | |
end |
This file contains hidden or 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 Tracker | |
include HTTParty | |
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
base_uri 'www.pivotaltracker.com' | |
def self.projects | |
api_get 'projects' | |
end |
This file contains hidden or 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
run 'rm public/index.html' | |
run 'rm public/javascripts/*' | |
run 'mkdir public/vendor' | |
run 'haml --rails .' | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'Initial commit'" |
This file contains hidden or 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
ajaxLink: function() { | |
return this.click(function() { | |
$.getScript(this.href); | |
return false; | |
}); | |
}, |
This file contains hidden or 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($) { | |
$.fn.extend({ | |
jaxy: function() { | |
return this.each(function() { | |
if (/^a$/i.test(this.tagName)) $(this).ajaxLink(); | |
if (/^form$/i.test(this.tagName)) $(this).ajaxForm({dataType: 'script'}); | |
}); | |
}, |
This file contains hidden or 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
" posting a snippet to Gist http://gist.github.com | |
:nmap ,g :Gist |
This file contains hidden or 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
submitClick: function() { | |
return this.click(function() { | |
var el = $(this); | |
if (el.attr('target')) { | |
el.findTarget().submit(); | |
} else { | |
el.parents('form:first').submit(); | |
} |
This file contains hidden or 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
jaxy: function() { | |
return this.each(function() { | |
if (/^a$/i.test(this.tagName)) $(this).ajaxLink(); | |
if (/^form$/i.test(this.tagName)) $(this).ajaxForm({dataType: 'script'}); | |
}); | |
}, |