Skip to content
No description or website provided.
Ruby JavaScript CSS
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app/controllers
lib
spec
.gitignore
Gemfile
Gemfile.lock
Guardfile
MIT-LICENSE
README.rdoc
Rakefile
silly_mobilizer.gemspec

README.rdoc

SillyMobilizer

Easily manage mobile devices on your Ruby on Rails application.

Installation

Add the gem to your Gemfile

gem 'silly_mobilizer', git: 'git@github.com:siliconsalad/silly_mobilizer.git',  branch: 'develop'

Run the installer

rails g silly_mobilizer:install

If you want to enable the ability to force desktop version on mobile devices, create the following route

resource :device_type_selection, only: [:create, :destroy], controller: :device_type_selection

Finally to enable Silly Mobilizer add the following to your ApplicationController

include SillyMobilizer::MobileRequestsHandler

Usage

Whenever you want a view in your application to be rendered in mobile version, create it with mobile extension.

For example : index.mobile.erb

If the mobile version doesn't exist it automatically falls back to html version.

Notes

Devise

If you're using Devise for authentication you might have to add this to your devise initializer :

config.navigational_formats = [:html, :mobile]
Something went wrong with that request. Please try again.