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 href="/users/1" onclick="if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);f.submit(); };return false;">Delete</a> |
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 rel="nofollow" data-method="delete" data-confirm="Are you sure?" class="delete" href="/user/1">Delete</a> |
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
= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" | |
= javascript_include_tag 'rails' |
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
<meta name="csrf-token" content="<%= form_authenticity_token %>" /> | |
<meta name="csrf-param" content="authenticity_token" /> |
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
%meta{:name => 'csrf-token', :content => form_authenticity_token} | |
%meta{:name => 'csrf-param', :content => 'authenticity_token'} |
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 id="event_type" ex:role="facet" ex:expression=".tid" ex:facetLabel="Event Type" ex:collapsible="true"></div> | |
<div id="event_tags" ex:role="facet" ex:expression=".tid_1" ex:facetLabel="Tags" ex:collapsible="true"></div> |
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
<h2><%= users.length %> Users</h2> | |
<ul> | |
<% for(var i=0; i < users.length; i++) { %> | |
<li><a href="<%=users[i].url%>"><%=users[i].name%></a></li> | |
<% } %> | |
</ul> |
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 'formula' | |
class TmuxIterm2 < Formula | |
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120203.tar.gz' | |
md5 '59305a26bdd0245054fe719e6b2a960e' | |
homepage 'http://code.google.com/p/iterm2/downloads/detail?name=tmux-for-iTerm2-20120203.tar.gz&can=2&q=' | |
depends_on 'libevent' | |
def install |
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 'state_machine' | |
# Without state machine | |
regular_class = Class.new | |
regular_class_id = regular_class.object_id | |
regular_class = nil | |
# With state machine | |
machine_class = Class.new | |
machine_class.state_machine(:initial => :parked) do |
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 HM < Module ; end | |
class Machine | |
def initialize(owner_class) | |
@helpers = helpers = { | |
:instance => HM.new, | |
:class => HM.new | |
} | |
owner_class.class_eval do |
OlderNewer