Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

sinsoku/take_off

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TakeOff

TakeOff is a Rails engine that provides features for making landing pages.

Features

  • Free routing
  • Release control
  • Flexible form
  • Automatic reply by mail
  • Admin page

Installation

Add this line to your application's Gemfile:

gem 'take_off'

Then execute:

$ bundle

Then run the TakeOff generator:

$ rails g take_off:install

Then migrate:

$ rake db:migrate

Usage

Free routing

Simply create a file in app/views/pages/sample.html.erb:

<h1>Hello, TakeOff</h1>

Start a server rails s and visit /sample.

Release control

Use validation for release date:

<% validate_release_date! '2015/2/1 0:00:00' %>

If you want to show other content:

<% if release_date? '2015/2/1 0:00:00' %>
  <h1>Now On Sale</h1>
<% else %>
  <h1>On Sale February 1</h1>
<% end %>

Flexible form

Use form helper when needs user answers.

<%= form_for_answer landing_id: 1 do %>
  <div>
    <label for="content_name"%>Name</label>
    <input id="content_name" type="text" name="content[name]">
  </div>

  <button type="submit">Submit</button>
<% end %>

Admin page

Visit /admin.

Automatic reply by mail

TODO

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published