belongs_to :${1:category}$0
has_one :${1:article}$0
has_many :${1:comments}$0
has_and_belongs_to_many :${1:roles}$0
:conditions => ${1:rails conditions string or array}
validates_acceptance_of :${1:attribute}$0
validates_associated :${1:attribute}$0
validates_confirmation_of :${1:attribute}$0
validates_each :${1:attribute} do |record, attr, value| record.errors.add attr, "${2:message}" if $0 end
validates_exclusion_of :${1:attribute}, :in => $0
validates_format_of :${1:attribute}, :with$0
validates_inclusion_of :${1:attribute}, :in$0
validates_length_of :${1:attribute}, :${2:maximum, minimum, is or within}
validates_numericality_of :${1:attribute}$0
validates_presence_of :${1:attribute}$0
:on => :${1:default is save, other options are create or update}$0
:if => Proc.new {|instance| ${1:some code that checks your instance}$0
:if => :${1:method_name}
:allow_blank => ${1:false}
:allow_nil => ${1:false}$0
:message => "${1:message}"$0
:too_long => "${1:value is too long (maximum is %d characters)}"$0
:too_short => "${1:value is too short (minimum is %d characters)}"$0
:wrong_length => "${1:value has wrong length (should be %d characters)}"$0
:accept => "${1:1}"$0
:with => /^${1:regexp}\$/$0
:in => $0
:is => ${1:12}
:maximum => ${1:12}
:minimum => ${1:12}
:within => (${1:12}..${2:15})$0
:only_integer => ${1:true}$0
:greater_than => ${1:5}$0
:greater_than_or_equal_to => ${1:5}$0
:equal_to => ${1:5}$0
:less_than => ${1:5}$0
:less_than_or_equal_to => ${1:5}$0
:odd => true
:even => true
before_filter :${1:method_name}$0
:only => [:${1:create, }
:confirm => '${1:Are you sure?}'$0
:controller => :${1:posts}, :action => :${2:show}, :id => ${3:post}
<%= image_tag '$1' %>$0
<%= image_tag '$2', :title => "$1" %>$0
<%= javascript_include_tag ${1:defaults} %>$0
<%= stylesheet_link_tag '${1:style}' %>$0
<%= link_to '$1', $0 %>
<%= link_to_remote '$1', :url => { $2 }$3 %>$0
<%= render :partial => '${1:item}'$0 %>
<% form_tag $1do %> $0 <% end %>
<% form_tag $2, :method => ${1:post} do %> $0 <% end %>
<label>$0</label>
<label for="$1">$0</label>
<%= error_messages_for( :$1 ) %>$0
<%= password_field :${1:model}, :${2:attribute} %>$0
<%= submit_tag '${1:save}' %>$0
<%= text_field :${1:model}, :${2:attribute} %>$0
<%= hidden_field :${1:model}, :${2:attribute} %>$0
<%= check_box :${1:model}, :${2:attribute} %>$0
<%= select :${1:model}, :${2:attribute}, ${3:values}, {:include_blank => true} %>$0
<${1:div}> $0 </${1}
<div class="$1"> $0 </div>
<div id="$1"> $0 </div>
<br/>
$0
<table class="$1"> <tr> <th>$0</th> </tr> </table>
<td>$0</td>
<tr> $0 </tr>
<tr class="<%= cycle( 'odd', 'even' ) %>"> $0 </tr>
<ul class="${1:list}"> $0 </ul>
<ul> $0 </ul>
<li>$1</li>$0
<%= $0 %>
<% $0 -%>
do $0 end
do |${1:object}| $0 end
<% ${1:@list}.each do |${2:item}| do %> $0 <% end %>
<%= for ${1:element} in ${2:collection}
${1:element}.$0
end %>
<% if ${1:logged_in?} %> $0 <% end %>
<% if ${1:logged_in?} %> $0 <% else %> <% end %>
<% end %>
begin $1 rescue ${2:Exception} => ${3:e} $0 end
class ${1:class_name} $0 end
def ${1:method_name} $0 end
# # ${2:comment} # def ${1:method_name} $0 end
def self.${1:method_name} $0 end
def ${1:method_name} $0 rescue ${2:ErrorClass }=> err end
do $0 end
do |${1:object}| $0 end
if ${1:condition} $2 else $3 end
if ${1:condition} $0 end
elsif ${1:condition} $0
unless ${1:condition} $0 end
case ${1:object} when ${2:condition} $0 end
when ${1:condition} $0
else $0
:${1:key} => ${2:"value"}$0
=>
collect { |${1:element}| ${1:element}.$0 }
collect do |${1:element}| ${1:element}.$0 end
each { |${1:element}| ${1:element}.$0 }
each do |${1:element}| ${1:element}.$0 end
each_with_index { |${1:element}, ${2:idx}| ${1:element}.$0 }
each_with_index do |${1:element}, ${2:idx}| ${1:element}.$0 end
for ${1:element} in ${2:collection} ${1:element}.$0 end
inject(${1:object}) { |${2:injection}, ${3:element}| $0 }
inject(${1:object}) do |${2:injection}, ${3:element}| $0 end
reject { |${1:element}| ${1:element}.$0 }
reject do |${1:element}| ${1:element}.$0 end
select { |${1:element}| ${1:element}.$0 }
select do |${1:element}| ${1:element}.$0 end
find_all { |${1:element}| ${1:element}.$0 }
find_all do |${1:element}| ${1:element}.$0 end
any? { |${1:element}| ${1:element}.$0 }
any? do |${1:element}| ${1:element}.$0 end
all? { |${1:element}| ${1:element}.$0 }
all? do |${1:element}| ${1:element}.$0 end
map { |${1:element}| ${1:element}.$0 }
map do |${1:element}| ${1:element}.$0 end
should_assign_to ${1:attribute}$0
should_filter_params ${1:attribute}$0
should_not_assign_to ${1:attribute}$0
should_not_set_the_flash$0
should_redirect_to('${1:description}') { $0 }
should_render_template ${1:template}$0
should_render_with_layout ${1:layout}$0
should_render_without_layout ${1:layout}$0
should_respond_with ${1:status}$0
should_respond_with_content_type ${1:content_type_or_regexp}$0
should_route :${1:get}, "${$2:path}", $0
should_set_session('${1:key}') { $0 }
should_set_the_flash_to ${1:string_or_regexp}$0
should_allow_mass_assignment_of :${1:attributes}$0
should_not_allow_mass_assignment_of :${1:attributes}$0
should_have_class_methods :${1:attributes}$0
should_have_instance_methods :${1:attributes}$0
should_have_db_columns :${1:attributes}$0
should_have_index :${1:attributes}$0
should_have_named_scope :${1:scope_call}, $0
should_have_readonly_methods :${1:attributes}$0
should_belong_to :${1:associations}$0
should_have_many :${1:associations}$0
should_have_one :${1:associations}$0
should_have_and_belong_to_many :${1:associations}$0
should_allow_values_for :${1:attribute}, ${2:values}$0
should_not_allow_values_for :${1:attribute}, ${2:values}$0
should_ensure_length_at_least :${1:attribute}, ${2:minimum_length}$0
should_ensure_length_in_range :${1:attribute}, (${2:minimum_length}..${3:maximum_length})$0
should_ensure_length_is :${1:attribute}, ${2:length}$0
should_ensure_value_in_range :${1:attribute}, (${2:minimum_length}..${3:maximum_length})$0
should_validate_acceptance_of :${1:attributes}$0
should_validate_numericality_of :${1:attributes}$0
should_validate_presence_of :${1:attributes}$0
should_validate_uniqueness_of :${1:attributes}, :scoped_to => ${2:field to scope uniq check}$0
context "${1:Name}" do $0 end
setup do $0 end
<snippet> <text><![CDATA[$1]]></text> <tag>$2</tag> <description>$3</description> </snippet>$0
<?xml version='1.0' encoding='utf-8'?> <snippets language="${1:ruby}"> $0 </snippets>
<!-- $1 -->$0
<!--
$1
-->$0