dkubb changed the topic of #datamapper to: Datamapper v1.2.0 | Mailing List: http://is.gd/aa9D | Logs: http://is.gd/qWAL7V | DataMapper 2 Renamed to ROM, see #rom-rb for development
snusnu has joined #datamapper
ckrailo has joined #datamapper
snusnu has quit [Quit: Leaving.]
v0n has joined #datamapper
jeremyevans has quit [Ping timeout: 252 seconds]
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
stepheneb has joined #datamapper
stepheneb has quit [Changing host]
stepheneb has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
jeremyevans has joined #datamapper
zombor has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has quit [Remote host closed the connection]
v0n has quit [Read error: Connection reset by peer]
zombor has joined #datamapper
zombor has joined #datamapper
zombor has quit [Ping timeout: 260 seconds]
rsim has joined #datamapper
v0n has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
mtrisoline has joined #datamapper
_pol has joined #datamapper
yeban has joined #datamapper
v0n has quit [Ping timeout: 246 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
rsim has joined #datamapper
dkubb has joined #datamapper
stepheneb has quit [Quit: stepheneb]
rsim has quit [Quit: Leaving.]
mbj has quit [Read error: Operation timed out]
rsim has joined #datamapper
mtrisoline has quit [Quit: mtrisoline]
brianpWins has joined #datamapper
brainopia has joined #datamapper
mbj has joined #datamapper
Ortuna has quit [Ping timeout: 252 seconds]
dkubb has quit [Ping timeout: 240 seconds]
_pol has quit [Remote host closed the connection]
rsim has quit [Quit: Leaving.]
brainopia has quit [Quit: brainopia]
rsim has joined #datamapper
mikecmpbll has joined #datamapper
campezzi has joined #datamapper
snusnu has joined #datamapper
snusnu has quit [Quit: Leaving.]
snusnu has joined #datamapper
Ortuna has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
snusnu has quit [Quit: Leaving.]
snusnu has joined #datamapper
knowtheory has quit [Quit: Computer has gone to sleep]
campezzi has quit [Quit: campezzi]
zombor has joined #datamapper
zombor has joined #datamapper
postmodern has quit [Quit: Leaving]
knowtheory has joined #datamapper
snusnu1 has joined #datamapper
_pol has joined #datamapper
snusnu1 has quit [Client Quit]
snusnu has quit [Ping timeout: 256 seconds]
snusnu1 has joined #datamapper
snusnu1 has quit [Client Quit]
snusnu has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mtrisoline has joined #datamapper
v0n has joined #datamapper
banditron has joined #datamapper
carlad has joined #datamapper
tyranja has joined #datamapper
<carlad> can anyone here help with a datamapper validation question regarding Dates
<carlad> ?
khaase has joined #datamapper
<khaase> hi
<carlad> hi khaase
<carlad> property :released_on, Date
svenfuchs has joined #datamapper
<carlad> I am using validate_presence_of to validate that released_on is a Date type
<khaase> carlad: try using validates_primitive_type_of instead
<Cinchy> [URL] Module: DataMapper::Validations::ValidatesPrimitiveType — Documentation for dm-validations (1.2.0)
<carlad> but I want to have a custom error message displayed
<khaase> validates_primitive_type_of :released_on, Date, message: "..."
<khaase> maybe
<carlad> (i thought you said you had no idea khaase )
<khaase> carlad: I didn't, but then I got back to my machine and googled for it ;)
<carlad> that works - but we still have the default error message displaying
<carlad> "Released on must be of type Date"
<carlad> which is generated by the validates_presence_of
<carlad> despite the fact that I have also added a custom message there
<carlad> validates_presence_of :released_on, message: "Release Date must not be blank"
mtrisoline has left #datamapper [#datamapper]
mtrisoline has joined #datamapper
coxandrew has joined #datamapper
<carlad> btw thx Cinchy
_pol has quit [Remote host closed the connection]
_pol has joined #datamapper
_pol has quit [Remote host closed the connection]
<khaase> carlad: Cinchy is a bot I think
<mbj> carlad: Cinchy is a bot yeah :D
<mbj> But he deserves some thx :D
ckrailo has joined #datamapper
mikecmpbll has joined #datamapper
dkubb has joined #datamapper
<carlad> i don't care I still want to thank it
<carlad> as mjb says...
<carlad> sorry mbj
<carlad> and anyway I still need help with customising error messaged
<carlad> *messages
<carlad> Cinchy only got me so far...
v0n has quit [Quit: WeeChat 0.4.1]
v0n has joined #datamapper
abuiles has quit [Read error: Operation timed out]
kapowaz has quit [Ping timeout: 245 seconds]
franckverrot has quit [Ping timeout: 264 seconds]
didlix has quit [Ping timeout: 245 seconds]
yeban has quit [Ping timeout: 264 seconds]
grandy has quit [Ping timeout: 264 seconds]
brianpWins has quit [Quit: brianpWins]
bobocopy has joined #datamapper
yeban has joined #datamapper
rsim has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bobocopy has quit [Quit: Leaving.]
svenfuchs has quit [Remote host closed the connection]
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
didlix has joined #datamapper
<mtrisoline> I was wondering if someone might be able to point me to some resources on handling live migrations with data mapper
brianpWins has joined #datamapper
bobocopy has joined #datamapper
rsim has joined #datamapper
bobocopy has quit [Quit: Leaving.]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
rsim has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #datamapper
grandy has joined #datamapper
abuiles has joined #datamapper
franckverrot has joined #datamapper
bobocopy has joined #datamapper
kapowaz has joined #datamapper
v0n has quit [Ping timeout: 264 seconds]
bobocopy is now known as akasper
v0n has joined #datamapper
dkubb has joined #datamapper
v0n has quit [Read error: Operation timed out]
v1n has joined #datamapper
snusnu has quit [Quit: Leaving.]
snusnu1 has joined #datamapper
snusnu1 has quit [Client Quit]
snusnu1 has joined #datamapper
brianpWins has quit [Quit: brianpWins]
carlad has quit [Ping timeout: 260 seconds]
brianpWins has joined #datamapper
v1n has quit [Quit: WeeChat 0.4.1]
v0n has joined #datamapper
akasper has quit [Quit: Leaving.]
bobocopy has joined #datamapper
knowtheo1y has joined #datamapper
knowtheory has quit [Ping timeout: 268 seconds]
knowtheory has joined #datamapper
carlad has joined #datamapper
mbj has quit [Quit: leaving]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
carlad has quit [Ping timeout: 264 seconds]
v0n has quit [Ping timeout: 264 seconds]
bobocopy has quit [Quit: Leaving.]
carlad has joined #datamapper
carlad has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #datamapper
mtrisoline has quit [Quit: mtrisoline]
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #datamapper
luke__ has joined #datamapper
gix has quit [Ping timeout: 264 seconds]
_pol has joined #datamapper
<luke__> I'm just getting started with datamapper, and am connecting my rack app to my postgres database on heroku. If I do Model.create(:foo => "bar"), then a new record is created in my database, but none of the fields save. If I call .saved? it returns true, but nothing I do ever changes the database, with the exception of calling .create creating a new blank record
<luke__> Does this sound like a common problem - something obvious I could be missing?
gix has joined #datamapper
<onewheelskyward> luke__ Try calling .valid and then looking for model.errors.
<onewheelskyward> sorry, .valid?
<luke__> u.valid? also returns true
<onewheelskyward> That's odd.
<onewheelskyward> Are you sure you're connected to the database you think you're connected to?
<onewheelskyward> Oh, Heroku.
<luke__> Yeah
<luke__> So it creates a blank record
<luke__> and returns the id correctly
<luke__> but just nothing else saves
<luke__> It's my first time using datamapper and heroku, so I could definitely be missing something obvious
bhaak has quit [Read error: Operation timed out]
<onewheelskyward> oh
<onewheelskyward> check your types.
<onewheelskyward> I've had to .to_i and .to_s a bunch of times to get things to save.
<onewheelskyward> For instance, saving an integer from the parameters list won't work without an integer conversion.
<luke__> Hmm, that doesn't seem to make a difference unfortunately
<luke__> I'm making all the calls through racksh, so maybe there's a problem with that
rsim has joined #datamapper
bhaak has joined #datamapper
<luke__> nope, that's not the issue
rsim has quit [Ping timeout: 241 seconds]
<luke__> OK, so I turned logging on, and I see this
<luke__> >> User.create(:email => "foo@bar.com")
<luke__> ~ (0.119341) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
<luke__> So it seems that datamapper isn't telling the database to do anything, except create a record with blank values. The question is - why? :)
<onewheelskyward> If you output a u.inspect before the save, does it show your values?
brianpWins has quit [Quit: brianpWins]
dkubb has joined #datamapper
<luke__> yes
<luke__> Ruby knows the values, they're just not being saved
<onewheelskyward> It sounds like they're getting parsed out.
<onewheelskyward> Is there an accompanying update statement in the logs?
<luke__> nope
<luke__> Gimme a sec - I'll do a pastebin
<onewheelskyward> Does the returned object in that User.create line have the email?
<onewheelskyward> ok.
<luke__> yes, the returned object has the email
<luke__> Hopefully that shows everything
snusnu1 has quit [Quit: Leaving.]
snusnu has joined #datamapper
<onewheelskyward> Does it work locally, before heroku deployment?
brianpWins has joined #datamapper
<luke__> The app is running locally, it's just connecting to a heroku database
<onewheelskyward> What happens if you connect to a local database?
<luke__> I haven't tried! Let me see...
<luke__> same problem
<luke__> I'm using Ruby 2.0 - I'm gonna switch to 1.9.3 and see if that makes a differnce
dward has joined #datamapper
<dward> I'm getting inconsistent data reads using datamapper with the postgres driver.
<dward> A select will return a query object but every row in the row array will be the same.
<dward> Using the logger and running the exact query in postgres returns the correct results.
<dward> The first row in the query seems to be the repeated result in the datamapper response
<dward> I'm pretty sure this is a bug so i'll write up and submit a bug report when in the next couple of days if nobody has any extra input. postgres version 9.1.
<luke__> onewheelskyward: Same thing with 1.9.3. Really weird. I'll play a round a bit more I guess and see if I can find out what's going on
<onewheelskyward> Real time debugging for the win
<luke__> heh, first day at the new job :)
mtrisoline has joined #datamapper