⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
[Time, Date].each do |clazz| | |
eval "#{clazz}::MONTHNAMES = [nil] + %w(January February March April May June July August September October November December)" | |
eval "#{clazz}::DAYNAMES = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)" | |
eval "#{clazz}::ABBR_MONTHNAMES = [nil] + %w(Jan Fev Mar Abr May Jun Jul Ago Set Out Nov Dez)" | |
eval "#{clazz}::ABBR_DAYNAMES = %w(Sun Mon Tue Wed Thu Fri Sat)" | |
end | |
class Time | |
class << self |
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
permissions = Permission.find_all_by_group_id(<id_do_grupo_do_usuario>) | |
cannot :manage, :all | |
actions = "" | |
models = "" | |
# dps vai verificando as permissoes do usuario, e permitindo. tipo: | |
permissions.each do |permission| |
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 Noticia << .... | |
validate :texto_inicio_igual | |
def texto_inicio_igual | |
noticias = Noticia.all | |
i = 0 | |
noticias.each do |noticia| | |
if noticia.texto.split(" ")[0] === self.texto.split("")[0] | |
i += 1 | |
end |
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 Week | |
attr_accessor :segunda_feira, :terca_feira, :quarta_feira, :quinta_feira, :sexta_feira | |
def initialize(segunda_feira,terca_feira,quarta_feira,quinta_feira,sexta_feira) | |
@segunda_feira = segunda_feira | |
@terca_feira = terca_feira | |
@quarta_feira = quarta_feira | |
@quinta_feira = quinta_feira | |
@sexta_feira = sexta_feira |
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
.../spec/spec_helper.rb:27:in `block (2 levels) in <top (required)>': uninitialized constant ControllerMacros (NameError) |
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
assigns(:qty_sites_without_bp).should_not be_nil |
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
[{"id"=>"491", | |
"name"=>{"us"=>"Gex 3: Deep Cover Gecko", "uk"=>"Gex 3: Deep Cover Gecko"}, | |
"description"=> | |
"<p>There was a time where nearly any cute-ish animal could get his own trilogy of video games, costarring with real-life buxom blondes and saving the world from despicable evils. That time, sadly, has passed.</p>\n", | |
"platform"=>{"id"=>"6", "name"=>"PSP"}, | |
"updated_date"=>"2009-11-02T12:25:40.00+0000", | |
"url"=>"http://www.gamesradar.com/psp/gex-3-deep-cover-gecko", | |
"images"=> | |
{"thumbnail"=>"http://static.gamesradar.com/images/empty_01_logo.jpg"}}, | |
{"id"=>"4612", |
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
--- | |
http_interactions: | |
- request: | |
method: get | |
uri: http://api.gamesradar.com | |
body: | |
encoding: UTF-8 | |
string: ! '<?xml version="1.0" ?><methodCall><methodName>listBatchSubscribe</methodName><params><param><value><string>284455d5b40a2451f127067cf7b5d39c-us4</string></value></param><param><value><string>95ab60ca50</string></value></param><param><value><array><data><value><struct><member><name>EMAIL</name><value><string>user@estoujogando.com.br</string></value></member><member><name>CREATED_AT</name><value><dateTime.iso8601>20121124T00:00:00</dateTime.iso8601></value></member><member><name>USERNAME</name><value><string>yogodoshi1</string></value></member><member><name>NAME</name><value><string>Usuário | |
1</string></value></member><member><name>BIRTH</name><value><string></string></value></member></struct></value><value><struct><member><name>EMAIL</name><value><string>user2@estoujogando.com.br</string></value></member><member><name>CREATED_AT</name><value><dateTime.iso8601>20121124T00:0 |
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
--- | |
http_interactions: | |
- request: | |
method: get | |
uri: http://api.gamesradar.com/games?platform=psp&genre=all&page_num=1&page_size=10&sort=newest&api_key=0b6e6ede9f26471fadc548f7b04e7c54 | |
body: | |
encoding: US-ASCII | |
string: '' | |
headers: | |
accept: |
OlderNewer