This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yourapp::Application.config.session_store :cookie_store | |
Yourapp::Application.config.session = { | |
:key => '_yourapp_session', # name of cookie that stores the data | |
:domain => nil, # you can share between subdomains here: '.subdomain.com' | |
:expire_after => 1.month, # expire cookie | |
:secure => false, # for https its true | |
:httponly => true, # a measure against XSS attacks, prevent client side scripts from accessing the cookie | |
:secret => 'YOUR SECRET GOES HERE' # RUN RAKE SECRET to generate secret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ui-dialog --> | |
<div id="dialog-password-forget-form"> | |
<%= form_tag forgot_password_path, :id => "submit-forgot-password" do %> | |
<fieldset id="user-email"> | |
<p> | |
<label>Email address<span><%= email_field_tag :email, '', :id => "email" %></span></label> | |
</p> | |
</fieldset> | |
<% end %> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When requesting mobile you can set the request environment two ways | |
# @request.env['HTTP_ACCEPT'] = "mobile" | |
# OR | |
# @request.accept = "mobile" | |
require 'test_helper' | |
class HomeControllerTest < ActionController::TestCase | |
test "should get mobile index" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create permissions to populate the permissions table with. | |
permissions = Forumpermission.create([ | |
{:name => 'view', :description => 'view index', :bitfield => 1}, | |
{:name => 'search', :description => 'search forum', :bitfield => 2}, | |
{:name => 'viewtopics', :description => 'view topics', :bitfield => 4}, | |
{:name => 'createtopics', :description => 'create topics', :bitfield => 8}, | |
{:name => 'edittopic', :description => 'edit own topic', :bitfield => 16}, | |
{:name => 'deletetopic', :description => 'delete own topic', :bitfield => 32}, | |
{:name => 'editothertopics', :description => 'edit other topics', :bitfield => 64}, | |
{:name => 'deleteothertopics', :description => 'delete other topics', :bitfield => 128}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# my forum software is called kirin | |
# this is an example routes engine file | |
# to see what the routes look like, just run rake routes from your app | |
Rails.application.routes.draw do | |
mount_at = Kirin::Engine.config.mount_at | |
match mount_at => 'kirin/widgets#index' | |
# administrative forum control panel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OLD Routes.rb file - showing changes | |
#Rails.application.routes.draw do |map| | |
Rails.application.routes.draw do | |
mount_at = Cheese::Engine.config.mount_at | |
match mount_at => 'cheese/widgets#index' | |
# map.resources :widgets, :only => [ :index, :show ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql: | |
adapter: mysql | |
database: cheese_plugin_test | |
username: | |
password: | |
host: localhost | |
port: 3306 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
BODY, TD {font-family: verdana,arial,helvetica,sans-serif;font-size: 12px;color: #000000;} | |
LI {line-height: 120%;} | |
UL.smallBorder {margin:10px 5px 10px 20px;} | |
LI.smallBorderLi {margin:0px 0px 5px 0px;} | |
UL.Narrow {margin:10px 5px 0px 40px;} | |
HR.dotted {width: 100%; margin-top: 0px; margin-bottom: 0px; border-left: #fff; border-right: #fff; border-top: #fff; border-bottom: 2px dotted #ccc;} | |
.smallEmphasis {font-family: verdana,arial,helvetica,sans-serif;font-size: 11px;font-weight: bold;color: #000000;} | |
.refund {font-family: verdana,arial,helvetica,sans-serif;font-size: 10pt;font-weight: bold;color: #000000;} | |
.serifBig {font-family: serif;font-size: 20px;font-weight: bold;color: #000000;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" > | |
<head> | |
<meta name="Description" content=""/> | |
<meta name="KeyWords" content=""/> | |
<meta http-equiv="X-UA-Compatible" content="IE=8"/> | |
<meta http-equiv="Content-Style-Type" content="text/css" /> | |
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | |
<title>Mailbag</title> | |
<%= stylesheet_link_tag('mailbag.css') %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
padding : 0; | |
margin : 0; | |
} | |
body { | |
color : #000000; | |
margin : 0; | |
padding : 0; | |
background : url('../images/bg.gif') repeat-y; | |
background-position : center; |