Created
February 26, 2011 01:42
-
-
Save juliend2/844835 to your computer and use it in GitHub Desktop.
problem with session
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
require 'camping/session' | |
Camping.goes :APPNAME | |
module APPNAME | |
set :views, File.dirname(__FILE__) + '/views/' | |
include Camping::Session | |
end | |
module APPNAME::Models | |
class TABLENAME < Base;end | |
class FieldSetup < V 1.0 | |
def self.up | |
create_table TABLENAME.table_name do |t| | |
t.string :name | |
t.timestamps | |
end | |
end | |
def self.down | |
drop_table TABLENAME.table_name | |
end | |
end | |
end | |
module APPNAME::Helpers | |
def helpername | |
end | |
end | |
module APPNAME::Controllers | |
class Reset < R '/PATH' | |
def get | |
['joie', 'poulet'] | |
end | |
end | |
class Index <R '/' | |
def get | |
render :index | |
end | |
end | |
class Indexmonth <R '/rest/(.*)/' | |
def get(month) | |
render :index | |
end | |
end | |
end | |
def APPNAME.create | |
APPNAME::Models.create_schema | |
Camping::Models::Session.create_schema | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment