Skip to content
This repository

style defaults

Rails 4 support

* Update the spec/dummy app to use Rails 4 style
* Update the appraisals to use latest released rails versions
* Update travis config to pay attention to ruby 2.0 and rails 4.0
latest commit ccbf2947f4
Matt Jankowski mjankowski authored
Octocat-spinner-32 gemfiles Rails 4 support
Octocat-spinner-32 lib Add timestamp helper
Octocat-spinner-32 spec Rails 4 support
Octocat-spinner-32 .gitignore remove gemfile lock files and add to gitignore
Octocat-spinner-32 .travis.yml Rails 4 support
Octocat-spinner-32 Appraisals Rails 4 support
Octocat-spinner-32 CONTRIBUTING.md Add a document describing how to contribute.
Octocat-spinner-32 Gemfile Rails 4 support
Octocat-spinner-32 Gemfile.lock Rails 4 support
Octocat-spinner-32 LICENSE Extend copyright year through 2013
Octocat-spinner-32 NEWS.md Add 2.1.0 section
Octocat-spinner-32 README.md Update to README, clarifying what Flutie is, pointing to Bourbon/Neat
Octocat-spinner-32 Rakefile tell travis to use each gemfile separately
Octocat-spinner-32 flutie.gemspec Rails 4 support
README.md

Flutie

Build Status

Flutie provides extra ActionView view helpers for use with Rails applications. Previous versions created default application styles.

Please look to Bourbon and Neat gems for style defaults now.

Installation & Upgrading

Flutie is a Railtie meant for use with Rails. It works with versions of Rails greater than 3.0.

Flutie is recommended to be run as a gem and included in your Gemfile:

gem 'flutie'

Helpers

Flutie provides several helper methods for layouts as well.

page_title

The page_title method can be used like:

<title><%= page_title %></title>

By default, it will produce results like:

<title>Appname : page title</title>
  • "App name" comes from the module name of the rails application created by your app, i.e. Appname::Application will produce "Appname"
  • "page" comes from trying content_for(:page_title) and assumes you are using content_for with :page_title symbol on your pages.
  • The separator defaults to " : "

These can be overridden by passing an options hash including :app_name, :page_title_symbol and :separator hash keys, ie:

content_for(:site_page_title, 'My title of my page')
page_title(:app_name => 'My app name', :page_title_symbol => :site_page_title, :separator => " | ")
=> "My app name | My title of my page"

body_class

The body_class method can be used like:

<body class="<%= body_class %>">

This will produce a string including the controller name and controller-action name. For example, The WidgetsController#show action would produce:

<body class="widgets widgets-show">

Anything which has been added via content_for(:extra_body_classes) will be added to the end, for example:

content_for(:extra_body_classes, 'special-page')
<body class="<%= body_class %>">
<body class="widgets widgets-show special-page">

Suggestions, Bugs, Refactoring?

Please see CONTRIBUTING.md for details.

Credits

thoughtbot

Flutie is maintained and funded by thoughtbot, inc

Thank you to all the contributors!

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

License

Flutie is Copyright © 2010-2013 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Something went wrong with that request. Please try again.