Skip to content

steveklabnik/bring_back_snowman

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

BringBackSnowman

You know you miss this little guy: β˜ƒ.

If you don't know what that's about, this blog post explains what's up.

With the impending release of Rails 4, I was thinking about fun things in the history of Rails, and thought it'd be fun to bring him back.

Installation

Add this line to your application's Gemfile:

gem 'bring_back_snowman'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bring_back_snowman

Usage

Just do it, and your forms will submit _snowman=β˜ƒ to ensure that your data is encoded in UTF-8.

It is configurable, if you prefer something else. Add this to your application.rb:

config.snowman = {:emoji => "😒"}

The key of the configuration hash will be the name of the url parameter. You can use UTF-8 characters for the key too.

You may also need to add the 'magic comment' at the top of the file:

# encoding: UTF-8

Please remember that if you don't use something that's UTF-8, this won't actually work to fix the bug.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages