Skip to content

Instantly share code, notes, and snippets.

View plentz's full-sized avatar

Diego Plentz plentz

View GitHub Profile
@plentz
plentz / gist:715396
Created November 25, 2010 13:30
greenvana-qa2
- se clico no input de busca, o texto não ta sumindo automático, eu tenho que apagar manualmente
- http://twitpic.com/3a0kwl
- http://twitpic.com/3a0mqx
- http://twitpic.com/3a0n00 layout quebrando no chrome
- http://twitpic.com/3a0ngq link da imagem quebrado
Já tenho experiência com outras linguagens como Java ***e*** C# ***e***
há alguns meses que comecei a estudar a ligagem Ruby ***e*** o framework
Rails3 ***e*** a pouco tempo comecei a estudar ferramentas de testes
como Cucumber ***e*** Rspec ***e*** tenho grande interesse em aprender
mais ***e*** em trabalhar com essa linguagem.
ActionView::Template::Error (/var/cache/jetty/Jetty_0_0_0_0_8080_jruby_test.war___hml.xpto.com.br_.crf9hp/webapp/WEB-INF/app/views/control_panels/_form.html.erb:45: syntax error, unexpected ','
');@output_buffer.append= ( f.submit (title_tag :"activerecord.attributes.control_panel.save_configurations"), :class => "button" );@output_buffer.safe_concat('
^):
42:
43: <% if f.object.new_record? %>
44: <div class="ui-action">
45: <%= f.submit (title_tag :"activerecord.attributes.control_panel.save_configurations"), :class => "button" %>
46: </div>
47: <% end %>
translate en-pt ep http://translate.google.com/#en|pt|%s
translate pt-en pe http://translate.google.com/#pt|en|%s
@plentz
plentz / gist:850394
Created March 2, 2011 03:05
bug.html
<html>
<head>
<title> datepicker demo </title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../src/jquery.maskedinput.js" type="text/javascript"></script>
<script src="http:////ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<!--<script src="http:////ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>-->
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" />
<script type="text/javascript">
$(function() {
@plentz
plentz / gist:863523
Created March 10, 2011 03:20
easy way to get a ruby segmentation fault
~/Projects/opensource $ rails -v
ruby Rails 3.0.5
~/Projects/opensource $ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0]
~/Projects/opensource $ rails new foo
create
create README
...
create vendor/plugins/.gitkeep
~/Projects/opensource $ cd foo/
@plentz
plentz / e agora, bial.md
Created March 15, 2011 20:03
rails don't call .to_xml on each element *always*

gurizei.

quando tu faz no rails "render :xml => @any_collection", ele chama o to_xml passando uma série de parâmetros no options, logo, se tu implementa teu to_xml assim:

    def to_xml(options = {})
        super(:include => [:children])
    end

tu não vai estar repassando pro super o "options" - que nesse caso vem com algo do tipo:

bash: /home/gregorio/.rvm/scripts/log: Arquivo ou diretório não encontrado
awk: cannot open /home/gregorio/.rvm/lib/VERSION.yml (No such file or directory)
bash: __rvm_conditionally_add_bin_path: comando não encontrado
~$ rvm -v
bash: __rvm_cleanse_variables: comando não encontrado
rvm by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
~$ rvm reload
~$ rvm -v