-
http://www.seattlealehouses.com/ (Greenwood, Queen Anne, Columbia City) - Great American/Mexican-style food + local beers
-
http://www.prosttavern.net/ (Roosevelt, West Seattle, Greenwood) - Huge selection of hard-to-find German beers on tap
-
http://www.bigtimebrewery.com/ (U District) - Brewery with great beer and pizza
This file contains hidden or 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
| $ irb | |
| ruby-1.9.1-p378 > string = "Jürgen Müller" | |
| => "Jürgen Müller" | |
| ruby-1.9.1-p378 > string.force_encoding("BINARY").encode("UTF-8", :invalid => :replace, :replace => "") | |
| Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8 | |
| from (irb):2:in `encode' | |
| from (irb):2 | |
| from /Users/norman/.rvm/rubies/ruby-1.9.1-p378/bin/irb:17:in `<main>' | |
| ruby-1.9.1-p378 > |
This file contains hidden or 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 MyApp | |
| module Friendly | |
| def self.included(base) | |
| base.has_friendly_id :custom_slug, :use_slug => true, :approximate_ascii => true | |
| end | |
| def custom_slug | |
| if @custom_slug.present? |
This file contains hidden or 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
| From a62b79e86cb2ad973578be43d93f79890ed0ab4d Mon Sep 17 00:00:00 2001 | |
| From: Norman Clarke <[email protected]> | |
| Date: Wed, 7 Apr 2010 16:21:41 -0300 | |
| Subject: [PATCH] Make tidy_bytes work on 1.9 and improve its performance. [#4350 state:resolved] | |
| --- | |
| .../lib/active_support/multibyte/chars.rb | 85 +++++++++++++++---- | |
| activesupport/test/multibyte_chars_test.rb | 73 +++++++++++------ | |
| 2 files changed, 114 insertions(+), 44 deletions(-) |
This file contains hidden or 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
| From 059e245874dd38843986a8c0226c4dfad835bfff Mon Sep 17 00:00:00 2001 | |
| From: Norman Clarke <[email protected]> | |
| Date: Mon, 12 Apr 2010 12:44:25 -0300 | |
| Subject: [PATCH] Improve reliability of Inflector.transliterate. [#4374 state:resolved] | |
| --- | |
| .../lib/active_support/inflector/transliterate.rb | 61 ++++++++++++-------- | |
| activesupport/test/inflector_test_cases.rb | 5 +- | |
| activesupport/test/transliterate_test.rb | 50 ++++++++++++++++ | |
| 3 files changed, 91 insertions(+), 25 deletions(-) |
This file contains hidden or 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
| # Ruby surprisingly clears the value of the $1 variable after a return | |
| def test_gsub | |
| result = "a".gsub(/(a)/, "b") | |
| p $1 | |
| result | |
| end | |
| test_gsub | |
| p $1 |
This file contains hidden or 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
| I18n.backend.store_translations(:foo, :test => {:a => "b"}) | |
| I18n.backend.store_translations(:foo2, :test => lambda {|*args| args.join(", ")}) | |
| p I18n.t 'test', :locale => :foo # {:a=>"b"} | |
| p I18n.t 'test', :locale => :foo2 # "test, " |
This file contains hidden or 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 Author < ActiveRecord::Base | |
| has_many :books | |
| end | |
| class Book < ActiveRecord::Base | |
| belongs_to :author | |
| end | |
| @author = Author.find(params[:id], :include => :books) |
This file contains hidden or 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 Sound < Test::Unit::TestCase | |
| include Spanish::Phonology | |
| test "should get sound from symbol" do | |
| sound = Sound.new("b") | |
| assert_equal "b", sound.symbol | |
| assert sound.labial? | |
| assert sound.stop? | |
| assert sound.consonantal? |
This file contains hidden or 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
| # ruby-1.9.1-p243 | |
| "é".center(5, 'a') # => "aaéaa" | |
| "é".center(5, "á") # => "ááéáá" | |
| # ruby-1.9.1-p378 | |
| "é".center(5, 'a') # => "aaéaa" | |
| "é".center(5, 'á') # => "áéá" |