Skip to content

Instantly share code, notes, and snippets.

View gavinhughes's full-sized avatar

Gavin Hughes gavinhughes

View GitHub Profile
/* Beautiful cross-browser CSS buttons
Source: http://technology.posterous.com/make-css3-buttons-that-are-extremely-fancy
Example ussage:
<div class="fancy_button">
<a href="#">
<span style="background-color: #070;">Post</span>
</a>
</div>
~$ rvm list
rvm rubies
=> ruby-1.9.2-rc1 [ x86_64 ]
~$ rvm list gemsets
rvm gemsets
Gavin@Gavin gb (master)$ rvm 1.8.7 ; rvm info
rvm 0.1.14 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]
system:
uname: "Darwin Gavin.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386"
shell: "bash"
version: "3.2.48(1)-release"
ruby:
Gavin@Gavin blog$ cat /Users/Gavin/.rvm/log/ruby-1.8.7-p249/make*.log
[2010-02-07 06:56:18] make
eval.c: In function 'rb_eval_string_wrap':
eval.c:1744: warning: assignment discards qualifiers from pointer target type
eval.c: In function 'rb_eval_cmd':
eval.c:1885: warning: assignment discards qualifiers from pointer target type
eval.c: In function 'call_trace_func':
eval.c:2736: warning: assignment discards qualifiers from pointer target type
eval.c: In function 'rb_raise_jump':
eval.c:4770: warning: assignment discards qualifiers from pointer target type
module ActiveRecord
module Associations # :nodoc:
module ClassMethods # :nodoc:
class JoinDependency # :nodoc:
class JoinAssociation < JoinBase # :nodoc:
def association_join
connection = reflection.active_record.connection
join = case reflection.macro
when :has_and_belongs_to_many
" #{join_type} %s ON %s.%s = %s.%s " % [
# Add js functions to the page on document.ready. Arguments as strings.
# Ex: <% ready("hideDiv('div1');", "toggleFields();)")
#
def ready(*functions)
content = functions.each{ |fx| fx << ';' }.join(' ')
content_for(:head, javascript_tag("$(function() { #{content} });"))
end