ruby-datamapper
How can I get Sinatra to return a record matching today's date?
M开发者_运维百科y Sinatra app is a collection of notes. Each note is assigned a (future) date when it should be published:[详细]
2023-04-13 07:52 分类:问答Ruby mysql mysql2 AND datamapper how to reconnect
I have something running constantly doing periodic queries. I have used both DataMapper (though I\'m doing raw SQL through it) and mysql2.[详细]
2023-04-10 03:43 分类:问答DataMapper filter records by association count
With the following model, I\'m looking for an efficient and straightforward way to return all of the Tasks that have 0 parent tasks (the top-level tasks, essentially).I\'ll eventually want to return t[详细]
2023-04-09 11:35 分类:问答DataMapper associations/validation causing save failure
So I\'m having some trouble with DataMapper and object associations. (Code provided at bottom). I\'m getting errors upon saving to the extent that some id\'s are not set, which I think has something t[详细]
2023-04-06 18:17 分类:问答DataMapper - why "has" and "belongs_to"?
I\'m just getting started with DataMapper and I\'m trying to figure out why you need to specify a has and a belongs_to.[详细]
2023-04-03 13:57 分类:问答Foreign keys and associations using DataMapper
I have read this page quite thoroughly: http://datamapper.org/docs/associations If the answer is on there, it\'s simply not expressed in a way I can understand.[详细]
2023-04-01 12:16 分类:问答Sinatra, DataMapper: No such table errors
Not sure why I am getting this error in my logs. This error happens every so often, but not consistently, and I\'m not sure why. Here\'s my code:[详细]
2023-03-30 07:05 分类:问答DataMapper first_or_create always set certain field?
I\'开发者_开发技巧m using the following with datamapper to create/get a new user from my db: user = User.first_or_create({:id => data[\'id\']})[详细]
2023-03-16 11:50 分类:问答What's the most efficient way to iterate through an entire table using Datamapper?
What\'s the most efficient way to iterate through an entire table using Datamapper? If I do this, does Datamapper try to pull the entire result set into memory before performing the iteration? Assum[详细]
2023-03-06 03:56 分类:问答Datamapper do_postgres gem error: "dyld: lazy symbol binding failed: Symbol not found: _PQsetdbLogin"
I\'m trying to run a Sinatra application with Datamapper and a Postgres db locally. I\'m on Mac OS X 10.6.7 and ruby 1.9.2 and each time I launch the application, I get the following error:[详细]
2023-03-05 11:25 分类:问答