adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
Tuor has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Tuor has joined #ruby
FetidToot has joined #ruby
FetidToot7 has joined #ruby
FetidToot has quit [Ping timeout: 248 seconds]
FetidToot7 is now known as FetidToot
noa has quit [Quit: Konversation terminated!]
FetidToot9 has joined #ruby
FetidToot has quit [Ping timeout: 248 seconds]
FetidToot9 is now known as FetidToot
xuochi has quit [Quit: leaving]
Bounga has quit [Ping timeout: 252 seconds]
rob has quit [Ping timeout: 248 seconds]
TCZ has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
TCZ has quit [Quit: ...]
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot has joined #ruby
FetidToot4 has joined #ruby
FetidToot has quit [Ping timeout: 252 seconds]
FetidToot4 is now known as FetidToot
bandithijo has quit [Quit: WeeChat 3.2]
roadie has joined #ruby
jpw has joined #ruby
Milos has quit [Ping timeout: 268 seconds]
Milos has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
neshpion has quit [Quit: neshpion]
nirix has joined #ruby
VoidNoir0 has quit [Quit: Ping timeout (120 seconds)]
roadie has joined #ruby
pwnd_sfw has quit [Ping timeout: 252 seconds]
pwnd_sfw has joined #ruby
thad_the_man has quit [Ping timeout: 250 seconds]
hololeap has quit [*.net *.split]
aeris has quit [*.net *.split]
thad_the_man has joined #ruby
_ht has joined #ruby
aeris has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
_ht has quit [Remote host closed the connection]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
jpw_ has joined #ruby
jpw has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
wmoxam has quit [Ping timeout: 255 seconds]
wmoxam has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
noa has joined #ruby
elf_fortrez has joined #ruby
nirix has quit [Quit: Connection closed for inactivity]
ua_ has joined #ruby
ua_ has quit [Quit: Leaving]
ua_ has joined #ruby
ua_ has quit [Read error: Connection reset by peer]
<EdwardIII> adam12: mmm no i couldn't get it going, so i just put it in the :development, :test section for now (so it gets installed in both), then it works
<EdwardIII> guess it doesn't hurt to have it available in the dev env too
thad_the_man has quit [Ping timeout: 250 seconds]
kiki_lamb has quit [Quit: Lost terminal]
ur5us has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
WhereIsMySpoon has joined #ruby
<WhereIsMySpoon> Hi there - Ruby question here, I want to do array.sort_by, but my list of fields to sort by are not things I want to hard code, they're passed params. From what I know, you're supposed to do something like this: array.sort_by { |e| [e['foo'], e['bar']] }, but I dont know how to pass in a list of fields to sort_by so that it's dynamic rather than
<WhereIsMySpoon> hardcoded fields.
elf_fortrez has quit [Ping timeout: 246 seconds]
<adam12> WhereIsMySpoon: is the list of fields to sort by dynamic for each record in the array, or just in general?
<WhereIsMySpoon> adam12 its dynamic each time the function this is in, is called, but when the function is called with say sort fields ['foo', 'bar'], i want to sort by first field foo, then field bar, for every record in the array
moldorcoder7 has quit [Ping timeout: 240 seconds]
<adam12> WhereIsMySpoon: fields = ['foo', 'bar']; array.sort_by { |e| e.values_at(fields) }
<adam12> WhereIsMySpoon: maybe something like that?
<WhereIsMySpoon> oh, hm...thats easy enough...
<WhereIsMySpoon> what if i wanted to add search direction to each field?
<WhereIsMySpoon> say I have:
<WhereIsMySpoon> fields = {foo: 'desc', bar: 'asc' }
<adam12> WhereIsMySpoon: Offhand I'm not sure, but you'd possibly have to negate the value that you retrieve, if that field is supposed to be reversed.
<WhereIsMySpoon> i might have just stumbled onto something useful on SO
<adam12> Yeah that looks right.
<WhereIsMySpoon> Thanks though, your answer helped me search better
<adam12> WhereIsMySpoon: yw!
RougeR has joined #ruby
RougeR has quit [Client Quit]
ur5us has quit [Ping timeout: 250 seconds]
jpw_ has quit [Ping timeout: 240 seconds]
Tempesta has quit [Quit: AdiIRC is updating to v4.1 Beta Build (2021/08/25 UTC) 64 Bit]
Tempesta has joined #ruby
camel has joined #ruby
nik has joined #ruby
WhereIsMySpoon has quit [Quit: Client closed]
camel has quit [Quit: Leaving]
camel has joined #ruby
camel has quit [Client Quit]
moldorcoder7 has joined #ruby
noa has quit [Quit: Konversation terminated!]
roadie has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
moldorcoder7 has quit [Ping timeout: 250 seconds]
moldorcoder7 has joined #ruby
nik has quit [Quit: Leaving]
thad_the_man has joined #ruby
reset has quit [Quit: reset]
bit4bit has joined #ruby
thad_the_man has quit [Read error: Connection reset by peer]
bit4bit has quit [Ping timeout: 252 seconds]
Oxfuxxx has quit [Ping timeout: 252 seconds]
rob has joined #ruby
Oxfuxxx has joined #ruby
SuperLag has joined #ruby
Oxfuxxx has quit [Ping timeout: 250 seconds]
neshpion has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
roadie has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
elf_fortrez has joined #ruby
Oxfuxxx has joined #ruby
benjaminoakes has joined #ruby
SuperLag has quit [Remote host closed the connection]
SuperLag has joined #ruby
roadie has joined #ruby
Oxfuxxx has quit [Ping timeout: 248 seconds]
Oxfuxxx has joined #ruby
Oxfuxxx has quit [Ping timeout: 240 seconds]
_ht has joined #ruby
fdan has joined #ruby
<fdan> Hi there, is there something like ruby on node
jpw has joined #ruby
rob has quit [Ping timeout: 252 seconds]
elf_fortrez has quit [Quit: Client closed]
jpw_ has joined #ruby
VoidNoir0 has joined #ruby
jpw has quit [Ping timeout: 248 seconds]
jpw_ is now known as jpw
fdan has quit [Ping timeout: 246 seconds]
jpw has quit [Ping timeout: 240 seconds]
FetidToot has quit [Read error: Connection reset by peer]
FetidToot has joined #ruby
mrkz_c has quit [Quit: Connection closed for inactivity]
jpw has joined #ruby
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
FetidToot has quit [Read error: Connection reset by peer]
FetidToot has joined #ruby
Oxfuxxx has joined #ruby
FetidToot has quit [Ping timeout: 250 seconds]
jpw_ has joined #ruby
jpw has quit [Ping timeout: 240 seconds]
FetidToot has joined #ruby
orbyt has joined #ruby
FetidToot3 has joined #ruby
kiki_lamb has joined #ruby
FetidToot has quit [Ping timeout: 252 seconds]
FetidToot3 is now known as FetidToot
lessless has quit [Read error: Connection reset by peer]
lessless has joined #ruby
fdan has joined #ruby
<fdan> hi ruby and rails - are they the same?
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
<kaleido> rails is a ruby gem
benjaminoakes has quit [Quit: Client closed]
fdan has quit [Ping timeout: 246 seconds]
skali has joined #ruby
skali has quit [Client Quit]
noa has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
_ht has quit [Remote host closed the connection]
shokohsc has quit [Ping timeout: 250 seconds]
Oxfuxxx has quit [Quit: leaving]
Oxfuxxx has joined #ruby
shokohsc has joined #ruby
roadie has joined #ruby
benjaminoakes has joined #ruby
cybniv has joined #ruby
niv has quit [Ping timeout: 250 seconds]
jpw_ has quit [Remote host closed the connection]
FetidToot8 has joined #ruby
jpw has joined #ruby
JayDoubleu_ has joined #ruby
FetidToot has quit [Ping timeout: 240 seconds]
FetidToot8 is now known as FetidToot
ccooke_ has joined #ruby
sixecho1 has joined #ruby
ule_ has joined #ruby
JayDoubleu has quit [Ping timeout: 276 seconds]
ule has quit [Ping timeout: 276 seconds]
marahin has quit [Ping timeout: 276 seconds]
sixecho has quit [Ping timeout: 276 seconds]
ccooke has quit [Remote host closed the connection]
JayDoubleu_ is now known as JayDoubleu
marahin has joined #ruby
FetidToot has quit [Quit: Ping timeout (120 seconds)]
FetidToot has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
jpw has quit [Remote host closed the connection]
FetidToot8 has joined #ruby
ur5us has joined #ruby
FetidToot has quit [Ping timeout: 248 seconds]
FetidToot8 is now known as FetidToot
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
cybniv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
mrkz_c has joined #ruby
niv has joined #ruby
niv has quit [Read error: Connection reset by peer]
swaggboi has quit [Quit: C-x C-c]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
Dooky has joined #ruby
Dooky has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reset has joined #ruby
swaggboi has joined #ruby
roadie has joined #ruby
benjaminoakes has quit [Quit: Client closed]
noa has quit [Quit: Konversation terminated!]
roadie has quit [Ping timeout: 240 seconds]
rob has joined #ruby
aighearach_ has joined #ruby
aighearach has quit [Ping timeout: 258 seconds]
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
brw has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
bandithijo has joined #ruby
splud has quit [Ping timeout: 252 seconds]
bandithijo has quit [Client Quit]
steinomead has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
splud has joined #ruby