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
#youtube videos | |
def youtube_video_tag(id, html_options = {}) | |
video_tag "http://www.youtube.com/embed/#{id}" | |
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
<?php | |
//1 – Definimos Para quem vai ser enviado o email | |
$para = "seu-email@dominio.com.br"; | |
//2 - resgatar o nome digitado no formulário e grava na variavel $nome | |
$nome = $_POST['nome']; | |
// 3 - resgatar o assunto digitado no formulário e grava na variavel //$assunto | |
$assunto = $_POST['assunto']; | |
//4 – Agora definimos a mensagem que vai ser enviado no e-mail | |
$mensagem = "<strong>Nome: </strong>".$nome; | |
$mensagem .= "<br> <strong>Mensagem: </strong>".$_POST['mensagem']; |
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
Some setup you must do manually if you haven't yet: | |
1. Ensure you have defined default url options in your environments files. Here | |
is an example of default_url_options appropriate for a development environment | |
in config/environments/development.rb: | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
In production, :host should be set to the actual host of your application. |
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
# Adicione o código dentro do module em config/application.rb | |
config.generators do |g| | |
g.assets false | |
g.helper false | |
g.test_framework nil | |
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
/* Brazilian initialisation for the jQuery UI date picker plugin. */ | |
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ | |
jQuery(function($){ | |
$.datepicker.regional['pt-BR'] = { | |
closeText: 'Fechar', | |
prevText: '<Anterior', | |
nextText: 'Próximo>', | |
currentText: 'Hoje', | |
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', | |
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], |
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
<% if flash[:notice].present? %> | |
<div class="alert alert-success" role="alert"> | |
<a class="close" data-dismiss="alert">×</a> | |
<%= flash[:notice] %> | |
</div> | |
<% end %> | |
<% if flash[:alert].present? %> | |
<div class="alert alert-error" role="alert"> | |
<a class="close" data-dismiss="alert">×</a> |
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
# encoding: utf-8 | |
require 'csv' | |
class AssociadosController < ApplicationController | |
authorize_resource | |
def index | |
if params['filtro'].present? |
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
doctype html | |
html | |
head | |
title Slim Examples | |
meta name="keywords" content="template language" | |
meta name="author" content=author | |
javascript: | |
alert('Slim supports embedded javascript!') | |
body |
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
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
config.wrappers :bootstrap, :tag => 'div', :class => 'form-group', :error_class => 'has-error' do |b| | |
b.use :html5 | |
b.use :placeholder | |
b.use :label | |
b.use :input, :wrap_with => { :tag => 'div', :class => 'controls' } | |
b.use :error, :wrap_with => { :tag => 'span', :class => 'help-block' } | |
b.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' } | |
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
# OSX | |
sudo /Library/StartupItems/VirtualBox/VirtualBox restart |
OlderNewer