• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    Ruby
  • License
    Other
  • Created about 16 years ago
  • Updated almost 16 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A new plugin for creating Rails applications targeted for iPhones. A successor to rails_iui
TankEngine
==========

A Rails toolkit for creating applications optimized for Mobile Safari, 
iPhone, and the iPhone touch. Based on the iUI look and feel library.

Contact
=======

Contact the author at noelrappin at gmail.com


Example
=======

This plugin uses jQuery to manage it's JavaScript needs. The jRails plugin
(http://ennerchi.com/projects/jrails) is recommended -- it converts Rails
Prototype/Scriptaculous helpers to jQuery.

After installing the plugin, perform

rake tank_engine:install

to copy the public assets (images, javascript, and CSS) to the public folder.

Tank engine places an iPhone layout file in app/views/layouts/application.iphone.erb.

Controller Usage
================

The module ActionController::IphoneController adds support for recognizing
Mobile Safari as the :iphone pseudo-MIME type. 

In your controller (can be ApplicationController) add the line

acts_as_iphone_controller

By default, the following requests are redirected to the iphone format.

* Requests with a user agent including "Mobile Safari". To change this 
default, pass the option :ignore_iphone_user_agent => true to 
acts_as_iphone_controller.

* Requests which end in ".iphone". To change this default, pass the option
:format => <YOURFORMAT> to acts_as_iphone_controller.

* Requests to a subdomain "iphone". To change this default, pass the option
:subdomain => <YOURFORMAT> to acts_as_iphone_controller.

The option :test_mode => true will cause all requests to be treated as iPhone
requests.

To capture these requests, you can use :iphone as part of a respond_to block:

respond_to do |format|
  format.html # show.html.erb
  format.xml  { render :xml => @feature }
  format.iphone
end

The file extension for the view is .iphone.erb

The module TankEngineHelper provides a number of helper methods for creating
iPhone structures in your views.

When this plugin is installed, form builders have a new helper "toggle" that
creates an iPhone style toggle switch.

Copyright (c) 2008 Noel Rappin, released under the MIT license

More Repositories

1

rails-iui

Rails wrapper for the iUI toolkit for building iPhone enabled web applications
Ruby
141
star
2

mstwjs_code

Code repository for Master Space and Time With JavaScript
Ruby
52
star
3

summer_breeze

"Summer breeze, makes me feel fine Blowing through the jasmine in my mind"... creates dynamic rails fixtures for Jasmine tests. In development.
Ruby
52
star
4

rails_conf_2021_hotwire

RailsConf 2021 sample code repository
Ruby
43
star
5

warning_signs

A gem for managing Ruby and Rails dependencies
Ruby
26
star
6

rails_javascript_documention_drafts

25
star
7

date_by_example

A Ruby implementation of Go-style date-formatting by example
Ruby
17
star
8

huddle

A Demo Application for Rails Prescriptions, eventually a full-fledged support application for remote scrums
Ruby
13
star
9

rubomop

Rubomop cleans up after your rubocop. It automatically deletes entries from your .rubcop_todo.yml
Ruby
12
star
10

snow_globe

Code Repo for Take My Money
Ruby
8
star
11

rails_conf_2022

Rails 7 Front End Tooling Workshop for Rails Conf 2022
Ruby
8
star
12

gemfile_sorter

A Ruby Gem that sorts Gemfiles. Mostly
Ruby
6
star
13

rails_conf_north_by

Workshop for RailsConf 2019
Ruby
5
star
14

walk_through_coverage

A rake task that does a series of rcov coverage runs for each individual app file
Ruby
5
star
15

scottish_ruby_travel_app

Sample application for Scottish Ruby workshop
Ruby
4
star
16

testbed

A simple helper for creating a lot of one line tests that do the same thing
Ruby
3
star
17

spec_sequence

The code relating to the beyond red, green, refactor talk: http://www.slideshare.net/noelrap/what-we-talk-about-when-we-talk-about-testing-or
Ruby
3
star
18

ancient_city

Code for ancient city ruby workshop
Ruby
3
star
19

deckset_editor

An attempt to build a simple editor for Deckset (https://www.decksetapp.com) using Electron and Elm
Elm
3
star
20

foot_travel

Sample app for Fancy OO Techniques
Ruby
2
star
21

html_tag

An alternative syntax to Rails content_tag, inspired by the old Ruby CGI library
Ruby
2
star
22

madruby_muppet

Ruby
1
star
23

pub_rx

My self-publishing system, in progress
CSS
1
star
24

hungry_app

Ruby
1
star