Skip to content

Instantly share code, notes, and snippets.

# Add account credentials and API keys here.
# See http://railsapps.github.io/rails-environment-variables.html
# This file should be listed in .gitignore to keep your settings secret!
# Each entry sets a local environment variable and overrides ENV variables in the Unix shell.
# For example, setting:
source 'https://rubygems.org'
gem 'capistrano-rails-collection'
gem 'rvm1-capistrano3', require: false
gem 'capistrano'
gem 'capistrano-bundler'
@rvgarimrj
rvgarimrj / autorizacao.js
Last active August 29, 2015 14:17
Action Mailer Não está enviando email
jQuery(document).ready(function($){
$(document).on("click",".cancela_solicitacao",function(){
$('#ModalSolicitacao').foundation('reveal', 'close');
});
$(document).on("click",".fecha_solicitacao",function(){
$('#ModalSolicitacao').foundation('reveal', 'close');
});
@rvgarimrj
rvgarimrj / color.rb
Last active February 18, 2016 17:15
Query para trazer as descricoes
class Color < ActiveRecord::Base
has_many :variations
validates :cod,
:presence => true,
:uniqueness => true
validates :descricao,
:presence => true,
:uniqueness => true
end
<div class="row">
<div class="small-12 columns">
<div class="nested-fields">
<div class="row">
<div class="small-3 columns end leitor">
<form action="#" method="post">
Código de barras
(<a href="http://zxing.appspot.com/scan?ret=http://www.auere.com.br/testes/barcode.php?codigo={CODE}">Leitor</a>):
<input class="cod_barras" type="text" name="cod_barras" value="">
</form>
@rvgarimrj
rvgarimrj / form.html
Created February 26, 2016 18:56
Angular para pegar conteudo do input classe = cod_barras_dev
<html lang="en" class=" js flexbox flexboxlegacy canvas canvastext webgl touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jolét</title>
<script type="text/javascript">
//<![CDATA[
window.gon={};
//]]>
</script>
@rvgarimrj
rvgarimrj / form.html
Created February 26, 2016 19:26
Jquery para filtrar o elemento cujo input seja igual ao conteudo digitado na classe cod_barras_dev
<html lang="en" class=" js flexbox flexboxlegacy canvas canvastext webgl touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jolét</title>
<script type="text/javascript">
//<![CDATA[
window.gon={};
//]]>
</script>
@rvgarimrj
rvgarimrj / _details_fields.html.erb
Created March 15, 2016 19:49
GIst tentativa de ler codigo de barras
<% if @tipo == "devolucao" %>
<div class="nested-fields">
<div class="row listCod" data-cod="<%= f.object.barcode %>">
<div class="small-6 columns show-for-small-only">
<%= f.input :barcode, label: "Cod Barras", input_html: { class: 'barcode_ror_dev' } %>
</div>
<%= f.input :order_id, :as => :hidden, input_html: { class: 'order_id_ror_dev' } %>
<div class="show-for-medium-up small-2 columns">
<%= f.input :cod_produto, label: "Produto", input_html: { class: 'cod_produto_ror_dev' } %>
</div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= content_for?(:title) ? yield(:title) : "Jolét" %></title>
<%= Gon::Base.render_data({}) %>
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
<body>
<div class="contain-to-grid sticky">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><a href="/">Jolét</a></li></h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>