Eruby Eruby-Rails Ruby
Total Page:16
File Type:pdf, Size:1020Kb
ERUBY ifie - <!--[if IE ${1:6}]>${2}<![endif] if - <% if ${1:condition} %> img - <img src ife - <% if ${1} %> input - <input type unless - <% unless ${1} %> inputl - <label for= unlesse - <% if ${1} %> label - <label for link - <link rel= ERUBY-RAILS mailto - <a href="mailto: conf - <% content_for : meta - <meta name= cs - <%= collection_select option - <option ct - <%= content_tag select - <select name="${1}" id="${2}"> end - <% end -%> style - <style type="text/css" ff - <% form_for table/basic - <table class="${1}"> ffcb - <%= .check_box table/hardcore - <table<+ width="<+100%+>" border="<+0+>" ffe - <% error_messages_for cellspacing="<+0+>" cellpadding="<+5+>"<++>+>> ffff - <%= .file_field textarea - <textarea ffhf - <%= .hidden_field ffl - <%= .label RUBY ffpf - <%= .password_field am - alias_method ffrb - <%= .radio_button bm - Benchmark ffs - <%= .submit case - case ${1} ffta - <%= .text_area class - class fftf - <%= .text_field classe - class ${1:ErrorClassName} fields - <% fields_for def - def ${1:name} for - <% for defi - def initialize${1} ft - <% form_tag defmm - def method_missing(meth, *args, &blk) i18 - I18n.t('${1:type.key}')${2} defs - def self.${1:class_method_name} it - <%= image_tag deft - def test_${1:case_name} jit - <%= javascript_include_tag detect - detect { |${1:element}| ${2:body} } jsit - <%= javascript_include_tag detecto - detect do |${1:element}| lia - <%= link_to :action %> dglob - Dir.glob(${1:"<+dir}"+>) liai - <%= link_to :action :id do - do lic - <%= link_to :controller dop - do |${1:param}| lica - <%= link_to :controller :action ea - each { |${1:element}| ${2:body} } licai - <%= link_to :controller :action :id each - each { |${1:element}| ${2:body} } lim - <%= link_to <+model+> each_with_index – each_with_index { lt - <%= link_to each_with_indexo – each_with_index do ofcfs - options_from_collection_for_select eacho - each do |${1:element}| rf - <%= render :file eado - each do |${1:element}| rp - <%= render :partial eawi - each_with_index { rt - <%= render :template eawido - each_with_index do slt - <%= stylesheet_link_tag elsif - elsif ${1:condition} sslt - <%= stylesheet_link_tag fileeach - File.foreach st - <%= submit_tag "<+Save fopen - File.open fread - File.read(${1}) HTML http_get - require 'net/http' base - <base href http_post - require 'net/http' body - <body id if - if ${1:condition} doctype - <!DOCTYPE ife - if else form - <form inj - inject { h1 - <h1 injdo - inject do |${2:total}, ${3:next}| head - <head> inject - inject { href - <a href= injecto - inject do ip - ip_addr = request.env['REMOTE_ADDR'] loge - logger.error map - map { |${1:element}| ${2:body} } logf - logger.fatal mapdo - map do |${1:element}| logi - logger.info mapo - map do |${1:element}| logw - logger.warn mod - module mac - add_column module - module mapc - ${1:map}.${2:connect} nam - namespace :${1:namespace} do mapca - ${1:map}.catch_all ope - open mapr - ${1:map}.resource pathhere - File.join(File.dirname maprs - ${1:map}.resources r - attr_reader :${1:attr_names} mapwo - ${1:map}.with_options : reject - reject { mbs - before_save rejecto - reject do mcc - change_column rw - attr_accessor mccc - t.column select - select { mcht - change_table selecto - select do mcol - remove_column sinc - class << self; self end mct - create_table sort - sort { migration - class sorto - sort do mp - map(&:${1:id}) tas - desc "${1:Task description}" mrc - remove_column task - desc "${1:Task description}" mrmc - remove_column tc - require "test/unit" mrnc - rename_column unless - unless ${1:condition} mrw - mattr_accessor unlesse - unless ${1:condition} nc - named_scope w - attr_writer ncl - named_scope while - while pa - params xmlr - REXML::Document.new ra - render :action zip - zip(${1:enums}) { ral - render :action :layout RUBY-RAILS rest - respond_to do |wants| bf - before_filter :${1:method} rf - render :file bt - belongs_to :${1:association} rfu - render :file :use_full_path crw - cattr_accessor :${1:attr_names} ri - render :inline defcreate - def create ril - render :inline :locals defdestroy - def destroy rit - render :inline :type defedit - def edit rjson - render :json defindex - def index rl - render :layout defnew - def new rn - render :nothing defshow - def show rns - render :nothing :status defupdate - def update rp - render :partial fina - find(:all rpc - render :partial :collection finf - find(:first rpl - render :partial :locals fini - find(<+id+>) rpo - render :partial :object finl - find(:last rps - render :partial :status flash - flash rt - render :text habtm - has_and_belongs_to_many rtl - render :text :layout hm - has_many rtlt - render :text :layout => ${2:true} hmd - has_many rts - render :text :status hmt - has_many :through ru - render :update ho - has_one rxml - render :xml ist - image_submit_tag sha1 - Digest::SHA1.hexdigest(${1:string}) log - RAILS_DEFAULT_LOGGER.${1:debug} ${2} sweeper - class ${1}Sweeper logd - logger.debug tcb - t.boolean tcbi - t.binary it - it '${1}' do tcd - t.decimal its - it "should tcda - t.date mat - class ${1:ReverseTo} tcdt - t.datetime mm - mock_model tcf - t.float moc - mock tch - t.change on - once tci - t.integer resh - require spec_helper tcl - t.integer sef - shared_examples_for tcr - t.references sh - .should tcs - t.string shb - .should be tct - t.text shbc - .should be_close tcti - t.time shbio - .should be_instance_of tcts - t.timestamp shbko - .should be_a_kind_of tctss - t.timestamps shbr - .should be_redirect trc - t.remove shbs - .should be_success tre - t.rename shdm - .should match tref - t.references she - .should eql va - validates_associated sheq - .should equal vao - validates_acceptance_of shh - .should have().things vc - validates_confirmation_of shhal - .should have_at_least().things ve - validates_exclusion_of shham - .should have_at_most().things vf - validates_format_of shhr - .should have().records vi - validates_inclusion_of shn - .should_not == vl - validates_length_of shnb - .should_not be vn - validates_numericality_of shnbc - .should_not be_close vpo - validates_presence_of shnbio - .should_not be_instance_of vu - validates_uniqueness_of shnbko - .should_not be_a_kind_of wants - wants.<+js|xml|html+> shnbr - response.should_not be_redirect xdelete - xhr :delete shnbs - response.should_not be_success xget - xhr :get shne - .should_not eql xpost - xhr :post shneq - .should_not equal xput - xhr :put shnm - .should_not match RUBY-RSPEC shnp - .should_not be_ aft - after(${1::each}) do shnr - .should_not_receive annot - any_number_of_times shnre - .should_not raise_error anr - and_return(${1:value}) shnredt - response.should_not redirect_to anra - and_raise(${1:exception}) shnrt - .should_not respond_to anrb - and_return { ${1} } shns - .should_not satisfy { } ant - and_throw(${1:sym}) shnt - .should_not throw_symbol any - and_yield(${1:values}) shp - .should be_ atl - at_least(${1:n}).times shr - .should_receive atm - at_most(${1:n}).times shre - .should raise_error bef - before(${1::each}) do shredt - .should redirect_to conn - controller_name :${1:controller} shrt - .should respond_to des - describe "${1:subject}" do shs - .should satisfy { desc - require sht - .should throw_symble desrc - describe controller GET|POST... shtemp - .should render_template dest - describe Type tw - twice dests - describe Type description wia - with( ex - exactly(${1:n}).times isbl - it_should_behave_like.