Skip to content
Adds boolean instance methods for MIME type checking to Rails
Ruby
Find file
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 soon will support 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, released under the MIT license
Something went wrong with that request. Please try again.