gem install rails
rails new my_app -T
# 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 |
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 " % [ |
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 |
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: |
~$ rvm list | |
rvm rubies | |
=> ruby-1.9.2-rc1 [ x86_64 ] | |
~$ rvm list gemsets | |
rvm gemsets |
= conversation | |
Conversation is a Ruby gem that gives your Rails 3 application messaging and commenting features. | |
Messages and comments can be configured to be either threaded or unthreaded. Any number of models | |
can be messageable, commentable, or both. You make a model messageable like this | |
class User < ActiveRecord::Base | |
messageable | |
end |
module Slugify | |
def slugify(string) | |
# Strip the string | |
ret = string.strip | |
# Blow away apostrophes | |
ret.gsub! /['`]/,"" |
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | |
# It is recommended to regenerate this file in the future when you upgrade to a | |
# newer version of cucumber-rails. Consider adding your own code to a new file | |
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | |
# files. | |
require 'uri' | |
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) |