Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Ruby on Rails DSL for creating rapid prototypes
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
lib
vendor/assets
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
fidelity.gemspec

README.md

Fidelity gem

A Ruby on Rails DSL for creating rapid prototypes. Depends on Foundation.

Install

This is still in alpha and under development. To install add the gem to your Gemfile in your Ruby on Rails 3.2 application:

gem "fidelity"

Once you have it installed you need to run inside the rails applications root directory:

rails g fidelity:install

How to use

View full documentation at: http://localhost:3000/fidelity

Below is a brief example of how to use the DSL (the example is a HAML template so don't forget to include the haml gem in your Gemfile to make the example work ).

    = fidelity_for do |f|
        = f.grid do
            = f.row do
                = f.column(3) do
                    %h3 Label
                = f.column(9) do
                    = f.widget :label, :content => 'This is the content of the label'
            = f.row(:border => true) do
                = f.column(3) do
                    %h3 Alert
                = f.column(9) do
                    = f.widget(:alert, :type => :success) do
                        This is a success alert 
                    = f.widget(:alert, :type => :error) do
                        This is a error alert 
            = f.row(:border => true) do
                = f.column(3) do
                    %h3 Buttons
                = f.column(9) do
                    %p= f.widget :button, :size => 'medium', :corners => 'radius', :style => 'nice', :color => 'red', :label => 'Medium red nice looking button'
Something went wrong with that request. Please try again.