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
CREATE TABLE `ci_omni_financeira`.`correspondentes` ( | |
`id` INT NOT NULL AUTO_INCREMENT, | |
`razao` VARCHAR(255) NULL, | |
`nome` VARCHAR(255) NULL, | |
`endereco` VARCHAR(255) NULL, | |
`cidade` VARCHAR(255) NULL, | |
`estado` VARCHAR(255) NULL, | |
`cnpj` INT NOT NULL, | |
`servicos` VARCHAR(255) NULL, | |
`deletado` TINYINT(1) NULL DEFAULT '0', |
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
;(function(){ | |
var $phone = $('.phone'); | |
var init = function () { | |
maskAll(); | |
}; | |
var SPMaskBehavior = function (val) { | |
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; | |
}, |
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
;(function(){ | |
var $accordion = $('.accordion'), | |
title = '.accordion .title', | |
$boxes = $accordion.find('.box'); | |
$(document) | |
.on('click', title, console.log('yo!')) | |
; | |
})(); |
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
class Notice < ActiveRecord::Base | |
validates_presence_of :notice_category | |
has_many :notice_locales, :dependent => :destroy | |
accepts_nested_attributes_for :notice_locales, :allow_destroy => true | |
belongs_to :notice_category | |
has_one :notice_category_locale#, :foreign_key => | |
has_attached_file :image, styles: { medium: "300x300>", thumb: "100x100>", my_admin: "150x150>"}, default_url: "/images/:style/missing.png" |
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
/** | |
* ATENÇÃO: | |
* | |
* O JavaScript possui uma série de "stranger things" em relação a algumas instruções. | |
* Portanto, tome cuidado se precisar utilizar qualquer uma dessas instruções listadas abaixo. | |
* | |
* Obs. 1: O ">" indica uma linha de instrução e a linha seguinte à essa indica o seu retorno. | |
* Obs. 2: O fato de o retorno não ser esperado ou óbvio, não quer dizer que, necessáriamente, ele seja um bug ou algo | |
* que passou despercebido pelas pessoas que matêm a linguagem e/ou interpretadores. | |
*/ |
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
<style media="screen"> | |
.tabs-locale{ | |
border: 1px solid #dddddd; | |
} | |
.tabs-locale a{ | |
border-radius: 0px 0px 0 0!important; | |
} | |
</style> | |
<% has_many_model = model.reflections[field.to_s].klass %> |
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
<div role="tabpanel" class="tab-pane <%= index == 0 ? 'active' : ''%>" id="locale_<%= locale.acronym %>"> | |
<%= form.fields_for(field, item) do |has_many_form| %> | |
<%= has_many_form.hidden_field :locale_id %> | |
<% has_many_model.my_admin.fieldsets.each do |has_many_fieldset| %> | |
<%= content_tag(:fieldset) do %> | |
<%= content_tag(:legend, fieldset_title(application, has_many_model, has_many_fieldset[:name])) if has_many_fieldset.has_key? :name %> | |
<% has_many_fieldset[:fields].each do |has_many_field| %> | |
<%= edit_field_struct(application, has_many_model, has_many_field, item, has_many_form ) %> | |
<% end %> | |
<% 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
module ApplicationHelper | |
def locale_time(timestamp) | |
timestamp.strftime("%d/%m/%Y") | |
end | |
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
<% if @seo_title.blank? %> | |
<title>Nitro Química</title> | |
<% else %> | |
<title><%= @seo_title %> - Nitro Química</title> | |
<% end %> | |
<% unless @seo_description.blank? %> | |
<meta name="description" content="<%= @seo_description %>"> | |
<% 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
if @contact.save | |
flash[:success] = 'Seus dados foram enviados com sucesso! Em breve entraremos em contato' | |
ContactMailer.contact(@contact).deliver_now | |
redirect_to action: "index" | |
else | |
flash[:error] = 'Não foi possível salvar seus dados!' | |
redirect_to action: "index" | |
end |
OlderNewer