Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 971 Bytes

README.md

File metadata and controls

50 lines (34 loc) · 971 Bytes

Penn Paper Size

App to calculate 15th C. paper sizes based on page dimensions.

Installation

Clone, install gems, and start the application:

git clone [email protected]:demery/paper-sizer.git
cd paper-sizer
bundle install  # see below on bundler
rackup          # start the app

Go to http://localhost:9292 to see the app!

Bundler

To install all bundler:

gem install bundler

Filling in the code

The work is done by app.rb. The user inputs data on the form at the / route (the views/index.erb template):

get '/' do
  erb :index
end

When user submits the form the data is posted to the /sizeit route:

post '/sizeit' do
  erb :sizeit, locals: params
end

The page displayed to the user is built from the views/sizeit.erb template.

To add functionality to the application edit the /sizeit action and the views/sizeit.erb template.