Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Adds boolean instance methods for MIME type checking to Rails
Ruby
tree: 1f2c39c5a9

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

What
====

What provides boolean instance methods on controllers 
for the native Rails mime-types:

atom?
css?
csv?
html?
ics?
js?
json?
multipart_form?
rss?
text?
url_encoded_form?
xml?
yaml?

... and a few other beauts:

gif?
iphone?
mobile?
pdf?
png?


Examples
========

What is especially powerful in combination with When.

before_filter :render_css_colors, :if => :css?
before_filter :verify_admin, :if => :csv?


Copyright (c) 2008 Dan Croak, Jared Carroll, and thoughtbot, inc. released under the MIT license
Something went wrong with that request. Please try again.