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
campezzi has quit [Quit: campezzi]
_pol has quit [Remote host closed the connection]
jeremyevans_ has quit [Ping timeout: 264 seconds]
_pol_ has joined #datamapper
_pol_ has quit [Remote host closed the connection]
jeremyevans has joined #datamapper
zombor has quit [Remote host closed the connection]
<xybre> What about practively selecting only the attributes you want?
<xybre> oh I'm lagged bad.
_pol has joined #datamapper
zombor has joined #datamapper
zombor has quit [Ping timeout: 256 seconds]
bobocopy has joined #datamapper
zombor has joined #datamapper
_pol has quit [Remote host closed the connection]
Ortuna has joined #datamapper
_pol has joined #datamapper
zombor has quit [Remote host closed the connection]
mtrisoline has joined #datamapper
mtrisoline has quit [Ping timeout: 248 seconds]
mtrisoline has joined #datamapper
rsim has joined #datamapper
mtrisoline has quit [Ping timeout: 264 seconds]
rsim has quit [Ping timeout: 240 seconds]
snusnu1 has quit [Quit: Leaving.]
mbj has joined #datamapper
bhaak has quit [Ping timeout: 246 seconds]
bhaak has joined #datamapper
mbj has quit [Ping timeout: 240 seconds]
rsim has joined #datamapper
shingara1 is now known as shingara
mbj has joined #datamapper
v0n has joined #datamapper
v0n has quit [Ping timeout: 260 seconds]
mbj has quit [Ping timeout: 256 seconds]
mbj has joined #datamapper
rsim has quit [Quit: Leaving.]
solnic has joined #datamapper
_pol has quit [Remote host closed the connection]
_pol has joined #datamapper
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
_pol has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
rsim has joined #datamapper
mbj has quit [Read error: Connection reset by peer]
viranch has joined #datamapper
viranch_ has quit [Ping timeout: 276 seconds]
zombor has joined #datamapper
snusnu has joined #datamapper
zombor has quit [Remote host closed the connection]
franckverrot_ is now known as franckverrot
solnic has quit [Quit: Leaving...]
snusnu has quit [Quit: Leaving.]
mbj has joined #datamapper
mbj has quit [Read error: Connection reset by peer]
mikecmpbll has joined #datamapper
mbj has joined #datamapper
postmodern has quit [Remote host closed the connection]
snusnu has joined #datamapper
v0n has joined #datamapper
bobocopy has quit [Quit: Leaving.]
zombor has joined #datamapper
zombor has joined #datamapper
banditron has quit [Remote host closed the connection]
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
zombor has joined #datamapper
zombor has quit [Changing host]
mtrisoline has joined #datamapper
bhaak has quit [Ping timeout: 240 seconds]
bhaak has joined #datamapper
bobocopy has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
bobocopy is now known as akasper
knowtheory has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mtrisoline has quit [Remote host closed the connection]
_pol has joined #datamapper
DireFog has quit [Quit: No Ping reply in 180 seconds.]
DireFog has joined #datamapper
solnic has joined #datamapper
_pol_ has joined #datamapper
_pol has quit [Ping timeout: 276 seconds]
_pol_ is now known as _pol
_pol_ has joined #datamapper
rsim has quit [Quit: Leaving.]
zombor has quit [Remote host closed the connection]
_pol has quit [*.net *.split]
abuiles has quit [*.net *.split]
snusnu has quit [Quit: Leaving.]
lnormous has joined #datamapper
<lnormous> Is there a way to get DataMapper to read my initialize method on .create as well as .new?
<mbj> lnormous: "read my initialize method", I dont get this. :D
<lnormous> So I have an initialize method that taken an argument, and if I do Object.new(), I get a 'wrong number of arguments 0 for 1' error
<lnormous> but if I do Object.create(), it works, and I would like it not to
rsim has joined #datamapper
dkubb has joined #datamapper
<mbj> lnormous: I think shou need to refactor your initialize method :d
rsim has quit [Ping timeout: 240 seconds]
<lnormous> refactor how? I presume it's not being called, or it would throw an exception..
<mbj> lnormous: If you define a method that takes an arg and you want to be able to call it without an arg you need to change it.
zombor has joined #datamapper
zombor has joined #datamapper
<mbj> There is nothing more to add here. This is a ruby issue not a datamapper issue.
<lnormous> I think you have misunderstood my question. I want the create method to call initialize, and currently it isn't
zombor has quit [Remote host closed the connection]
zombor has joined #datamapper
<lnormous> The fact that .new fails without any arguments is the behaviour I want. The fact that create doesn't fail is the problem for me
<mbj> lnormous: okay, got it.
<mbj> lnormous: I dont know how dm1 internally implements .create
<mbj> Ideally you look into the source.
<lnormous> That's the next step, if no one here can help, yes...
<mbj> lnormous: I wasnt part of the team when dm1 was wrote, sorry.
<lnormous> No need to apologise! I'll just hang out here and see if anyone has any idea.
<mbj> this should explain it.
<mbj> It defaults to an empty attribute hash
<mbj> This will get passed into .new via _create.
namelessjon has quit [Quit: leaving]
<lnormous> hmm, OK
<lnormous> so even if you have a default value like initialize(arg = "foo"), it will be ignored and an empty hash passed instead
<mbj> lnormous: Generally you should not override the initializer.
<lnormous> OK, maybe I'll try and do what I want with hooks instead
<mbj> lnormous: Why dont use a service object?
<lnormous> mbj: That sounds interesting, but I'm not sure what you mean :)
<Cinchy> [URL] ruby - How can I have a DataMapper callback happen in a transaction? - Stack Overflow
<mbj> lnormous: Hooks are to "magic" :D
namelessjon has joined #datamapper
<lnormous> mbj: Great, I'll give it a read through and see what's gonna work best for my situation. Thanks for all your help!
<mbj> lnormous: np, feel free to revisit this project later: http://rom-rb.org/
<mbj> We are building ROM, the successor of dm-1 currently.
<lnormous> haha, now I can't even get before :create to work
<lnormous> Seems like it just isn't my day
<mbj> lnormous: Forget hooks. Hooks are quasi untestable, IMHO.
<mbj> As a concept.
<lnormous> This is such a simple thing I want to do - generate a token using SecureRandom.hex whenever a model is created
<lnormous> just before :create do self.token = SecureRandom.hex(32) end
<lnormous> If you recommend not using a custom initializer and not using hooks, then I'm running out of options
knowtheo1y has joined #datamapper
knowtheory has quit [Ping timeout: 264 seconds]
<mbj> lnormous: default
<mbj> property :foo, :default => proc { SecureRandom.hex }
<lnormous> ah, awesome
<mbj> lnormous: you should have told me about your case details eariler :D
<lnormous> It seems so
knowtheory has joined #datamapper
knowtheo1y has quit [Ping timeout: 256 seconds]
_pol_ has quit [Remote host closed the connection]
_pol has joined #datamapper
_pol has quit [Ping timeout: 240 seconds]
banditron has joined #datamapper
_pol has joined #datamapper
ChanServ has quit [shutting down]
ChanServ has joined #datamapper
_pol has quit [Remote host closed the connection]
solnic has quit [Quit: Leaving...]
_pol has joined #datamapper
_pol_ has joined #datamapper
_pol_ has quit [Remote host closed the connection]
_pol has quit [Ping timeout: 256 seconds]
rsim has joined #datamapper
_pol has joined #datamapper
postmodern has joined #datamapper
dkubb has quit [Quit: Linkinus - http://linkinus.com]
v0n has quit [Ping timeout: 240 seconds]
_pol has quit [Remote host closed the connection]
_br_- has quit [Remote host closed the connection]
_br_ has joined #datamapper
_pol has joined #datamapper
zombor has quit [Remote host closed the connection]
akasper has quit [Quit: Leaving.]
banditron has quit [Remote host closed the connection]
knowtheo1y has joined #datamapper
knowtheory has quit [Ping timeout: 256 seconds]
knowtheo1y has quit [Ping timeout: 260 seconds]
<mbj> !memo dkubb Nope, never saw spoon before, lemme dig deeper tomorrow.
<Cinchy> mbj: Memo recorded for dkubb.
mbj has quit [Ping timeout: 240 seconds]
knowtheory has joined #datamapper
mbj has joined #datamapper
bobocopy has joined #datamapper
bobocopy has quit [Quit: Leaving.]