Handcrafted prototypes with ease.
Add Carpentry to Gemfile:
gem "carpentry", "~> 2.1.1"
Run the generator to create the prototypes folder (and inject the Carpentry route):
rails generate carpentry:install
Put your views in
app/views/carpentry/prototypes and view them in
|URI Path||File path|
All available Rails helpers work nicely. Pure prototyping bliss!
If you want an special layout for your prototypes, stick the layout file
You can customize the prototype URI prefix (
/p) by editing the engine mount in your
roures.rb file, for example:
Carpentry let's you add a
#before_carpentry method in
ApplicationController, that will be run before any prototype. You can
use it, for example, to provide authentication or prevent prototypes
from being rendered in production.
Carpentry is compatible with Rails 3.2 and Rails 4.0.
Only Ruby 1.9.3 and above are supported, check Travis CI for build details.
If you want to use Carpentry with Ruby 1.9.2 or below, use Carpentry v1.0.1.
When rendering a partial, you must specify the full path
carpentry/prototypes/posts/form) unless the partial is in
MIT License. Copyright 2011-2013 Kisko Labs.