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
module RandomPronounceableString | |
VOWELS = "aeiou" | |
CONSONANTS = "bcdfghjklmnprstvwyz" | |
def random_pronounceable | |
%(#{random_consonant}#{random_vowel}#{random_consonant}#{random_vowel}#{random_consonant}#{random_vowel}) | |
end | |
def random_vowel | |
random_letter(VOWELS) |
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
module ApplicationHelper | |
def navigation(collection) | |
content_tag :ul do | |
build_navigation_items(collection) | |
end | |
end | |
def build_navigation_items(collection) | |
content = "" | |
collection.each do |item| |
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 :redirect_mobile_device | |
before_filter :set_mobile_format | |
private | |
def redirect_mobile_device | |
if is_mobile_device? |
NewerOlder