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
<?php | |
/* | |
* Exmplo de uso no model | |
* | |
* var $actsAs = array( | |
* 'ImagemUpload' => array( | |
* 'width' => 550, | |
* 'height' => 356, | |
* 'thumb' => true, |
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
" Plugin: pathogen.vim: manage your runtimepath | |
call pathogen#infect() | |
filetype plugin indent on | |
set showcmd " Show (partial) command in status line. | |
set showmatch " Show matching brackets. | |
set ignorecase " Do case insensitive matching | |
"set smartcase " Do smart case matching | |
set incsearch " Incremental search |
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
# vim alias | |
alias g='gvim --remote-silent' | |
# ssh linode alias | |
alias linode='ssh huoxito@huoxito.com.br' |
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
<?php | |
function beforeSave(){ | |
$slug = Inflector::slug($this->data['Servico']['nome'], '-'); | |
$this->data['Servico']['slug'] = strtolower($slug); | |
return true; | |
} | |
?> |
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
@posts = Post.find(params[:id]) | |
@posts.update_attributes(params[:post]) |
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
$(document).ready(function(){ | |
$('#marca').change(function(){ | |
var marca = $('#marca option:selected').val(); | |
$.getJSON('static/javascripts/models/models?marca', function(json){ | |
var items = ''; | |
$.each(json, function(idx,value) { | |
if(marca == value['make']){ | |
items += '<option value="' + value['model'] + '">' + value['model'] + '</option>'; | |
} | |
}); |
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
$('#model').change(function(){ | |
var model = $('#marca option:selected').val(); | |
var marca = $('#marca option:selected').val(); | |
$.ajax({ | |
url: 'http://quatrorodas.abril.com.br/compre-seu-carro/static/javascripts/price-table-years', | |
data: { make: marca, model: model, domain: "carro" }, | |
success: function(data){ | |
// monta os options com a var data | |
} | |
}); |
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
$(document).ready(function(){ | |
$('#marca').change(function(){ | |
var marca = $('#marca option:selected').val(); | |
$.getJSON('static/javascripts/models/models', function(data){ | |
var items = ''; | |
$.each(data, function(idx,value) { | |
if(marca == value['make']){ | |
items += '<option value="' + value['model'] + '">' + value['model'] + '</option>'; | |
} | |
}); |
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
test "should get index" do | |
get :index, time_id: "1" | |
assert_response :success | |
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
rdebug -Itest test/functionals/projetos_controller_test.rb |
OlderNewer