###Slides
http://railsforzombies.com.s3.amazonaws.com/Rails-For-Zombies-Slides.pdf
http://courseware.codeschool.com/rails_for_zombies_2_slides.pdf
http://courseware.codeschool.com/rails4/Rails%204%20-%20Zombie%20Outlaws.pdf
'.source.ruby': | |
'describe (String)': | |
'prefix': 'des' | |
'body': 'describe "${1:subject}" do\n $0\nend' | |
'describe (type)': | |
'prefix': 'dest' | |
'body': 'describe ${1:Type} do\n $0\nend' | |
'describe (type, string)': | |
'prefix': 'dests' | |
'body': 'describe ${1:Type}, "${2:description}" do\n $0\nend' |
The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.
use must for positive expectations and wont for negative expectations.
pt-BR: | |
will_paginate: | |
previous_label: "← Anterior" | |
next_label: "Próximo →" | |
page_gap: "…" | |
page_entries_info: | |
single_page_html: | |
zero: "Nenhum registro encontrado" | |
one: "Apenas 1 registro encontrado" | |
other: "Mostrando todos os %{count} registros encontrados" |
# I am assuming you have a User model with a | |
# has_many :people association? | |
def create | |
# Your params for Person creation are found on the params[:person] | |
# I do not understand what you are doing here. Basically, what's going | |
# on - if an organisation is selected, you are building the person off of | |
# the organisation relationship. Your form, however, revolves around people, not | |
# organisations. | |
# So, get rid of the complexity below |
É difícil falar de Ruby sem mencionar seu framework web mais famoso, Ruby on Rails. Mas não adianta muito encarar o framework sem um prévio estudo da linguagem (o que de fato já observei acontecer inúmeras vezes). Esse post tem como intuito auxiliar na aprendizagem tanto da linguagem como do framework, para evitar que erros comuns como esse tornem a utilização de ambos um desastre.
Ruby é uma linguagem de programação que apareceu para o mundo em 1995, criada por Yukihiro "Matz" Matsumoto. Tem como características o fato de ser uma linguagem de uso geral, com tipagem dinâmica e forte, orientada a objetos e que incorpora diversos paradigmas de programação, como o funcional e o imperativo.
# -*- encoding : utf-8 -*- | |
# | |
# Rodrigo Soares Manhães, professor homenageado pelos formandos da turma de 2007 | |
# do curso de Ciência da Computação da UENF. | |
# | |
# 20/09/2012 | |
# | |
## | |
class Aluno < ActiveRecord::Base |