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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
$(document).ready -> | |
# $("div#[id^='flash_']").fadeOut(4000) | |
$("input[type='submit']").addClass("primary btn") |
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
$(document).ready -> | |
# $("div#[id^='flash_']").fadeOut(4000) | |
$("input[type='submit']").addClass("primary btn"); |
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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :find_user | |
#before_filter :set_locale | |
# redirect to the root page if the user doesn't have the permission to acccess that section of the site | |
rescue_from CanCan::AccessDenied do |exception| | |
# don't provide any information for users who access to the admin section | |
if exception.subject == :rails_admin | |
redirect_to "/" |
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
# coding: utf-8 | |
module ApplicationHelper | |
def cities_helper | |
[ | |
['基隆市', '基隆市'], | |
['台北市', '台北市'], | |
['新北市', '新北市'], | |
['桃園縣', '桃園縣'], | |
['新竹市', '新竹市'], | |
['新竹縣', '新竹縣'], |
NewerOlder