Skip to content

Instantly share code, notes, and snippets.

View gabrieltong's full-sized avatar

Gabriel gabrieltong

View GitHub Profile
# Chinese (China) translations for Devise(3.2.2)
# by Kenrick-Zhou (https://github.com/Kenrick-Zhou)
# https://gist.github.com/Kenrick-Zhou/7909822
zh-CN:
devise:
confirmations:
confirmed: "您的帐号已经确认,您现在已登录。"
send_instructions: "几分钟后,您将收到确认帐号的电子邮件。"
send_paranoid_instructions: "如果您的邮箱存在于我们的数据库中,您将收到一封确认账号的邮件。"
@gabrieltong
gabrieltong / application.html.erb
Created February 18, 2014 08:11
bootstrap layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "RailsWanguo" %></title>
<%= csrf_meta_tags %>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
'zh-CN':
clearance_mailer:
change_password:
opening:
'Someone, hopefully you, requested we send you a link to change your
password:'
closing:
"If you didn't request this, ignore this email. Your password has not
been changed."
flashes:
# app/models/attachment.rb
require 'paperclip_grayscale_processor'
class Attachment < ActiveRecord::Base
belongs_to :attachable, :polymorphic => true
has_attached_file :file, :url => "/system/attachments/:id/:style/:filename",
:path => ":rails_root/public/system/attachments/:id/:style/:basename.:extension",
:styles => {