<skwurl>
i keep getting a " #<Note::ActiveRecord_Relation:0x00007fc275694670> " type thing on my view in this app. ive confirmed that i am savinmg data to the db, but i cant get it to come out onto my view right. amu insight?
<skwurl>
i tried .to_s all over
Inline has quit [Quit: Leaving]
agent_white has quit [Quit: leaving]
mattraibert has joined #ruby
mattraibert has quit [Client Quit]
<tbuehlmann>
skwurl: can you gist what you're trying to do?
<tbuehlmann>
ah, you're already getting help over at #RubyOnRails, nvm
OrangeManBad has quit [Ping timeout: 260 seconds]
za1b1tsu has joined #ruby
NpcOrangeManBad has joined #ruby
MoritaShinobu has joined #ruby
donofrio_ has quit [Read error: Connection reset by peer]
donofrio_ has joined #ruby
d^sh has quit [Ping timeout: 244 seconds]
d^sh has joined #ruby
m0nty is now known as KoBuzz
mangold has quit [Quit: This computer has gone to sleep]
aupadhye has joined #ruby
samort7 has quit [Quit: Leaving]
tdy has quit [Ping timeout: 245 seconds]
za1b1tsu has quit [Read error: Connection reset by peer]
Nicmavr has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
Nicmavr has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
cd has quit [Quit: cd]
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 246 seconds]
Synthead has joined #ruby
KoBuzz is now known as m0nty
crankhar1er has quit [Ping timeout: 244 seconds]
crankharder has joined #ruby
<Cork>
anyone know if it is possible to create a OpenSSL::PKey::EC from a OpenSSL::BN instance?
guardian has joined #ruby
kujira has quit []
za1b1tsu has quit [Quit: WeeChat 2.2]
mangold has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
skwurl has quit [Quit: WeeChat 2.2]
SteenJobs has joined #ruby
Tuor has joined #ruby
tris- has quit [Ping timeout: 268 seconds]
voolik has joined #ruby
clemens3 has joined #ruby
rubydoc has quit [Ping timeout: 245 seconds]
mangold has quit [Quit: This computer has gone to sleep]
im0nde has quit [Ping timeout: 250 seconds]
clemens3_ has joined #ruby
clemens3 has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
aupadhye has quit [Ping timeout: 246 seconds]
venmx has joined #ruby
mochiyoda has quit [Quit: Konversation terminated!]
SteenJobs has quit [Quit: SteenJobs]
ur5us has joined #ruby
ansraliant has quit [Quit: My planet needs me]
venmx has quit [Ping timeout: 264 seconds]
Caerus has quit [Ping timeout: 276 seconds]
Caerus has joined #ruby
MoritaShinobu has quit [Ping timeout: 252 seconds]
Tuor has quit [Ping timeout: 246 seconds]
mangold has joined #ruby
lunarkitty7 has quit [Ping timeout: 276 seconds]
venmx has joined #ruby
lunarkitty7 has joined #ruby
MoritaShinobu has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
voolik has quit [Quit: Taking a nap...]
ur5us has quit [Read error: Connection reset by peer]
ineb has quit [Quit: WeeChat 2.2]
Guest75806 has quit [Remote host closed the connection]
Guest75806 has joined #ruby
aupadhye has joined #ruby
blackmesa has joined #ruby
NpcOrangeManBad has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 244 seconds]
Synthead has quit [Ping timeout: 240 seconds]
im0nde has joined #ruby
Synthead has joined #ruby
aupadhye has quit [Remote host closed the connection]
aupadhye has joined #ruby
Synthead has quit [Ping timeout: 246 seconds]
voolik has joined #ruby
Freshnuts has joined #ruby
xfbs has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
Tuor has joined #ruby
xfbs has quit [Quit: afk]
s2013 has joined #ruby
rkoller has joined #ruby
s2013 has quit [Max SendQ exceeded]
_joes__ has joined #ruby
akem__ has quit [Ping timeout: 245 seconds]
akem has joined #ruby
xfbs has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
phaul has joined #ruby
roshanavand has joined #ruby
rubydoc has joined #ruby
vutral1 has quit [Ping timeout: 246 seconds]
despai has joined #ruby
Tuor has quit [Ping timeout: 244 seconds]
despai has quit [Quit: ...]
whysthatso has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
vutral1 has joined #ruby
roshanavand has joined #ruby
kurko_ has joined #ruby
whysthatso has quit [Quit: whysthatso]
Defenestrate has joined #ruby
despai has joined #ruby
kapil____ has joined #ruby
whysthatso has joined #ruby
mikecmpbll has joined #ruby
InfinityFye has joined #ruby
Defenestrate has quit [Quit: Leaving]
ralinux has joined #ruby
despai has quit [Quit: ...]
despai has joined #ruby
Freshnuts has quit [Quit: Leaving]
aupadhye has quit [Ping timeout: 245 seconds]
ralinux has quit [Remote host closed the connection]
cgfbee has quit [Quit: cgfbee]
Wojnar has joined #ruby
crankharder has quit [Remote host closed the connection]
Guest75806 has quit [Ping timeout: 276 seconds]
crankharder has joined #ruby
ldnunes has joined #ruby
aupadhye has joined #ruby
despai has quit [Quit: ...]
xfbs has quit [Quit: afk]
Guest75806 has joined #ruby
moei has joined #ruby
nexraf1_ has joined #ruby
mostlybadfly has joined #ruby
AJA4350 has joined #ruby
esrse has quit [Ping timeout: 245 seconds]
Wojnar has quit [Remote host closed the connection]
teclator has joined #ruby
nexraf1_ has quit [Quit: WeeChat 2.2]
rubydoc has quit [Remote host closed the connection]
despai has joined #ruby
nexraf1 has joined #ruby
cow[moo] has joined #ruby
rubydoc has joined #ruby
m0nty is now known as m0nty0ne
despai has quit [Quit: ...]
Guest75806 has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
bak1an has joined #ruby
Guest75806 has joined #ruby
dmitch has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
tdy has quit [Ping timeout: 245 seconds]
dnewkerk has quit [Ping timeout: 252 seconds]
dnewkerk has joined #ruby
tdy has joined #ruby
nowhere_man has joined #ruby
Guest75806 has quit [Ping timeout: 246 seconds]
apparition has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ph88 has joined #ruby
moei has quit [Ping timeout: 245 seconds]
kgutteridge has joined #ruby
kgutteridge has quit [Client Quit]
teclator has quit [Ping timeout: 264 seconds]
alem0lars has joined #ruby
dmitch has joined #ruby
Rapture has joined #ruby
dnewkerk has quit [Ping timeout: 250 seconds]
gregf_ has quit [Ping timeout: 256 seconds]
Inline has joined #ruby
Inside has joined #ruby
<Inside>
Guys. Guys.
<Inside>
I've been programming ruby for like.. 2 years now
<Inside>
And I just learned about keyword arguments to functions
<Inside>
:|
<Inside>
This saddens me a lot.
nowhere_man has quit [Ping timeout: 276 seconds]
GodFather has joined #ruby
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
<jhass>
yes, that's very sad indeed
<jhass>
btw ruby has no functions
nowhere_man has joined #ruby
_joes__ has quit [Quit: Connection closed for inactivity]
SuperLag has quit [Remote host closed the connection]
SuperL4g has quit [Quit: WeeChat 2.2]
<Eiam>
Inside: instead of being sad, be glad that ruby still has neat things to discover and explore after two years =) I love finding out about new stuff in ruby, even if its just 'new to me' and been around since 1.9 or whatever.
<Eiam>
true mastery eludes us, the teachers are also the students.
<baweaver>
The inmates run the asylum
mangold has quit [Quit: This computer has gone to sleep]
troulouliou_div2 has joined #ruby
<baweaver>
!!?! # => true
xfbs_ has joined #ruby
xfbs has quit [Ping timeout: 272 seconds]
<al2o3-cr>
{}.map { |a: 10, b: 5 | a + b } why does this not work?
<al2o3-cr>
{c:2}.map { |a: 10, b: 5 | a + b } but this does.
nowhere_man has joined #ruby
<phaul>
by not working... what do you mean?
<oz>
al2o3-cr: it seems to work quite well.
<al2o3-cr>
phaul: i'd would of thought the first one would return [15] too.
<phaul>
well, {} is empty... so...
<al2o3-cr>
yeah, maybe i was thinking the keyword args would still be passed.
<al2o3-cr>
now i see.
<Inside>
baweaver: augh what
<Inside>
oh I see, default keyword args in the block
ixti has joined #ruby
conta has quit [Quit: conta]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
<phaul>
I've just found codepad.org. I go and see if I can patch ruby[bot] to use it..
* phaul
building 2.3
<al2o3-cr>
phaul: it can use carc.in
akem__ has quit [Ping timeout: 240 seconds]
<al2o3-cr>
upto ruby 2.4 on there.
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
<al2o3-cr>
and it's reliable.
<phaul>
I patch it for that then
<al2o3-cr>
it seems eval.in is totally dead now.
<al2o3-cr>
nothing works on there anymore.
k0mpa has quit [Ping timeout: 256 seconds]
<phaul>
my 2.3 build failed... grrr
sauvin has quit [Read error: Connection reset by peer]
<Inside>
I've been reading Practical Object-Oriented Design: An Agile Primer Using Ruby lately and it's really throwing me for a loop about how I do stuff
<Inside>
I wish we had other people who work here so that I could do a code reiew of some sort :\
<apeiros_>
Inside: hm? what stops you from gisting your code here and ask for input?
apeiros_ is now known as apeiros
<baweaver>
Ohai apeiros
<baweaver>
welcome back
<apeiros>
o/ baweaver
thejs has quit [Ping timeout: 240 seconds]
<Inside>
apeiros: it's mostly high level architecture stuff
<Inside>
On a per method or per class level everything sort of works
<Inside>
but then when I go to extend it, it turns to mush since I hadn't thought of future uses for that code.
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
blackmesa1 has joined #ruby
beefjoe has quit [Quit: <3]
jacobherrington has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beefjoe has joined #ruby
wildermind has joined #ruby
<apeiros>
Inside: it is true that the likeliness for an answer increases with the example code being more concrete. but sometimes you'll also get good answers for mostly theoretical questions. of course you can also try to turn your theoretical question into a concrete one.
<orbyt_>
I've got a gem that i'm trying to uninstall via gem uninstall gem_name -v 1.5
<orbyt_>
However, afterwards running gem list gem_name still shows it as a local gem
<orbyt_>
how do I get rid of it?
<apeiros>
orbyt_: probably a different version. drop the -v.
thejs has joined #ruby
<orbyt_>
apeiros I was passing in the version listed in gem list
OrangeManBad has joined #ruby
<orbyt_>
Strangely without the version option it works
<orbyt_>
thanks
<apeiros>
it didn't show you multiple versions in `gem list`?
NpcOrangeManBad has joined #ruby
<orbyt_>
Nope
kurko_ has joined #ruby
<apeiros>
weird
<orbyt_>
Also, is there something going on with ruby gems? `gem install gem` is just hanging
<apeiros>
yeah, the docs of String# and Regexp#match are not explicit on this, but both methods only match once.
<apeiros>
i.e. those methods will stop testing the regex against the string after the first successful match
orbyt_ has quit [Client Quit]
<apeiros>
see String#scan for multiple matches
<ivanskie>
ooh
<ivanskie>
thank you
<apeiros>
btw., don't do this: `File.open(path).read`, this leaves dangling file descriptors. just use `File.read(path)`
<apeiros>
it's less code too
<ivanskie>
oOh yeaah.
<ivanskie>
oh super. thank you for the tip
<apeiros>
(if you really really want to explicitly use open, at least do it as `File.open(path, &:read)`, that uses a block which closes the descriptor again)
<ivanskie>
i rewrote that guy's awsp, all in bash script.. so it'd work on all our machines no matter their environment.
<ivanskie>
but now im writing a gem, sooo trying to build this into it, in ruby.
<ivanskie>
speaking of which.. I'm still not even sure if this is going to work. i need to figure out how to run the .sh script which will source file with new envars. to apply to original shell
<ivanskie>
argh headache
Rapture has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
Dbugger has quit [Remote host closed the connection]
orbyt_ has quit [Client Quit]
SeepingN_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thejs has quit [Ping timeout: 245 seconds]
tfitts has joined #ruby
<apeiros>
ivanskie: re sourcing env vars: remember you can only ever add env vars for *child* processes.
<tfitts>
is there a method that is similar to map but for a single object? I normally want this in the console when I'm looking at objects a few levels deep and want to pull out a few pieces of data from that
<apeiros>
tfitts: just call the method on it? o0
<phaul>
I am speculating of cource, but I think this is a confusion on objects vs hashes
<ivanskie>
right. so the way awsp dev is doing it, and how i replicated it in bash script. is.. I have an alias for 'source .myscript.sh' in .myscript.sh i show the menu, menu writes a temp file with exports. then .myscript.sh sources the temp file, deletes it, and exits.
<ivanskie>
awsp dev made his npm script actually be called _awsp in shell.. and the alias for awsp goes to his sh. file which launches the javascript based _awsp script for menu.
<phaul>
tfitts: can you show us an example of an object you would like to map on?
<ivanskie>
i guess i'll have to do the same but ruby. argh its messy.
<TheNet>
tfitts: also speculating: a = object; [a.foo, a.bar]
<tfitts>
po has many pois (alias for purchase_order_items), pois belongs to item, po.pois.item.the_method_here{|x| [x.id, x.sku, x.quantity}
ixti has quit [Quit: WeeChat 2.3]
<tfitts>
I realize I can do po.pois.map{|x| [x.item.id, x.item.sku, x.item.quantity]}
<tfitts>
but on occasion there are 2 or 3 levels deeper than pois, sometimes several words long. I'm mainly looking for it as a convenience but I would think it exists
<TheNet>
tfitts: why not what I suggested?
<baweaver>
Demeter weeps
<tfitts>
TheNet: yeah, that's more or less what I currently do
<tfitts>
it looks like instance_eval does what I want though
<baweaver>
Anyways, crypticisms aside, you probably want to reevaluate your code if you need to dig that deep to get the data you need.
kapil____ has quit [Quit: Connection closed for inactivity]
venmx has quit [Ping timeout: 245 seconds]
eckhardt has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<phaul>
Inside: it's an instance attribute nevertheless. you are placing self in front of it in instance methods
<phaul>
you can create class attributes like class X; class << self ; attr_accessor :x; end; end; X.x = 5;
ellcs has quit [Ping timeout: 264 seconds]
tdy has quit [Quit: WeeChat 2.2]
GodFather has quit [Ping timeout: 246 seconds]
<Inside>
hmm
<Inside>
so basically no point?
knight33 has joined #ruby
<phaul>
I can't see how a private accesor is different from accessing the instance variable
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul>
a custom method wrapping the access can make sense public or private, if you want to add more logic in there
<Inside>
Well, this book is recommending using attr_* classes since later on you can create those custom methods if needed without searching for everything that starts with a @
<Inside>
so I'm trying to puzzle through it and figure out just what it is that i'm getting out of it