This file contains hidden or 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
| alias bi= 'bundle install' | |
| alias bex='bundle exec' | |
| alias gra='git remote add' | |
| alias gp ='git push' | |
| alias gl ='git pull' | |
| alias gcm='git commit -m' |
This file contains hidden or 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
| require 'hpricot' | |
| class CustomizedErrorFormBuilder < ActionView::Helpers::FormBuilder | |
| def label(method, text = nil, options = {}) | |
| text = text || method.to_s.humanize | |
| object = @template.instance_variable_get("@#{@object_name}") | |
| unless object.nil? || options[:hide_errors] | |
| errors = object.errors.on(method.to_sym) |
This file contains hidden or 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
| #... | |
| ActionView::Base.default_form_builder = CustomizedErrorFormBuilder | |
| #ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
| # if html_tag =~ /<label/ | |
| # %|#{html_tag} <font class="error">#{[instance.error_message].join(', ')}</font>| | |
| # else | |
| # error_class = 'fieldWithErrors' | |
| # nodes = Hpricot(html_tag) |
This file contains hidden or 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
| <% form_for seu_model, :builder => CustomizedErrorFormBuilder do |form| %> | |
| <% end %> |
This file contains hidden or 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
| # rollback no seu branch local para a versão anterior | |
| git reset --soft HEAD^ | |
| # rollback no github master. | |
| # volte no seu clone local e até o ponto que deseja e rode | |
| git push --force origin master |
This file contains hidden or 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
| ENV['SCM'] = 'git' | |
| ENV['SKIP_TASKS'] = %w( | |
| scm:update | |
| test:rcov:units | |
| test:rcov:units:verify | |
| test:rcov:functionals | |
| test:rcov:functionals:verify | |
| test:selenium:server:start | |
| test_acceptance |
This file contains hidden or 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
| g migratio update_sluggable_type_from_categoria_to_category | |
| exists db/migrate | |
| create db/migrate/20110714173922_update_sluggable_type_from_categoria_to_category.rb |
This file contains hidden or 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
| FormFieldMask = { | |
| money: { | |
| event: 'keyup', | |
| regex: /[^\d,]/g, | |
| handler: function(event){ | |
| var field = event.target; | |
| field.setValue(field.value.replace(FormFieldMask.money.regex, '')); | |
| } | |
| }, |
This file contains hidden or 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
| formFieldMasks = [ | |
| { | |
| cssClass: 'money', | |
| event: 'keyup', | |
| handler: function(event){ | |
| var regex = /[^\d,]/g; | |
| var field = event.target; | |
| field.setValue(field.value.replace(regex, '')); | |
| } | |
| }, |
This file contains hidden or 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
| SELECT [shop].* | |
| FROM [shop] | |
| INNER JOIN [project_shop] ON ([shop].[shopid]=[project_shop].[shopid]) | |
| WHERE (([project_shop].[ProjectId] = 1000) | |
| AND ((shopid in (select p.ShopId from Price p, Product p where p.ProductId = o.ProductId and o.ProjectId = 23849552638300))) |