File tree Expand file tree Collapse file tree 1 file changed +3
-35
lines changed Expand file tree Collapse file tree 1 file changed +3
-35
lines changed Original file line number Diff line number Diff line change 33require 'dm-core'
44require 'dm-timestamps'
55require 'dm-validations'
6+ require 'rack/session/hashed_cookie'
67require Pathname ( __FILE__ ) . dirname . expand_path + "models/user"
78
89DataMapper . setup ( :default , "sqlite3://#{ Dir . pwd } /db/test.db" )
910DataMapper . auto_upgrade!
1011
11- class FeedLink
12- include DataMapper ::Resource
13-
14- property :id , Serial
15- property :url , String
16- property :title , String
17-
18- has n , :feed_link_taggings
19- has n , :feed_link_tags , :through => :feed_link_taggings
20- end
21-
22- class FeedLinkTagging
23- include DataMapper ::Resource
24-
25- property :id , Serial
26- property :user_id , Integer
27-
28- belongs_to :feed_link
29- belongs_to :feed_link_tag
30- belongs_to :user
31- end
32-
33- class FeedLinkTag
34- include DataMapper ::Resource
35-
36- property :id , Serial
37- property :name , String
38-
39- has n , :feed_link_taggings
40- has n , :feed_links , :through => :feed_link_taggings
41- end
42-
43- # change this to memcached
44- enable :sessions
45-
12+ disable :sessions
13+ use Rack ::Session ::HashedCookie , :secret => 'A1 sauce 1s so good you should use 1t on a11 yr st34ksssss'
4614
4715get '/' do
4816 login_required
You can’t perform that action at this time.
0 commit comments