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
zombor has joined #datamapper
zombor has quit [Changing host]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
Sylvain1 has quit [Quit: Leaving.]
kurko__ has quit [Quit: Computer has gone to sleep.]
kurko__ has joined #datamapper
endorama has joined #datamapper
endorama has quit [Client Quit]
v0n has joined #datamapper
rafaelfranca has quit [Remote host closed the connection]
snusnu has quit [Quit: Leaving.]
ckrailo has quit [Quit: Computer has gone to sleep.]
kurko__ has quit [Quit: Computer has gone to sleep.]
zombor has joined #datamapper
zombor has quit [Remote host closed the connection]
lnormous has quit [Ping timeout: 264 seconds]
Sylvain1 has joined #datamapper
Sylvain1 has quit [Quit: Leaving.]
v0n has quit [Ping timeout: 276 seconds]
rsim has joined #datamapper
rsim has quit [Read error: Operation timed out]
rsim has joined #datamapper
mikecmpbll has joined #datamapper
solnic has joined #datamapper
solnic has quit [Quit: Linkinus - http://linkinus.com]
solnic has joined #datamapper
<kapowaz> I've added a belongs_to relationship to a model that already has a few rows, but now DM is throwing an error about the column having null values… how can I work around that ?
solnic has quit [Quit: Leaving...]
solnic has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
solnic has quit [Remote host closed the connection]
solnic has joined #datamapper
solnic_ has joined #datamapper
solnic- has joined #datamapper
solnic_ has quit [Read error: Connection reset by peer]
solnic has quit [Read error: Connection reset by peer]
solnic- has quit [Read error: Connection reset by peer]
solnic has joined #datamapper
snusnu has joined #datamapper
mikecmpbll has joined #datamapper
mikecmpbll has quit [Ping timeout: 268 seconds]
mikecmpbll has joined #datamapper
snusnu has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
rafaelfranca has joined #datamapper
snusnu has joined #datamapper
mikecmpbll has joined #datamapper
v0n has joined #datamapper
kurko__ has joined #datamapper
solnic_ has joined #datamapper
solnic has quit [Read error: Connection reset by peer]
solnic_ has quit [Quit: Leaving...]
v0n has quit [Ping timeout: 248 seconds]
rafaelfranca has quit [Remote host closed the connection]
Ortuna has joined #datamapper
postmodern has quit [Quit: Leaving]
v0n has joined #datamapper
zombor has joined #datamapper
Ortuna has quit [Quit: IRC Leave]
v0n has quit [Ping timeout: 276 seconds]
zombor has quit [Read error: Connection reset by peer]
zombor has joined #datamapper
v0n has joined #datamapper
rafaelfranca has joined #datamapper
zombor has quit [Read error: Connection reset by peer]
zombor has joined #datamapper
solnic has joined #datamapper
lnormous has joined #datamapper
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #datamapper
endorama has joined #datamapper
kpwz has quit [Ping timeout: 240 seconds]
mbj has joined #datamapper
endorama has quit [Quit: Sto andando via]
<dkubb|away> kapowaz: you can add required: false to the declaration
dkubb|away is now known as dkubb
<kapowaz> dkubb: aha, I worked around it another way, but good to know :)
<kapowaz> btw can you have a default on a belongs_to relationship?
<dkubb> kapowaz: yeah, it's the same as a normal property, default: ->(resource, relationship) { ... }
<kapowaz> cool
<dkubb> well, except for getting the property you get the relationship object
<kapowaz> now excuse me whilst I have a heart attack.
<kapowaz> I sent my portfolio over to a potential employer and my VDS has just gone offline
kpwz has joined #datamapper
ckrailo has joined #datamapper
kpwz has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mbj has quit [Ping timeout: 264 seconds]
mbj has joined #datamapper
mbj has quit [Ping timeout: 264 seconds]
Sylvain2 has joined #datamapper
rsim has quit [Quit: Leaving.]
rsim has joined #datamapper
solnic has quit [Quit: Leaving...]
solnic has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
rsim has joined #datamapper
solnic has quit [Quit: Leaving...]
<onewheelskyward> VDS?
snusnu has quit [Quit: Leaving.]
<dkubb> virtual server?
<dkubb> no idea what the "D" stands for though
<onewheelskyward> That's why I asked.
<onewheelskyward> Virtual Domestic server? :)
snusnu has joined #datamapper
kpwz has joined #datamapper
<lnormous> Virtual Dedicated Server?
solnic has joined #datamapper
v0n has quit [Ping timeout: 268 seconds]
mralk3 has joined #datamapper
<mralk3> does anyone have a good site i can look at to learn how to import csv files into a sql database using data mapper?
<mralk3> google is coming up with a bunch of garbage
lnormous has quit [Ping timeout: 256 seconds]
<dkubb> !memo mbj would you mind checkout out https://github.com/mbj/mutant/pull/74 .. I think it's ready to merge. I'd rather see it merged in early and then small naming tweaks made later than holding it up for surface level stuff
<Cinchy> dkubb: Memo recorded for mbj.
<dkubb> mralk3: I would just use FasterCSV, parse each line of the CSV and use DM as normal to create it. I see lots of examples on stackoverflow
<dkubb> there's also stuff like this that could work, although I've not used them: https://github.com/szajbus/importer
<dkubb> I don't much like mixing in import logic into models tbh
v0n has joined #datamapper
<mralk3> alirght, i will take a look at fastercsv
<mralk3> thanks much
mbj has joined #datamapper
lnormous has joined #datamapper
v0n has quit [Quit: WeeChat 0.4.1]
v0n has joined #datamapper
<mbj> .
<Cinchy> mbj: [22m 31s ago] <dkubb> would you mind checkout out https://github.com/mbj/mutant/pull/74 .. I think it's ready to merge. I'd rather see it merged in early and then small naming tweaks made later than holding it up for surface level stuff
mbj has quit [Read error: Connection reset by peer]
mbj has joined #datamapper
rsim has quit [Quit: Leaving.]
mbj has quit [Read error: Connection reset by peer]
mbj has joined #datamapper
mbj has quit [Read error: Connection reset by peer]
postmodern has joined #datamapper
rtyler_ has joined #datamapper
rtyler has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 246 seconds]
rafaelfranca has quit [Remote host closed the connection]
rtyler_ is now known as rtyler
v0n has joined #datamapper
zombor has quit [Remote host closed the connection]
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
solnic has quit [Quit: Leaving...]
bobocopy has quit [Quit: Leaving.]
bobocopy has joined #datamapper
bobocopy has quit [Client Quit]
zombor has joined #datamapper
zombor has quit [Ping timeout: 248 seconds]
<_br_> Anyone have an idea how to turn an array into a DataMapper::Collection ?
<_br_> I ask because I want to leverage the nifty dm-pager and it requires a DataMapper::Collection I think.
<onewheelskyward> _br_ Yes. fill the array with DataMapper Resources. e.g. Model.all()
<_br_> onewheelskyward: I don't fully follow. The array already contains objects etc. How would I wrap these objects in Model.all() ?
<onewheelskyward> Well, my point is that the dm-pager expects datamapper resources.
<_br_> Hm
<onewheelskyward> If you already have an array, you should find a more generic pagination solution.
<_br_> I see, that makes sense
<onewheelskyward> Or, get your data from datamapper.
<onewheelskyward> There have to be a number of pagination gems out there.
<_br_> Not really possible unfortuantely, because I'm doing some complex sorting after getting some data from DM, hence the output being an array
<_br_> true that, thanks for the advice onewheelskyward. Really appreciate it!
<onewheelskyward> aaah interesting
<onewheelskyward> Can you sort it and leave the collection intact?
<_br_> Yes, you get my problem.
<onewheelskyward> Right, you'd have to recreate the collection.
<onewheelskyward> Hmm.
<_br_> exactly.
<_br_> I'm wondering how to get that baked, because each object is a DataMapper object but the surrounding array is not a DataMapper::Collection
<onewheelskyward> Perhaps you can use the methods directly? http://rubydoc.info/github/datamapper/dm-core/master/DataMapper/Collection
<_br_> hm, lets see
<onewheelskyward> oh..."A Collection should act like an Array in every way, except that it will attempt to defer loading until the results from the repository are needed.
<onewheelskyward> "
<onewheelskyward> I'd likely rethink it to either sort straight from the database or not us dm-pager.
<onewheelskyward> Since you already have the data you don't need the lazy loading.
<_br_> true
<namelessjon> I'm pretty sure you can #sort on a DM::Collection and it will be a collection still.
<_br_> I'm playing with different methods from DataMapper::Collection but seems different gem is probably better
<_br_> hm
<namelessjon> It will trigger the loading of the resources, but it will still be a collection.
<_br_> yes, maybe need to work with that instead
<_br_> Thanks for the feedback! I'm digging into this deeper now...
<onewheelskyward> Good luck. :)
<_br_> cheers! :)
kurko__ has quit [Quit: Computer has gone to sleep.]
zombor has joined #datamapper
zombor has quit [Ping timeout: 264 seconds]
dkubb has quit [Ping timeout: 260 seconds]
dkubb has joined #datamapper
mbj has joined #datamapper
dkubb|away has joined #datamapper
dkubb has quit [Ping timeout: 240 seconds]
dkubb|away is now known as dkubb