Skip to content

websdotcom/websgem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebsGem

WebsGem is a holder of knowlege with unknown equal. It:

  • Manages fw:params

  • Provides baseline controllers and views for Webs-maintained Rails apps

to ensure a consistent UI and experience across the platform

  • Totally takes over Rails

Right now it’s composed of several modules:

** Cache: Manage memcache interaction ** Config: Setup a Webs Rails instance from the webs_config.yml ** Controller: Controller helpers (abuse, permissions, etc. as well as the primary Webs controller you should inherit from) ** helpers: Controller helpers, including stuff for to manage fw_params ** views: Some default views you can use to manage standard fw_app responses

Installation

Rails 3

To use WebsGem with your stuff, in gemfile:

gem "webs", '<version>'

Rails 2.3

Don't use Rails 2.3, it's over 5 years old!

Usage

In a controller:

require 'webs'

class Front::Webs::SitesController < ActionController::Base
  ...

  include Webs::Controller::WebsController
  include Webs::Helper::Encoding	# Optional
  webs_helpers

  # NOTE: Uses Webs::SECRET
  before_filter :validate_webs_session, :except=>[:tab, :contactme_login]
  • Basic convenience methods for all the fw params

Instead of “params” or “request.headers” now you have fw_sig_session_key

  • Cool helper methods:

fw_app_url : full url of the app ex: mysite.webs.com/apps/videos

  • Security

Create a webs_config.yml file in /config

...
secret: "your_secret_key"
  • FWML Tag:

<%= fwml :tagname, ... %>

Maintainers

Contributors

Bugs and Feedback

If you discover any bugs, please keep them to yourself. Or submit a PR, we don’t care!

License

Webs License. Copyright 2010 Webs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages