« Back to channel list

#RubyOnRails - 07 April 2016

« Back 1 day Forward 1 day »
[00:00:51] RegulationD: has joined #RubyOnRails
[00:02:43] n008f4g_: has joined #RubyOnRails
[00:03:50] lemur: has joined #RubyOnRails
[00:06:06] GodFather: has joined #RubyOnRails
[00:07:46] Synthead: has joined #RubyOnRails
[00:09:28] neohunter: has joined #RubyOnRails
[00:10:41] owenjones: has joined #RubyOnRails
[00:11:09] ramfjord: has joined #RubyOnRails
[00:14:22] maxdoubt: has joined #RubyOnRails
[00:14:45] DragonPunch: has joined #RubyOnRails
[00:15:37] maxdoubt: pardon my lack of db experience… but when you run rake spec… it drops the test db (if it exists), then recreates it… but is there a migration that happens to recreate all the tables?
[00:16:37] Arcaire: Same migration that you use to create the tables in the first place.
[00:17:08] Cohedrin: has joined #RubyOnRails
[00:17:50] maxdoubt: i’m having an issue where rspec blows away the db, but the tables aren’t getting recreated (see my log) - https://gist.github.com/maxdoubt/e053428029b9af237cb69195daf390b5
[00:17:51] codyrobbins: has joined #RubyOnRails
[00:17:55] codyrobbins: has left #RubyOnRails: ()
[00:18:30] brentw: has joined #RubyOnRails
[00:18:48] codyrobbins: has joined #RubyOnRails
[00:19:12] rake_db_migrate: has joined #RubyOnRails
[00:19:48] codyrobbins: I’m not sure if this is an ActiveJob or a Resque question, but how can I get my jobs to output logging information to the Rails log? Anything logged from a job doesn’t seem to get output anywhere.
[00:21:31] one_zero: has joined #RubyOnRails
[00:23:06] SteenJobs: has joined #RubyOnRails
[00:27:37] d0nn1e: has joined #RubyOnRails
[00:28:19] blackmesa: has joined #RubyOnRails
[00:29:02] _Tariq_: has joined #RubyOnRails
[00:29:56] Ropeney: maxdoubt, trying running bundle exec rake db:test:prepare
[00:29:59] jenrzzz: has joined #RubyOnRails
[00:31:43] rake_db_migrate: has joined #RubyOnRails
[00:32:52] blackmesa: has joined #RubyOnRails
[00:33:58] srinidhi: has joined #RubyOnRails
[00:34:04] smathy: maxdoubt, it actually does a db:schema:load (I believe), doesn't run the migrations. Is your db/schema.* file in good stead?
[00:34:27] Seeq: has joined #RubyOnRails
[00:37:57] brentw: having an issue when i'm trying to add the @article.comments.size to the h3 header http://hastebin.com/dazolomide.coffee
[00:38:01] dannyguk: has joined #RubyOnRails
[00:39:18] krz: has joined #RubyOnRails
[00:41:16] smathy: brent_, !gist your Article and Comment models.
[00:41:16] helpa: brent_: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[00:42:27] flashpoint9: has joined #RubyOnRails
[00:42:56] smathy: brent_, seems like an odd error for that line though, as if you need to restart your app and kill spring.
[00:43:11] brentw: https://gist.github.com/brentgsw/62ad8d409aa76f1d6fe9eecb55612ecb thats the view
[00:43:54] brentw: smathy: is there a preferred way to restart the app?
[00:45:36] brentw: as well as kill spring? sorry new to rails, not sure what spring is even, reading now
[00:48:17] RegulationD: has joined #RubyOnRails
[00:48:40] _Tariq: has joined #RubyOnRails
[00:49:10] eyeamaye: has joined #RubyOnRails
[00:50:17] s2013: has joined #RubyOnRails
[00:50:29] brentw: not sure this has spring running as i tried bin/spring stop and got looks like there's no file/directory
[00:51:03] s2013: anyone knows why jsonbuilder would return null for any time?
[00:51:09] s2013: i also set the timezone to central but in rails console it still uses UTC
[00:53:51] Ropeney: brent_ can you gist your aticle model, comments model and related schema.rb?
[00:54:31] hxegon: has joined #RubyOnRails
[00:54:47] Ropeney: s2013, show your code :)
[00:55:01] hahuang65: has joined #RubyOnRails
[00:55:06] brentw: Ropeney, yes
[00:56:28] brentw: https://gist.github.com/brentgsw/62ad8d409aa76f1d6fe9eecb55612ecb
[01:00:12] dannyguk: has joined #RubyOnRails
[01:00:40] Ropeney: brent_, sorry; the controller too
[01:01:17] herbst: has joined #RubyOnRails
[01:01:49] brentw: Ropeney: https://gist.github.com/brentgsw/62ad8d409aa76f1d6fe9eecb55612ecb
[01:01:50] newbieuser: has joined #RubyOnRails
[01:05:09] _Tariq: has joined #RubyOnRails
[01:05:15] twilling: has joined #RubyOnRails
[01:05:49] Ropeney: brent_, unless articles helper is doing something funky, I'm not seeing your problem sorry
[01:06:57] duderonomy: has joined #RubyOnRails
[01:07:45] brentw: only thing articles helper has is a article_params require/permit method
[01:08:07] s2013: Ropeney what code? i removed the config.time_zone = 'Central Time (US & Canada)' and activerecord default timezone and it sent reuslts again but i want default time zone to be CDT
[01:08:23] brentw: Thanks for taking a look Ropeney
[01:08:25] Ropeney: Then its something weird and I can't spend much longer looking at it sorry
[01:08:41] bob434: has joined #RubyOnRails
[01:08:47] Ropeney: s2013: "anyone knows why jsonbuilder would return null for any time?" Seems your trying to do this and its returning null
[01:08:49] brentw: no worries, thanks for your time
[01:09:25] Cohedrin: has joined #RubyOnRails
[01:10:03] DLSteve: has joined #RubyOnRails
[01:10:09] s2013: trying to do what?
[01:11:40] s2013: brent_ what syour problem
[01:11:49] B1n4r10: has joined #RubyOnRails
[01:13:01] brentw: https://gist.github.com/brentgsw/62ad8d409aa76f1d6fe9eecb55612ecb at the very top of that gist is my show view, and when i add the (@article.comments.size) to the line, i get a NotMethodError for calling it on nil
[01:13:13] benlieb: has joined #RubyOnRails
[01:13:28] s2013: what does @articles.comments return
[01:13:42] Ropeney: brent_, you got a nomethod error calling name on nil
[01:14:23] brentw: when the error is raised, it shows params {id: 9}, so it should be pulling @article correctly as that is the article id
[01:14:46] Radar: Darmani: Not around much today. See if someone else can help you.
[01:14:48] Radar: ACTION disappears again
[01:14:49] s2013: does the article have any comments
[01:15:20] s2013: what does .count return
[01:15:21] brentw: Ropeney: i was confused on that, is it saying i called a method called "name"?
[01:15:31] brentw: instead fo size?
[01:15:34] brentw: let me try
[01:15:49] joaumg: has joined #RubyOnRails
[01:15:56] Ropeney: brent_, your original error was http://hastebin.com/dazolomide.coffee
[01:15:59] _Tariq: has joined #RubyOnRails
[01:16:12] Ropeney: specifically "undefined method `name' for nil:NilClass"
[01:16:37] brentw: correct, so is it saying i called #name on nil?
[01:16:48] Ropeney: it seems so, yes
[01:17:04] brentw: so i'm confused about what it's saying #name is
[01:17:48] brentw: anyways, changing it from .size to .count worked
[01:18:32] Gkj8899: has joined #RubyOnRails
[01:18:51] s2013: im confused to .. who mentioned name
[01:19:15] Ropeney: s2013, did you miss the hastebin?
[01:19:28] s2013: saw it now
[01:19:57] Darmani: Radar: yeah I figured that much.
[01:20:03] s2013: brent_ are you ok now?
[01:20:13] Darmani: I don't know anyone else though. They might bite me Q.Q
[01:20:25] s2013: anyone else just loves working w/ time zone?
[01:21:27] brentw: s2013, using .count solved the error, but still wouldn't mind trying to understand why that error was called
[01:21:37] brentw: if someone understands it
[01:21:40] s2013: look at the query it generated
[01:21:44] s2013: what version o rails
[01:22:02] s2013: and do you have counter_cache set to true?
[01:22:26] brentw: i did not do anythign w/a counter_cache
[01:22:55] s2013: wait one sec
[01:23:25] s2013: try going back to .size
[01:23:27] s2013: see what happens
[01:23:41] brentw: same error
[01:23:57] brentw: .length and .count seem tow ork
[01:24:28] Guest12: has joined #RubyOnRails
[01:25:07] s2013: hmm.. very werid
[01:25:20] s2013: Radar can probably give some insight
[01:25:58] s2013: are you creating a new record?
[01:26:48] smathy: brent_, ^C from your `rails server`, `spring stop` and then `ps aux | grep spring` and kill any others, then `rails server` to restart your server.
[01:27:38] p1k: has joined #RubyOnRails
[01:28:12] brentw: thanks smathy
[01:28:17] Radar: s2013: Radar isn't here today. Please leave a message after the tone.
[01:28:19] Radar: BEEEEEEEEEP
[01:28:30] Radar: Darmani: if anyone's mean I'll give 'em a boot tomorrow ;)
[01:28:36] Radar: ACTION is gone for realsies
[01:28:39] brentw: tried it, same error. seems .size just doesn't want to work, only .count/.length
[01:30:02] s2013: are you creating a new record brent_
[01:30:11] Cohedrin: has joined #RubyOnRails
[01:31:05] Inside: has joined #RubyOnRails
[01:31:05] Inside: has joined #RubyOnRails
[01:31:16] brentw: i don't believe so
[01:31:38] s2013: then its satan/hillary clinton/donald trump/illuminati's fault
[01:31:51] brentw: if i understand what a record is correctly
[01:32:26] brentw: its it was an article w/ comments already created, and viewing it w/ .size returned the error
[01:34:02] smathy: brent_, copy and paste the full request from Started ... to Completed out of you log/development.log into the gist.
[01:34:15] smathy: brent_, use the Add file button at the bottom of the gist please.
[01:36:54] brentw: smathy, not seeing an Add file button
[01:37:26] smathy: brent_, once you click "Edit" you will.
[01:37:54] brentw: what extension would you give terminal output?
[01:38:09] smathy: Try .log - I don't think there's anything.
[01:39:09] brentw: https://gist.github.com/brentgsw/62ad8d409aa76f1d6fe9eecb55612ecb the first portion of the output is w/ .size, the 2nd one is w/ .count for comparison
[01:39:48] flashpoint9: has joined #RubyOnRails
[01:43:39] manfrin: has joined #RubyOnRails
[01:46:01] Sadin: has joined #RubyOnRails
[01:46:35] Gkj8899: has joined #RubyOnRails
[01:47:46] mices: has joined #RubyOnRails
[01:49:35] maxdoubt: has joined #RubyOnRails
[01:50:12] smathy: brent_, still makes no sense, some gem probably.
[01:50:29] smathy: brent_, you should update to at least the latest in the 4.0 range.
[01:51:03] brentw: latest rails?
[01:52:45] pawnbox: has joined #RubyOnRails
[01:53:45] brentw: well thanks for looking, strange that it's not working
[01:53:53] brentw: but glad i got it working
[01:54:01] brentw: thanks for the help all
[01:54:10] mices: my database commit rolls back with carriewave uploads, my model seemingly has no validations, i'm using carrierwave 10 with mini_magick 4.3.6, my layout prints notices and alerts but there's no notices or alerts, nothing in the logs, how can i see why the commit rolls back
[01:54:38] Ropeney: how do you know it rolls back?
[01:55:27] chipotle: has joined #RubyOnRails
[01:57:13] mices: Ropeney: from the webrick display
[01:57:19] mices: in terminal
[01:57:28] Ropeney: in your logs?
[01:57:35] Ropeney: You said there was nothing in logs :(
[01:57:37] mices: guess it's the webrick access log
[01:57:55] mices: when you run webrick server it tails it access log for you automatically
[01:58:02] mices: i don't consider that a log
[01:58:33] Ropeney: okay, well generally something wiht "log" in the name is a... log; gist the relevant stuff and we can take a look :)
[01:58:33] mices: there's nothing in log/development.log nothing in /var/log/mysql/error.log
[02:02:06] p1k: has anyone stored fractions (Ruby Rational) in an ActiveRecord model? Is there a preferred approach ?
[02:02:20] joshhbk: has joined #RubyOnRails
[02:02:27] p1k: numerator/denominator columns and serialize/deserialize hooks on the attribute ?
[02:04:50] mices: Ropeney: https://gist.github.com/mices/a575031cc8769cd54304028bc779df6b
[02:05:33] baweaver: has joined #RubyOnRails
[02:05:58] Ropeney: mices, and the log?
[02:08:03] mices: Ropeney: refresh
[02:10:09] Ropeney: mices, https://gist.github.com/mices/a575031cc8769cd54304028bc779df6b#file-pictures_controller-rb-L43 I think you want params[:picture][:name]
[02:10:34] sudoubuntu: has joined #RubyOnRails
[02:11:13] sevenseacat: has joined #RubyOnRails
[02:11:48] mices: Ropeney: ty
[02:13:38] mices: i'm sure it will it's a blatant typo i dunno how i didn't see, i was fixated on the model aspect
[02:14:06] Ropeney: happens to use all :D
[02:15:01] hahuang65: has joined #RubyOnRails
[02:17:37] smathy: p1k, yes, if keeping the exact value/representation is important to you then store num/den separately.
[02:18:59] blackmesa: has joined #RubyOnRails
[02:19:45] p1k: swathy: is there a built in hook for before_attribute_serialize, before_attribute_deserialize ?
[02:22:00] mices: Ropeney: not
[02:27:48] s2013: has joined #RubyOnRails
[02:31:40] mices: https://gist.github.com/mices/a575031cc8769cd54304028bc779df6b
[02:31:47] flashpoint9: has joined #RubyOnRails
[02:33:58] sudoubuntu: has joined #RubyOnRails
[02:34:15] StevenXL: has joined #RubyOnRails
[02:38:22] Ropeney: mices, do save! and see if it blows up before that
[02:38:50] mices: what's save!
[02:38:59] nibbo: has joined #RubyOnRails
[02:39:30] Ropeney: it blows up showing you the reason why
[02:39:45] mices: i can do @picture.save!
[02:41:40] chagel: has joined #RubyOnRails
[02:42:25] mices: Validation failed: Name Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
[02:44:04] Ropeney: so its blowing up before your uploader part
[02:44:17] Ropeney: well... failing
[02:44:39] kies: has joined #RubyOnRails
[02:45:54] Ropeney: so yeah, have tyou got imagemagick isntalled?
[02:47:52] Zggb: has joined #RubyOnRails
[02:50:32] mices: it's part of minimagick and doesn't seem to be installed, sorry
[02:51:01] mices: i mean minimagick doesn't seem to be installed
[02:51:12] Ropeney: atleast you have better bearings now :D
[02:51:29] mices: o it's installed but there's two versions
[02:52:19] HouseMD: has joined #RubyOnRails
[02:52:25] Ropeney: do you have system imagemgick installed?
[02:53:44] mDuff: has joined #RubyOnRails
[02:55:26] Chagel_: has joined #RubyOnRails
[02:56:04] paradisaeidae: has joined #RubyOnRails
[02:56:08] yfeldblum: has joined #RubyOnRails
[02:56:33] baweaver: has joined #RubyOnRails
[02:57:40] mices: Ropeney: no, ...
[02:57:48] Ropeney: mices, you will want that installed
[02:57:53] mices: i'm reading about it now
[02:58:26] yfeldblum: has joined #RubyOnRails
[02:59:11] wethu: has joined #RubyOnRails
[02:59:22] Rubie: has joined #RubyOnRails
[03:00:00] mices: Ropeney: i guess this is one of those things i can miss when i migrated my app to my laptop, the gem has to be installed but it doesn't have to be in the gemfile to work
[03:00:07] sdwrage: has joined #RubyOnRails
[03:00:59] mices: i guess that's why we need these things in our gemfiles
[03:01:00] dannyguk: has joined #RubyOnRails
[03:01:46] Ropeney: gemfiles are good
[03:01:52] mices: that's a super trick using save! thanks
[03:02:07] Ropeney: don't forget to take it out if you are handling a failed save
[03:02:57] herbst: has joined #RubyOnRails
[03:03:22] skyjumper: has joined #RubyOnRails
[03:04:11] syndikate: has joined #RubyOnRails
[03:04:46] hive-mind: has joined #RubyOnRails
[03:04:48] _Tariq: has joined #RubyOnRails
[03:04:51] Ratler: has joined #RubyOnRails
[03:06:20] andatche: has joined #RubyOnRails
[03:06:25] MuffinPimp: has joined #RubyOnRails
[03:06:55] mosez: has joined #RubyOnRails
[03:07:53] marcdel: has joined #RubyOnRails
[03:09:20] zrl: I have a model with a Rails 4 enum in it. What's the recommended strategy for adding a new field to the beginning of that enum?
[03:09:42] arBmind: has joined #RubyOnRails
[03:09:58] rogue_koder: has joined #RubyOnRails
[03:10:07] zrl: ex. i want to go from `enum year: [:freshman, :sophomore, :junior, :senior]` to `enum year: [:below_high_school, :freshman, :sophomore, ...]`
[03:10:15] sevenseacat: zrl: if the enum is a hash mapping, simply add a new key/value to the start of the hash
[03:10:17] s2013: has joined #RubyOnRails
[03:10:33] zrl: sevenseacat: it's an array
[03:10:36] sevenseacat: if not, turn it into a hash mapping to make sure the old values retain their integer mapping
[03:10:40] zrl: i'd like to convert it to a hash mapping though
[03:10:42] sevenseacat: and then add another one at the front
[03:11:18] zrl: okay, you're the best. thanks
[03:11:43] zrl: i was previously crashing active record when i tried converting it to a hash map, but i figured that part out now
[03:12:12] joshhbk: hey guys, I'm having an issue on OSX. If I run bundle no new gems are installed in my project, but if i run rake db:redo it asks me to install gem x version y. Once I install it and run rake db:redo again, it asks to install a different gem
[03:12:18] braincrash: has joined #RubyOnRails
[03:12:20] sevenseacat: *hey everyone
[03:12:48] joshhbk: i'm running rbenv - it's as if it's looking outside of rbenv when i run bundle, but inside when i try to install gems if you know what i mean
[03:13:05] joshhbk: new to rails so this might make no sense \_(ツ)_/¯
[03:13:07] bratsche_: has joined #RubyOnRails
[03:13:59] joshkovach: has joined #RubyOnRails
[03:14:06] diegoaguilar: has joined #RubyOnRails
[03:15:04] crameth: has joined #RubyOnRails
[03:16:19] stujah: has joined #RubyOnRails
[03:18:03] hahuang65: has joined #RubyOnRails
[03:18:23] mices: joshhbk: you have to install it as user not root on your system
[03:19:40] joshhbk: i haven't run anything as sudo that i'm aware of?
[03:20:27] andatche: has joined #RubyOnRails
[03:20:39] blackmesa: has joined #RubyOnRails
[03:20:57] delgiudices: has joined #RubyOnRails
[03:22:46] _Tariq: has joined #RubyOnRails
[03:23:07] S1kx: has joined #RubyOnRails
[03:24:38] chipotle: has joined #RubyOnRails
[03:25:46] andatche: has joined #RubyOnRails
[03:26:11] mices: joshhbk: i dunno, i use rvm, heh
[03:26:17] mices: i pretty new too
[03:26:52] joshhbk: haha so i've been told elsewhere too! thanks anyways, i might just install vagrant at this point
[03:26:59] mices: joshhbk: i think rvm is preferable
[03:27:11] zrl: eh, i'm in the rbenv boat
[03:27:18] zrl: joshhbk: have you checked out docker-compose?
[03:27:29] zrl: if you're already on the docker bandwagon, it may be a good choice
[03:27:37] zrl: i use it for all ruby development
[03:28:13] jenrzzz: has joined #RubyOnRails
[03:28:13] jenrzzz: has joined #RubyOnRails
[03:30:36] joshhbk: hmm no i haven't, will google it, thanks!
[03:31:46] pawnbox: has joined #RubyOnRails
[03:37:28] tjvc: has joined #RubyOnRails
[03:37:28] tjvc: has joined #RubyOnRails
[03:37:50] Rubie: has joined #RubyOnRails
[03:41:10] arBmind: has joined #RubyOnRails
[03:41:17] lessless: has joined #RubyOnRails
[03:43:53] B1n4r10: has joined #RubyOnRails
[03:44:22] benlieb: has joined #RubyOnRails
[03:45:54] srinidhi: has joined #RubyOnRails
[03:47:58] georgedrummond: has joined #RubyOnRails
[03:50:57] wethu: has joined #RubyOnRails
[03:51:14] mozzarella: has joined #RubyOnRails
[03:54:20] pwnd_nsfw: has joined #RubyOnRails
[03:58:41] TheShaun: has joined #RubyOnRails
[04:01:30] tildes_: has joined #RubyOnRails
[04:02:53] fedexo: has joined #RubyOnRails
[04:04:43] sekrit: has joined #RubyOnRails
[04:10:54] markelite: has joined #RubyOnRails
[04:14:41] benlieb: has joined #RubyOnRails
[04:15:47] brentw: trying to figur eout why i'm getting a NotMethodError: undefined method 'name' for nil:nilClass error
[04:16:43] sevenseacat: brent_: what line of code is the error coming from?
[04:17:06] brentw: give me a second
[04:17:11] brentw: i'm putting a gist together
[04:18:38] hahuang65: has joined #RubyOnRails
[04:19:13] brentw: https://gist.github.com/brentgsw/d7711744acab95c1c3955be210f314ab this was just testing it in the console
[04:19:43] brentw: it looks like a.tags returns the array, but on a.tags.create it's throwing the undefined method 'name" error
[04:21:23] sevenseacat: sowhat do your models look like? looks like its trying to update a counter cache and failing
[04:21:58] sp1rs: has joined #RubyOnRails
[04:22:26] blackmesa: has joined #RubyOnRails
[04:23:06] duncannz: has joined #RubyOnRails
[04:23:07] brentw: https://gist.github.com/brentgsw/d7711744acab95c1c3955be210f314ab
[04:23:13] brentw: the bottom file
[04:25:20] sevenseacat: nothing immediately jumping out at me - try upgrading rails to the latest 4.0 ?
[04:25:25] sevenseacat: 4.0.4 is quite old
[04:25:34] brentw: this is my 2nd day w/ rails
[04:25:38] brentw: whats the best way to update?
[04:26:03] sevenseacat: you're doing some pretty heavy stuff for day 2
[04:26:04] brentw: and how would it affect this current project
[04:26:15] sevenseacat: what is listed in the Gemfile of your app for rails at the moment?
[04:27:32] sevenseacat: ok, i'd recommend updating that to be "~> 4.0.0" and then running `bundle update rails`
[04:28:00] brentw: gem 'rails',
[04:28:14] brentw: gem 'rails', ' ~> 4.0.0'
[04:28:41] sevenseacat: basically means 'this gem is allowed to be version 4.0.x'
[04:28:50] sevenseacat: instead of locking it at 4.0.4
[04:29:39] brentw: looks like it installed rails 4.0.13
[04:30:20] sevenseacat: thats the latest 4.0 version :)
[04:30:22] brentw: anything else i would need to do? restart server?
[04:30:27] sevenseacat: restart your rails server and see if its fixed
[04:30:49] stujah: has joined #RubyOnRails
[04:30:52] p1k: has joined #RubyOnRails
[04:32:20] brentw: sevenseacat, you glorious man!
[04:32:34] Radar: brent_: woman*
[04:32:40] sevenseacat: i'm not a man, but the glorious part is appreciated :)
[04:32:43] brentw: seems to have fixed it
[04:32:57] brentw: you glorious woman!
[04:33:20] brentw: appreciate your time and help
[04:33:50] sevenseacat: which tutorial are you following thats using rails 4.0.4, out of curiosity?
[04:34:55] newbieuser: has joined #RubyOnRails
[04:35:46] brentw: http://tutorials.jumpstartlab.com/projects/blogger.html#i3:-tagging
[04:35:51] brentw: i was just cursing it's name
[04:36:11] sevenseacat: cool cool :) thanks
[04:36:21] brentw: i was on here earlier w/ the same error when trying to use #size, but #count/#length woudl work fine
[04:36:35] brentw: goign to try size again and see if that fixed it as well
[04:37:17] brentw: yep, fixed that as well
[04:38:00] bob434: has joined #RubyOnRails
[04:39:19] marcdel: has joined #RubyOnRails
[04:40:59] brentw: i was also having issues w/ that tutorial as it was pushign to use rbenv to isntall 2.1.2 ruby
[04:41:20] sevenseacat: yeah thats an old version
[04:41:26] brentw: which was another headache,
[04:42:30] webdestroya: has joined #RubyOnRails
[04:43:44] codelahoma: has joined #RubyOnRails
[04:44:29] brentw: smathy_afk thanks for your help earlier, as you can see above it seems a dated version of rails was causing that issue you looked at with me.
[04:44:45] brentw: thanks again sevenseacat, have a good night
[04:44:55] sevenseacat: catch you later :)
[04:55:18] mwcmitchell: has joined #RubyOnRails
[04:56:53] rubyonra_: has joined #RubyOnRails
[04:58:11] owenjones: has joined #RubyOnRails
[05:00:55] Cooooo: has joined #RubyOnRails
[05:01:43] dannyguk: has joined #RubyOnRails
[05:02:09] sleungcy: has joined #RubyOnRails
[05:02:47] nodejunkie: has joined #RubyOnRails
[05:04:14] agent_white: has joined #RubyOnRails
[05:04:19] herbst: has joined #RubyOnRails
[05:06:46] SteenJobs: has joined #RubyOnRails
[05:08:19] rubyonrailed: has joined #RubyOnRails
[05:10:58] nartes: has joined #RubyOnRails
[05:11:24] Abhijit: has joined #RubyOnRails
[05:11:57] Abhijit: is there any way to increase log level in omnicontacts? it just says Started GET "/contacts/failure?error_message=internal_error&importer=gmail" for at 2016-04-07 01:08:43 -0400
[05:12:04] Abhijit: how can I know what internal error?
[05:12:41] merida: has joined #RubyOnRails
[05:14:43] njero: has joined #RubyOnRails
[05:19:39] hahuang65: has joined #RubyOnRails
[05:22:00] Devalo: has joined #RubyOnRails
[05:23:12] krz: has joined #RubyOnRails
[05:25:28] marcdel: has joined #RubyOnRails
[05:25:30] blackmesa: has joined #RubyOnRails
[05:27:56] merida_: has joined #RubyOnRails
[05:29:15] yfeldblum: has joined #RubyOnRails
[05:29:57] czerasz: has joined #RubyOnRails
[05:32:03] moeabdol1: has joined #RubyOnRails
[05:34:25] tildes_: has joined #RubyOnRails
[05:34:27] moeabdol2: has joined #RubyOnRails
[05:37:25] rubyonrailed: has joined #RubyOnRails
[05:39:33] sevenseacat: has joined #RubyOnRails
[05:40:06] flashpoint9: has joined #RubyOnRails
[05:40:23] mices: has joined #RubyOnRails
[05:40:38] dopie2: has joined #RubyOnRails
[05:42:01] fedexo: has joined #RubyOnRails
[05:44:47] weaksauce: has joined #RubyOnRails
[05:49:10] oliver___: has joined #RubyOnRails
[05:50:55] eyeamaye: has joined #RubyOnRails
[05:57:54] merida: has joined #RubyOnRails
[05:58:38] merida_: has joined #RubyOnRails
[06:01:40] Palsson: has joined #RubyOnRails
[06:05:52] herbst: has joined #RubyOnRails
[06:06:07] lxsameer: has joined #RubyOnRails
[06:07:31] krz: has joined #RubyOnRails
[06:13:32] merida: has joined #RubyOnRails
[06:13:51] aganov: has joined #RubyOnRails
[06:14:03] owenjones: has joined #RubyOnRails
[06:14:07] artto: has joined #RubyOnRails
[06:15:15] existensil: has joined #RubyOnRails
[06:15:39] audy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[06:17:56] w09x: has joined #RubyOnRails
[06:18:50] Abhijit: gmail contats api is the only api to be enabled for omnicontacts right or something else also?
[06:19:45] Pupeno: has joined #RubyOnRails
[06:20:29] smc: has joined #RubyOnRails
[06:20:38] hahuang65: has joined #RubyOnRails
[06:20:51] matt_d: Abhijit: i wouldn't know
[06:21:55] delgiudices: has joined #RubyOnRails
[06:22:12] delgiudices: Does anybody here work remotely or has experience working remotely?
[06:22:23] sevenseacat: i work full-time remote
[06:22:43] matt_d: delgiudices: hello
[06:22:45] delgiudices: Could i ask a question related to remote work #offtopic
[06:23:07] Radar: I have worked remotely in the past full-time and continue to work remotely two days a week.
[06:23:16] quazimodo: afternoon :)
[06:23:17] delgiudices: Ok so after a process of emails and 2 interviews, i kind of got an offer to join the company
[06:23:26] Abhijit: my bad. all this time I was reading the "Enable" button and thinking its a status. it was not. it was a button. i have to click it! :-D
[06:23:29] delgiudices: But not a real commitment they call it "Bootcamp"
[06:23:39] delgiudices: To kind of see if we match working together
[06:23:47] havenwood: delgiudices: Do they pay you for it?
[06:23:53] rvanlieshout: which is fairly important to know
[06:23:55] rvanlieshout: for both parties
[06:24:01] matt_d: delgiudices: ha, "bootcamp"
[06:24:07] delgiudices: The problem is the person assigning tasks to me is in a different timezone
[06:24:14] rvanlieshout: even if they don't pay for it
[06:24:20] sevenseacat: an employment bootcamp is a new one
[06:24:44] delgiudices: And i currently have a job
[06:24:48] sevenseacat: how different a timezone? a couple hours isnt a big deal, more than that might be a problem
[06:25:06] sevenseacat: my company (and most of the people in it) are at a two-hour offset to me
[06:25:07] delgiudices: So when i'm out of work he's not working anymore
[06:25:11] matt_d: ACTION went through an employment bootcamp, it was called the military :)
[06:25:38] delgiudices: Well the only requirement was to be able to be able to attend meetings in morning time of california
[06:25:48] delgiudices: But the person assigning tasks is in ukraine
[06:25:50] wethu: has joined #RubyOnRails
[06:25:57] quazimodo: delgiudices: i work with people all over the place now, timezone can be a huge pain if you need to collaborate, but we found it less of an issue if it's just leaving messages and getting tasks
[06:26:00] Radar: So like 8 hrs difference. Seems hard.
[06:26:20] delgiudices: So the thing is i cannot leave my job with only a bootcamp offer
[06:26:26] sevenseacat: totally understood
[06:26:30] delgiudices: But how can i get tasks if when i'm free no one is working
[06:26:43] sevenseacat: they would leave them for you
[06:26:47] quazimodo: delgiudices: I came into the conversation late Kwell presumable
[06:27:03] delgiudices: quazimodo what do you mean?
[06:28:06] smc: I have a question about how to select an aggregate result alongside a regular query efficiently in Rails. For context, I am writing an app that models a version control repo, there is an Author model, a Commit model, and a Project model. A Commit explicitly belongs_to an Author, and a commit explicitly belongs_to a Project, and an Author explicitly has_many Commits (and implicitly has_many Projects). I would like to write a query th
[06:28:19] Radar: sm_: !tldr
[06:28:19] helpa: sm_: Too long; didn't read.
[06:28:28] Radar: sm_: Your line was also cut off at "a query"
[06:28:41] blackmesa: has joined #RubyOnRails
[06:28:51] njero: Hi everyone i have been trying rails html sanitizer to work with custom scrubber but couldn't get it rt.. Can anyone point me to what im doing wrong here. https://gist.github.com/NeoElit/d1fe81aa60e7d61247f80e2ebdbf0358
[06:29:06] comrad: has joined #RubyOnRails
[06:29:10] smc: I would like to write a query that gets all the Authors that have contributed to a particular project, alongside the number of commits they have contributed to that project
[06:29:16] smc: An SQL query to express this would be like:
[06:29:18] delgiudices: Any advice for me?
[06:29:20] smc: SELECT a.*, author_commits_to_proj.commit_count FROM authors a, (SELECT c.author_id, COUNT(*) as commit_count FROM commits c WHERE c.project_id = ? GROUP BY c.author_id) author_commits_to_proj WHERE a.id = author_commits_to_proj.author_id ORDER BY author_commits_to_proj.commit_count DESC;
[06:29:29] smc: Right now I have an ActiveRecord query like 'Author.where(id: Commit.select(:author_id).where(project: project_id))' but obviously this doesn't have the count information.
[06:29:35] smc: How would this be idiomatically expressed in Rails/ActiveRecord? Thanks in advance!
[06:29:42] sevenseacat: delgiudices: not sure what kind of advice you're looking for - either you accept the bootcamp or you don't
[06:29:50] delgiudices: I mean i'm in the bootcamp
[06:30:09] delgiudices: the thing is i waited the whole day for a task and i didn't get one
[06:30:28] delgiudices: So i'm afraid they don't like that i'm not available
[06:30:29] sevenseacat: then you tell them that
[06:30:32] delgiudices: When they are available
[06:30:35] sevenseacat: people understand timezones
[06:30:41] Macaveli: has joined #RubyOnRails
[06:31:12] delgiudices: Ok so, do you think it should be fair if i ask for couple of tasks instead of just one so i can do them if they're not available when i'm not done with the first one?
[06:31:15] Radar: delgiudices: Yes this is the hard thing about working across huge timezones gaps; the delay of information
[06:31:16] Radar: delgiudices: yes
[06:31:34] sevenseacat: well if theyre paying you, they want you to actually be working
[06:31:47] delgiudices: Well yes it really seems a legit offer
[06:31:55] delgiudices: I just didn't want them to get discouraged about me
[06:31:56] sevenseacat: if theres any daily overlap at all (and there should be or it will be really hard), then use that time best
[06:32:20] Radar: Only assigning one task at a time is bad project management
[06:32:37] sevenseacat: indeed, you should have a queue of tasks on your agenda
[06:33:12] delgiudices: And another question
[06:33:21] delgiudices: When logging hours in a remote job what should be logged?
[06:33:45] sevenseacat: I don't have to log time which i loooooove
[06:33:57] delgiudices: Well i was hired via upwork
[06:33:59] sevenseacat: but any time that can be attributed to a work task, really
[06:34:10] delgiudices: So i have to log time using an app that takes screenshot
[06:34:31] sevenseacat: if you have issues not knowing how granular your timelog entries should be, ask
[06:34:43] sevenseacat: it will be different depending on the company
[06:34:55] njero: *anyone :(
[06:34:56] sevenseacat: ew, screenshots
[06:34:58] artto: has joined #RubyOnRails
[06:35:04] delgiudices: thanks sevenseacat and everyone
[06:35:14] matt_d: delgiudices: good luck
[06:35:34] Radar: n_e_o: what?
[06:35:39] mark3: has joined #RubyOnRails
[06:36:01] njero: Radar: should repost it?
[06:36:11] Radar: n_e_o: I found it. What is wrong with it? https://gist.github.com/NeoElit/d1fe81aa60e7d61247f80e2ebdbf0358
[06:36:24] njero: Radar: it's not clearing image tag
[06:36:36] Radar: Indeed it isn't.
[06:36:54] njero: and why not?
[06:36:56] Radar: I don't know why it's not doing that.
[06:37:05] sevenseacat: lots of code, no description of a problem
[06:37:13] Radar: sevenseacat: I think we have both?
[06:37:21] sevenseacat: now we do, yes
[06:37:26] Radar: I've never used Rails::Html::PermitScrubber. I've always used https://github.com/rgrove/sanitize
[06:39:41] czerasz: has joined #RubyOnRails
[06:41:42] sevenseacat: i havent used it either, but i'd do some debugging - maybe your allowed_node? isnt get called for nested nodes or something
[06:41:59] sevenseacat: maybe it's like "p? all good! *allow*"
[06:42:32] njero: has joined #RubyOnRails
[06:42:50] njero: sry.. lost ma connection..
[06:43:15] Radar: [16:37:26] <Radar> I've never used Rails::Html::PermitScrubber. I've always used https://github.com/rgrove/sanitize
[06:43:29] sevenseacat: [14:41:41] sevenseacat: i havent used it either, but i'd do some debugging - maybe your allowed_node? isnt get called for nested nodes or something
[06:43:29] sevenseacat: [14:41:59] sevenseacat: maybe it's like "p? all good! *allow*"
[06:44:03] njero: Radar: K, i chose it bcz it came with rails :)
[06:44:08] dionysus69: has joined #RubyOnRails
[06:44:51] yfeldblum: has joined #RubyOnRails
[06:45:06] njero: sevenseacat: yeah, allowed_node? method is not being invoked.. However skip_node is being called.. I don't know y
[06:45:32] njero: and return value of skip_node doesn't seem to have any impact
[06:46:12] yfeldblum: has joined #RubyOnRails
[06:46:18] njero: let me try https://github.com/rgrove/sanitize.. thanks :)
[06:46:51] sevenseacat: right, this library doesnt actually come with rails, this html sanitizer
[06:47:12] sevenseacat: as far as i can see
[06:47:29] sevenseacat: ah, yes it does, its a deep dependency
[06:47:40] njero: sevenseacat: yes..
[06:48:50] herbst: has joined #RubyOnRails
[06:49:44] chagel: has joined #RubyOnRails
[06:50:50] marcdel: has joined #RubyOnRails
[06:54:13] eyeamaye: has joined #RubyOnRails
[06:54:17] speakingcode: has joined #RubyOnRails
[06:55:11] failasLStoRM: has joined #RubyOnRails
[06:57:48] Palsson: has joined #RubyOnRails
[07:00:29] agit0: has joined #RubyOnRails
[07:00:33] Palsson_: has joined #RubyOnRails
[07:02:08] djbkd: has joined #RubyOnRails
[07:02:30] dannyguk: has joined #RubyOnRails
[07:04:19] Wingar: has joined #RubyOnRails
[07:05:03] eyeamaye: has joined #RubyOnRails
[07:08:16] artto: has joined #RubyOnRails
[07:08:16] p1k: how does on define a customer serializer for an attribute?
[07:08:56] syndikate: has joined #RubyOnRails
[07:10:42] bachmann: has joined #RubyOnRails
[07:11:51] delgiudices: has joined #RubyOnRails
[07:13:07] krz: has joined #RubyOnRails
[07:15:17] mhoungbo: has joined #RubyOnRails
[07:16:50] moep: has joined #RubyOnRails
[07:17:23] matt_d: p1k: check out ActiveRecord::AttributeMethods::Serialization::ClassMethods
[07:18:31] ur5us: has joined #RubyOnRails
[07:18:49] matt_d: p1k: serialize takes the column name and the serializer. replace the serializer with your custom one.
[07:19:43] matt_d: p1k: If I recall correctly your serializer needs the following class methods: load and dump
[07:19:54] antgel: has joined #RubyOnRails
[07:20:00] delgiudices: has joined #RubyOnRails
[07:20:17] p1k: matt_d: Yeah but I just realized that's not going to work if I need 2 columns
[07:20:47] p1k: I mean unless I hstore a single column, but custom types aren't supported as far as I remember
[07:21:24] hahuang65: has joined #RubyOnRails
[07:21:33] Bloomer: has joined #RubyOnRails
[07:23:49] Ergo: has joined #RubyOnRails
[07:24:34] solars: has joined #RubyOnRails
[07:24:48] Macaveli: has joined #RubyOnRails
[07:25:02] TvL2386: has joined #RubyOnRails
[07:25:50] dannyguk: has joined #RubyOnRails
[07:26:14] artto: has joined #RubyOnRails
[07:30:17] blackmesa: has joined #RubyOnRails
[07:30:55] artto: has joined #RubyOnRails
[07:32:02] matt_d: p1k: sorry, was away. you can call serialize on multiple columns
[07:32:41] matt_d: p1k: i think, i may be wrong... let me check
[07:32:46] p1k: matt_d: oh nice to know, actually I was thinking int8range might actually work also
[07:33:03] p1k: (mapping to and from Rational)
[07:34:39] matt_d: p1k: yeah you can call on multiple collumns
[07:36:35] darutoko: has joined #RubyOnRails
[07:39:57] Chagel_: has joined #RubyOnRails
[07:40:08] eyeamaye: has joined #RubyOnRails
[07:40:31] petor: has joined #RubyOnRails
[07:42:58] vale_tudo: has joined #RubyOnRails
[07:44:55] eyeamaye1: has joined #RubyOnRails
[07:45:05] Pupeno: has joined #RubyOnRails
[07:45:33] pawnbox: has joined #RubyOnRails
[07:46:58] diegoaguilar: has joined #RubyOnRails
[07:49:31] jenrzzz: has joined #RubyOnRails
[07:50:22] solars: is there any way to have a timestamp, e.g. Time.now converted to the same precision as mysql? (i.e. stripping milliseconds)?
[07:50:58] mikecmpbll: has joined #RubyOnRails
[08:02:05] pawnbox: has joined #RubyOnRails
[08:02:40] srinidhi: has joined #RubyOnRails
[08:02:58] sp1rs: has joined #RubyOnRails
[08:04:40] chagel: has joined #RubyOnRails
[08:05:16] dannyguk: has joined #RubyOnRails
[08:07:03] mikecmpbll: has joined #RubyOnRails
[08:07:12] danman: has joined #RubyOnRails
[08:09:49] danman: /msg NickServ VERIFY REGISTER danm__ mexnxqvwxqtx
[08:11:18] jsrn: has joined #RubyOnRails
[08:11:38] danman: Question for the community, I am creating a gem with a dependancy of acts-as-taggable-on which has migrations but how do I get these into the gem to be copied across to the main app?
[08:12:03] czerasz: has joined #RubyOnRails
[08:12:35] tvw: has joined #RubyOnRails
[08:14:09] DoubleMalt: has joined #RubyOnRails
[08:15:54] owenjones: has joined #RubyOnRails
[08:17:20] lessless: has joined #RubyOnRails
[08:20:20] Devalo: has joined #RubyOnRails
[08:20:57] Ropeney: has joined #RubyOnRails
[08:21:56] finnnnnnnnnnn: has joined #RubyOnRails
[08:22:23] hahuang65: has joined #RubyOnRails
[08:26:57] ur5us: has joined #RubyOnRails
[08:27:26] albipri: has joined #RubyOnRails
[08:27:46] albipri: How can I set a global config for date_select with use_month_numbers: true ?
[08:28:08] Bloomer: has joined #RubyOnRails
[08:28:38] marcdel: has joined #RubyOnRails
[08:31:57] artto_: has joined #RubyOnRails
[08:32:08] blackmesa: has joined #RubyOnRails
[08:37:10] artto: has joined #RubyOnRails
[08:40:31] ql6wlld: has joined #RubyOnRails
[08:42:10] baweaver: has joined #RubyOnRails
[08:43:05] TheRokh: has joined #RubyOnRails
[08:44:13] AnoHito: has joined #RubyOnRails
[08:48:45] ferr: has joined #RubyOnRails
[08:48:54] skislak: has joined #RubyOnRails
[08:49:08] darutoko: has joined #RubyOnRails
[08:49:15] snowy: has joined #RubyOnRails
[08:49:49] marr: has joined #RubyOnRails
[08:51:04] merida: has joined #RubyOnRails
[08:52:18] edwinvdgraaf: has joined #RubyOnRails
[08:52:56] Pupeno: has joined #RubyOnRails
[08:55:06] EdwardIII: has joined #RubyOnRails
[08:57:16] solars: is there any way to have a timestamp, e.g. Time.now converted to the same precision as mysql? (i.e. stripping milliseconds)?
[08:58:10] rvanlieshout: solars: why would you need that?
[08:58:20] rvanlieshout: cause i guess the safest way would be to save and reload it
[08:58:47] quazimodo: has joined #RubyOnRails
[08:58:53] solars: rvanlieshout, that's what I'm doing at the moment.. I thought there is a better way to compare that in rspec
[08:59:05] solars: its a bit verbose with reloading :)
[08:59:19] rvanlieshout: you could compare it within a range
[08:59:40] solars: hm yeah that would be an option
[08:59:44] solars: thanks for the suggestion
[09:01:36] arBmind: has joined #RubyOnRails
[09:02:11] artto: has joined #RubyOnRails
[09:02:45] sp1rs: has joined #RubyOnRails
[09:03:06] dannyguk: has joined #RubyOnRails
[09:04:27] rubyonrailsLAD: has joined #RubyOnRails
[09:04:47] rubyonrailsLAD: How is everyone?
[09:05:53] pawnbox: has joined #RubyOnRails
[09:06:02] petor: has joined #RubyOnRails
[09:06:19] rubyonrailsLAD: I have a question..
[09:06:22] rubyonrailsLAD: I am learning rails
[09:06:36] rodfersou: has joined #RubyOnRails
[09:06:38] rubyonrailsLAD: but I want a senior rails dev to help me learn
[09:07:14] rubyonrailsLAD: in return, once i get a job, i will offer 25% of my first 3 months wages...
[09:07:56] p1k: idk this serializer thing is not really working as I intend it too
[09:08:40] p1k: I want to hook deserializing for transactions and serializing, but it apparently is supposed to do other things?
[09:09:55] p1k: is there something lower level than serialize to get exactly something more concrete?
[09:10:04] workmad3: has joined #RubyOnRails
[09:11:11] rvanlieshout: p1k: what are you trying to do?
[09:12:05] Pupeno_: has joined #RubyOnRails
[09:12:06] p1k: well I wanted something simple to load postgres int8range as a rational e.g. def self.load(range)\n Rational(*(range || 0))\n end
[09:12:27] skislak: has joined #RubyOnRails
[09:12:36] p1k: but apparently that `load` method also gets called on assignment (for whatever reason) if using serialize <attr_name>, <SerializerClass>
[09:12:49] rvanlieshout: iirc there are hooks to provide the casting
[09:13:15] p1k: rvanlieshout: So I'm looking at the wrong with with #serialize ?
[09:13:25] rvanlieshout: it feels so yes
[09:13:49] p1k: do you have any idea what the right thing might be ?
[09:14:07] rvanlieshout: http://technology.customink.com/blog/2015/01/06/activerecord-42s-type-casting/
[09:14:20] rvanlieshout: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html
[09:14:25] rvanlieshout: 'Creating Custom Types'
[09:15:06] Palsson: has joined #RubyOnRails
[09:15:55] workmad3_: has joined #RubyOnRails
[09:20:13] neanderslob_: has joined #RubyOnRails
[09:21:40] artto: has joined #RubyOnRails
[09:21:42] quazimodo: has joined #RubyOnRails
[09:21:48] Devalo: has joined #RubyOnRails
[09:23:24] hahuang65: has joined #RubyOnRails
[09:24:14] Silex: I want a route that has share/index share/edit share/update all as _collection_, should I still use "resources :share" ?
[09:25:01] Silex: it's for a complex form where I edit mutiple items at once
[09:25:41] merida_: has joined #RubyOnRails
[09:25:43] Silex: so far I have resources :share, only: [:index] { collection{ get :edit; post :update }}
[09:25:52] Silex: but that produces weird routes (share_index_path) etc
[09:26:14] finnnnnnnnnnn: has joined #RubyOnRails
[09:27:53] AnoHito_: has joined #RubyOnRails
[09:29:02] jas02: has joined #RubyOnRails
[09:29:28] petor: has joined #RubyOnRails
[09:29:47] patrick_star_3: has joined #RubyOnRails
[09:30:16] Silex: hum, fixed it with a singular resource
[09:32:39] jas02: has left #RubyOnRails: ()
[09:33:31] artto: has joined #RubyOnRails
[09:34:19] petor_: has joined #RubyOnRails
[09:34:33] BaNzounet: has joined #RubyOnRails
[09:35:08] blackmesa: has joined #RubyOnRails
[09:35:27] petor: has joined #RubyOnRails
[09:37:09] artto: has joined #RubyOnRails
[09:38:18] srinidhi: has joined #RubyOnRails
[09:40:50] yfeldblum: has joined #RubyOnRails
[09:41:40] alevy: has joined #RubyOnRails
[09:44:28] p1k: rvanlieshout: where do you register types ? I see the documentation is different between versions
[09:44:49] rvanlieshout: i would expect them to be autoloaded
[09:44:52] rvanlieshout: but haven't need them myself
[09:45:08] norc: has joined #RubyOnRails
[09:46:47] finnnnnnnnnnn: has joined #RubyOnRails
[09:47:20] p1k: I found http://edgeapi.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html but this isn't available in 4.2.6
[09:48:09] rvanlieshout: hmm. and that other post?
[09:49:07] p1k: I don't see anything in there about type registration :S
[09:49:44] p1k: it seems like the adapters call register_type in type_map e.g. active_record/connection_adapters/mysql_adapter.rb:323: register_type Mysql::Field::TYPE_DATE, Type::Date.new
[09:50:58] aloneintheworld: has joined #RubyOnRails
[09:51:20] moeabdol2: has joined #RubyOnRails
[09:51:33] norc: So I want to use some ECMAScript 2015 features like "for(let a of b) {}", but execjs (using node.js) is just choking on that when precompiling assets.. :(
[09:51:35] Spami: has joined #RubyOnRails
[09:51:47] p1k: I might have to reopen the postgres adapter for this
[09:52:13] artto: has joined #RubyOnRails
[09:52:59] marcdel: has joined #RubyOnRails
[09:55:08] albipri: has left #RubyOnRails: ()
[09:55:46] arquebus: has joined #RubyOnRails
[09:56:17] quazimodo: has joined #RubyOnRails
[09:56:39] artto: has joined #RubyOnRails
[09:59:04] voidDotClass: has joined #RubyOnRails
[10:00:34] Pupeno: has joined #RubyOnRails
[10:06:19] cabinB: has joined #RubyOnRails
[10:06:52] cabinB: msg nicksrv indentify cabinB yomama1803
[10:07:17] mhoungbo: has joined #RubyOnRails
[10:07:18] cabinB: well crap :-)
[10:07:22] finnnnnnnnnnn_: has joined #RubyOnRails
[10:07:23] ziyadb: has joined #RubyOnRails
[10:09:26] Hates_: we've all been there
[10:12:57] chagel: has joined #RubyOnRails
[10:14:26] cabinB: quick git question: if i want to get rid of all uncommitted changes and simply go back to the latest commit, what is the command?
[10:18:24] sp1rs: has joined #RubyOnRails
[10:24:23] hahuang65: has joined #RubyOnRails
[10:28:22] chagel: has joined #RubyOnRails
[10:29:11] n008f4g_: has joined #RubyOnRails
[10:29:31] yekta: has joined #RubyOnRails
[10:31:43] yekta: Does anyone know the current latest compatible Ruby version for Rails 2.3
[10:31:55] quazimodo: has joined #RubyOnRails
[10:32:22] blackhuey: has joined #RubyOnRails
[10:33:21] chagel: has joined #RubyOnRails
[10:38:20] chagel: has joined #RubyOnRails
[10:43:16] baweaver: has joined #RubyOnRails
[10:43:26] AimlessRAven: has joined #RubyOnRails
[10:44:18] AimlessRAven: https://gist.github.com/anonymous/103052d56a59b12c04d9d3d53fa61a20
[10:44:24] AimlessRAven: why i cant see my breadcrumb
[10:46:35] tildes: is there a neat way to break out of a rake task, other than raising an error?
[10:46:48] Macaveli: has joined #RubyOnRails
[10:48:12] tildes: I'm facing a rather odd issue, that my rake runs nicely on a local machine, and on another machine, it runs twice. I have checked and checked, and code and data match on both machines. as it's a one-off data-mangling task, I was thinking I could just force it quit, when the the first round is complete.
[10:49:17] DylanJ: cabinB: do you want to unstage the changes? or do you actually want your file content to be what it was in the previous commit?
[10:49:22] tildes: (googling is great as well, I'll try these: http://stackoverflow.com/questions/2316475/how-do-i-return-early-from-a-rake-task)
[10:49:23] apeiros: tildes: instead of fixing the symptom, I'd go hunt the cause
[10:49:32] tildes: apeiros: I know.
[10:49:37] apeiros: tildes: --trace tells you what invoked what
[10:49:54] hackeron: has joined #RubyOnRails
[10:50:01] tildes: apeiros: it's just that sometimes spending more time is not an option.
[10:50:10] cabinB: DylanJ, the latter. I just want to get rid of anything staged (this means "added", right?) and any changed unstaged, just like it was when I pulled from the latest commit.
[10:50:27] cabinB: this almost does it: git checkout .
[10:50:33] apeiros: tildes: it's just that you won't know what'll cost you more time in the end. and my bet with problems is usually in favor of solving it.
[10:50:39] apeiros: work-arounds are often boomerangs
[10:50:46] tildes: Of course something like this could be a sign of something bigger going on
[10:51:04] tildes: apeiros: I agree with the principle
[10:51:09] DylanJ: well now you're confusing me. say you have file a commited in commit 1. and you change file a's content. if you type "git add a" this /stages/ the changes to be commited.
[10:51:23] DylanJ: unstaging doesn't change the file. it just means it wont be commited with "git commit"
[10:51:30] tildes: apeiros: there are components around the rake task I cannot directly (or at least very quickly) impact
[10:51:39] DylanJ: git you want file a to go back in time to the previous commit you must do a "git reset"
[10:52:18] DylanJ: if you have a bunch of crap changes you dont want any more you can "git reset --hard some-commit"
[10:52:25] ql6wlld: has joined #RubyOnRails
[10:52:48] DylanJ: but be careful. that actually touches your fs. you have to learn how to read git ref-log if you make a mistake.
[10:52:52] cabinB: thx DylanJ
[10:53:44] marcdel: has joined #RubyOnRails
[10:54:00] FooMunki: has joined #RubyOnRails
[10:54:30] chagel: has joined #RubyOnRails
[10:54:52] dvinciguerra__: has joined #RubyOnRails
[10:57:03] srinidhi: has joined #RubyOnRails
[11:02:39] moei: has joined #RubyOnRails
[11:03:25] _djbkd: has joined #RubyOnRails
[11:05:27] Detch: has joined #RubyOnRails
[11:06:40] britter: has joined #RubyOnRails
[11:07:37] nfk|laptop: has joined #RubyOnRails
[11:12:00] bob434: has joined #RubyOnRails
[11:12:49] nfk|laptop: i have a derpy situation, ActiveRecord IDs start from 1 but Angular uses 0 based indexing meaning i need to either program keeping this disrepancy in mind or use Angular IDs in Angular which could then cause issues with maintainability as I can't guarantee that in future foos arrray will not be a subset of all Foos, where only ActiveRecord ID will be easy to devise
[11:14:01] rvanlieshout: nfk|laptop: don't mix ID with index
[11:14:07] mikecmpbll: why does angular have anything to do with the ID?
[11:14:22] mikecmpbll: (never used angular)
[11:14:38] dionysus69: has joined #RubyOnRails
[11:15:42] sp1rs: has joined #RubyOnRails
[11:18:23] nfk|laptop: rvanlieshout, i don't think i have that luxury
[11:18:51] bob434: has joined #RubyOnRails
[11:19:17] nfk|laptop: fundamentally i have something like host/#/luser/0 to show which actually does async GET of /user/1.json
[11:19:30] agit0: has joined #RubyOnRails
[11:19:34] nartes: has joined #RubyOnRails
[11:20:13] rvanlieshout: nfk|laptop: then it's wrong
[11:20:15] rvanlieshout: 0 refers to an index
[11:20:16] jgt4: has joined #RubyOnRails
[11:20:21] spiman: has joined #RubyOnRails
[11:20:29] trinaldi: has joined #RubyOnRails
[11:20:39] nfk|laptop: the reason is, i suspect, that internally users array is populated from index 0
[11:21:00] nfk|laptop: i could perhaps populate it from 1 and then skip the first everywhere but that sounds like a fucking hack
[11:21:05] nfk|laptop: and a bug heaven
[11:21:47] mikecmpbll: what on earth has the database ID got to do with indexes?
[11:21:49] PedramT: has joined #RubyOnRails
[11:22:08] nfk|laptop: mikecmpbll, as for why, it's because Rails only serves the main and only application.html.erb, assets and then only responds to JSON
[11:22:27] rvanlieshout: the problem is that indexes have no gaps
[11:22:39] mikecmpbll: and in that JSON, rails returns it's ids for records, no?
[11:22:55] nfk|laptop: so i have something like /#/users/0 path which as you might notice means that the users view is actually under whatever is the main view
[11:22:57] bob434: has joined #RubyOnRails
[11:23:13] Cervajz: has joined #RubyOnRails
[11:23:24] nfk|laptop: mikecmpbll, yes, it does return lusers
[11:23:41] Macaveli: has joined #RubyOnRails
[11:24:23] nfk|laptop: mikecmpbll, because everything visitor sees is shown by Angular so it has its own internal models (it's built for PHP world, I guess) and those are based on JS arrays
[11:25:08] hahuang65: has joined #RubyOnRails
[11:25:13] rodfersou: has joined #RubyOnRails
[11:25:14] mikecmpbll: where does the link to users/0 come from? and why's it using some index rather than the ID from the json data that you've got from Rails
[11:26:19] nfk|laptop: mikecmpbll, the link comes from angular-ui-router module if that makes you so happy and i do use the ID, it's just i'm using ID-1 to get the correct item
[11:26:39] Dbugger: has joined #RubyOnRails
[11:26:44] mikecmpbll: the ID from rails will be correct though, why do -1?
[11:26:50] nfk|laptop: so my Angular code looks like <td><a href="#/students/{{student.id-1}}">{{student.name}}</a></td>
[11:27:50] nfk|laptop: mikecmpbll, the path to JSON, yes, but I need to also generate a path for the Angular and that either means doctoring the URL from Rails or generating them on my own which is what I do right now
[11:28:03] nfk|laptop: and every time i do that, i need to remember to use -1 to generate it correctly
[11:28:03] ql6wlld: has joined #RubyOnRails
[11:28:30] mikecmpbll: i don't understand why you are doing -1 on the id.
[11:28:40] Dbugger: Hey fellas. If I have an object I can do "MyClass.new", but what I would like to do my custom "new", something like "MyClass.myNew". Where should I code this?
[11:29:06] nfk|laptop: because Rails user User (or Student) and it's 1 based while users (or students) in Angular is 0 based
[11:29:16] nfk|laptop: and they must map 1:1 or very bad things will happen
[11:29:33] mikecmpbll: why it is 0 based?
[11:29:44] mikecmpbll: it should be finding the user in angular based on the ID, not index.
[11:29:44] nfk|laptop: because Angular was designed that way
[11:29:59] tildes: dbugger: depends on what you want to do in myNew and which objects will have it
[11:30:03] nfk|laptop: it's not really built for Rails but for whatever you like, no backend included
[11:30:32] Dbugger: tildes, I just found out that I was doing it right, but I forgot to "reload!" in the console :P Thanks anyway
[11:30:40] mikecmpbll: nfk|laptop : do you have some code that you've written where you're using the index?
[11:30:43] mikecmpbll: to find the user
[11:30:46] tildes: dbugger no worries
[11:31:04] nfk|laptop: mikecmpbll, i actually posted a sample line some minutes ago
[11:31:12] mikecmpbll: nfk|laptop : that was for your route
[11:31:16] nfk|laptop: as for full code, i'm not quite allowed to show that much
[11:31:24] nfk|laptop: there's no search right now
[11:31:28] mikecmpbll: i'm talking about where that ID then gets used after someone clicks that link./
[11:31:31] nfk|laptop: but there will be, eventually
[11:31:37] futilegames: has joined #RubyOnRails
[11:32:03] nfk|laptop: mikecmpbll, much like i have a vague idea where an ID gets used in Rails, I have next to no idea where it gets used in Angular
[11:32:28] nfk|laptop: do you know how fuel burs in your car's engine?
[11:32:44] mikecmpbll: don't be facetious.
[11:32:59] nfk|laptop: i'm not joking, you don't have to know internals to use something
[11:33:21] mikecmpbll: you're being ignorant, i'm trying to explain that you're confused between indexes and IDs
[11:33:31] nfk|laptop: so i only know as much as i have needed to know which isn't much with Rails and basically nothing with Angular as I'm still an utter novice
[11:33:34] mikecmpbll: and you're pretty much ignoring me, so yeah, thanks but cya.
[11:33:44] rvanlieshout: i doubt angular doesn't let you use a proper unique reference
[11:34:08] nfk|laptop: mikecmpbll, i explained multiple times with examples that the IDs are used for Angular routing
[11:34:34] nfk|laptop: how that routing works is not a question i can answer
[11:35:17] ldnunes: has joined #RubyOnRails
[11:36:57] nfk|laptop: rvanlieshout, WHICH PART OF 0 VS. 1 BASED DO YOU NOT UNDERSTAND? Both of you. Angular has unique IDs (at least as long as you don't use find or sort in a controller, perhaps), they're just offset by -1
[11:39:21] quazimodo: has joined #RubyOnRails
[11:39:48] sp1rs: has joined #RubyOnRails
[11:40:20] workmad3: nfk|laptop: it kinda sounds like angular is using an internal JS array index holding the collection as an ID...
[11:40:40] mikecmpbll: nfk|laptop : took me 2 minutes to find this: http://angular-rails.com/view_recipe.html
[11:41:07] mikecmpbll: it shows using angular to fetch the user (in this case recipe) by it's ID ...
[11:41:24] nfk|laptop: workmad3, i'm pretty sure i said that's probably the case like half an hour ago
[11:42:17] workmad3: that would require reading backlog though :P
[11:42:46] workmad3: and the last bits I saw kept on referring to ID instead of index, which is a pretty big difference
[11:44:57] Ergo^: has joined #RubyOnRails
[11:45:09] cgfbee: has joined #RubyOnRails
[11:45:23] finnnnnnnnnnn: has joined #RubyOnRails
[11:46:11] nfk|laptop: mikecmpbll, thanks for that link but skipping over the whole text, i saw nothing about the issue with index offset
[11:46:39] mikecmpbll: that's the point.
[11:46:47] mikecmpbll: it's not doing anything with an index.
[11:47:05] blackmesa: has joined #RubyOnRails
[11:48:49] nfk|laptop: perhaps they did some magic elsewhere or perhaps i messed up or perhaps they messed up, who knows
[11:49:19] mikecmpbll: i have an inkling
[11:49:36] workmad3: nfk|laptop: can't see any magic there... I can see where they configure the router to point `/foo/:fooId` to `FooController` and then use the id to generate that route instead of array indexes...
[11:50:10] nfk|laptop: i do not use array indexes
[11:51:10] nfk|laptop: if i do /students/3 it will do GET /students/3.json
[11:52:23] workmad3: nfk|laptop: then something in your codebase is getting you (and everyone you're describing the problem to) confused
[11:52:45] nfk|laptop: but because for Angular that ID 3 is actually 4th [0,1,2,3], it will effectively fetch the wrong user
[11:52:52] nfk|laptop: err, wrong item
[11:52:58] helpa: http://i.imgur.com/tyViD.gif
[11:53:06] epochwolf: mikecmpbll: care to share?
[11:53:28] mikecmpbll: ACTION gets an extra large
[11:53:28] helpa: http://i.imgur.com/m9m3wr9.gif
[11:53:38] Didac: has joined #RubyOnRails
[11:53:42] workmad3: nfk|laptop: maybe show a bit more code... currently, from what you've shown, your link generating is using the ID from rails, and your links will fetch the provided ID... so I now can't see where your problem is appearing
[11:54:00] Dbugger: I wanted to ask you all your opinion on how to organize data on a particular problem. We have a business selling rims and tyres. Sometimes we sell them mounted together. So now we want to have a list of all products sold: Rims, Tyres and complete Wheels, but we are not sure how to do it. My boss suggested linking every rim and tyre, adding a field tyre_id to all the rims that were sold mounted as a wheel, linking them with the
[11:54:00] workmad3: nfk|laptop: the only place it gets weird is because you're doing `id - 1` at one point
[11:54:00] Dbugger: corresponding tybe, but I do not like this approach. For one, you have sometimes "tyre" entries in the database, that you can't know if they are sold by themselves or mounted. What would be the best way to do this?
[11:54:01] georgedrummond: has joined #RubyOnRails
[11:54:30] marcdel: has joined #RubyOnRails
[11:54:36] nfk|laptop: workmad3, i'm doing it in only one place and only because it was showing the wrong student otherwise
[11:55:02] Dbugger: Another thing that we want to track, is if we sell complete sets of 4, which can be sets of 4 rims, sets of 4 tyres, or sets of 4 complete wheels... It gets more complex as you see.
[11:55:38] nfk|laptop: workmad3, i can't explain where it comes from but the first student for Angular is /#/students/0 while for rails it's /students/1
[11:56:25] delgiudices: has joined #RubyOnRails
[11:56:36] nfk|laptop: imagine if you had to make Rails show the first student as /students/0, that's what I have in reverse
[11:56:47] workmad3: nfk|laptop: you could show your angular view and controller code for the index and show actions, so people trying to help you actually have code to base their help on rather than conjecture
[11:57:15] nfk|laptop: workmad3, i have said before, i can show bits and whatnot but i'm not allowed to publish full code
[11:57:28] epochwolf: nfk|laptop: if you can't share the code, we can't help you.
[11:57:38] nfk|laptop: i can share some code
[11:57:45] rake_db_migrate: has joined #RubyOnRails
[11:57:58] elaptics: if you can share enough that shows the problem you're having then we might be able to help
[11:58:04] workmad3: nfk|laptop: well, I just pointed out the code that would help... so pony it up, or hire a consultant ;)
[11:58:12] workmad3: (also, I'm off for lunch, bbiab)
[11:58:24] epochwolf: hmmm... I might know a consultant or two.
[11:58:29] vale_tudo: has joined #RubyOnRails
[11:58:55] pawnbox: has joined #RubyOnRails
[11:59:01] nfk|laptop: elaptics, if you knew Angular, I don't think i'd need to show you anything as it's literally the default behaviour afaik, and if you don't, I don't think you'll just hop into it and understand it but I guess maybe I'm just that stupid that i can't do that
[11:59:58] nfk|laptop: epochwolf, i'm not being paid for this, mind you
[12:00:20] elaptics: so you're not being paid but you're not allowed to share the code that you're writing?
[12:00:26] epochwolf: Funny, I'm not being paid to help.
[12:00:47] nfk|laptop: the fact that the system is dealing with students should have given you a clue that it's for an educational establishment and those aren't exactly know for shelling out big bucks to develop systems, only to buy what's already made at eye watering prices
[12:01:16] elaptics: then I guess they're getting what they paid for
[12:01:29] epochwolf: nfk|laptop: I've worked with plenty of systems that deal with students and none of those systems were installed at a school. :P
[12:01:38] nfk|laptop: and funny enough, i'm writing a replacement for one of those systems
[12:01:51] nfk|laptop: epochwolf, a uni has students as well
[12:02:31] nfk|laptop: a school generally won't pay even for excel if it wasn't licensed to them already
[12:02:58] epochwolf: Yeah. I know. I've worked with plenty of them.
[12:03:10] epochwolf: Student loans, school transcripts, etc.
[12:03:10] mark3: has joined #RubyOnRails
[12:04:05] King_Rex: has joined #RubyOnRails
[12:07:11] nfk|laptop: btw, have you considered calling yourself deptwolf? :/
[12:07:24] nfk|laptop: or loanwolf?
[12:08:10] epochwolf: nah, I've had this name since March, 2007.
[12:08:23] epochwolf: It predates my entry into the job market.
[12:09:00] epochwolf: Besides, I can make a clever pun with this one: Epoch C Wolf :D
[12:09:07] nfk|laptop: there's been so many *wolf nicks lately, that i'm always a bit confused at them
[12:09:43] nfk|laptop: i fail to C where that C comes from
[12:09:59] sandelius: has joined #RubyOnRails
[12:10:14] epochwolf: It's an auditory pun. Epoxy Wolf
[12:10:53] nfk|laptop: perhaps it's just due to me not being a native speaker
[12:11:02] epochwolf: ACTION shrugs
[12:11:19] totimkopf: ACTION shares bagel bites
[12:11:28] AzaToth: has joined #RubyOnRails
[12:11:29] mark3: has joined #RubyOnRails
[12:11:30] epochwolf: totimkopf: you are my new best friend.
[12:11:41] nfk|laptop: thanks but no, i already had my share of unhealthy food
[12:11:58] epochwolf: Anyway, I can't really change my name at this point. Half of my friends call me Epoch.
[12:12:13] nfk|laptop: at least it's not epoxy
[12:12:18] nfk|laptop: that would be kinda bad
[12:12:18] totimkopf: epochwolf: you shouldn't, it's the best nick ever
[12:12:43] epochwolf: totimkopf: I know right? Everytime someone in #ruby mentions epoch time, my ears perk up.
[12:13:11] epochwolf: It's like a dog seeing a squirrel.
[12:14:28] totimkopf: epochwolf: may I PM you, kind sir? I have an offtopic thing I'd like to discuss
[12:14:32] bronson: has joined #RubyOnRails
[12:14:45] rickmasta: has joined #RubyOnRails
[12:16:59] rake_db_migrate: has joined #RubyOnRails
[12:17:09] edwinvdgraaf: has joined #RubyOnRails
[12:22:16] taiar: has joined #RubyOnRails
[12:24:07] AntiSpamMeta: has joined #RubyOnRails
[12:25:52] sandelius: has joined #RubyOnRails
[12:29:46] taiar: has joined #RubyOnRails
[12:30:04] _Tariq: has joined #RubyOnRails
[12:31:35] ferr: Could anyone help me on this? https://gist.github.com/Fercell/9df3e1aac4e4bc38123c90307b791150
[12:32:04] p1k: has joined #RubyOnRails
[12:33:04] rvanlieshout: and what if you use a second .where?
[12:33:50] GnuYawk: has joined #RubyOnRails
[12:34:12] GnuYawk: has joined #RubyOnRails
[12:35:11] epochwolf: ferr: what's the error for Driver.active.includes(:user).where('drivers.manager_id = ?', team)
[12:36:43] ferr: epochwolf: http://pastie.org/private/ag2ga4rynlvusaewjpsuq
[12:37:25] epochwolf: (drivers.manager_id = 71,36) is invalid
[12:38:08] epochwolf: You need .where('drivers.manager_id IN (?)', team)
[12:38:24] ferr: epochwolf: what does that IN do?
[12:38:35] Yeomra: has joined #RubyOnRails
[12:38:53] ferr: Yea, that works
[12:38:58] DylanJ: is item IN the collection
[12:39:03] drbayer: has joined #RubyOnRails
[12:39:19] ferr: Oh, yea, that is what I need
[12:39:46] DylanJ: = is only for "does this actually equal this exact value"
[12:40:19] DylanJ: if team is an array you should be able to use .where(drivers: { manager_id: team })
[12:41:07] DylanJ: and you have a drivers association ..
[12:44:02] baweaver: has joined #RubyOnRails
[12:47:25] dannyguk: has joined #RubyOnRails
[12:48:45] brt: has joined #RubyOnRails
[12:51:23] jmignault: has joined #RubyOnRails
[12:52:06] _Tariq: has joined #RubyOnRails
[12:52:27] rake_db_migrate: has joined #RubyOnRails
[12:52:43] fmcgeough: has joined #RubyOnRails
[12:54:49] Megamos: has joined #RubyOnRails
[12:55:36] marcdel: has joined #RubyOnRails
[12:57:38] nartes: has joined #RubyOnRails
[12:57:48] jsrn: has joined #RubyOnRails
[13:00:09] krz: has joined #RubyOnRails
[13:01:46] _Tariq: has joined #RubyOnRails
[13:01:48] workmad3: nfk|laptop: so... no code then
[13:04:47] jero_: has joined #RubyOnRails
[13:05:08] centrx: has joined #RubyOnRails
[13:08:12] _Tariq: has joined #RubyOnRails
[13:08:44] _Tariq: has joined #RubyOnRails
[13:10:07] finnnnnnnnnnn: has joined #RubyOnRails
[13:10:49] SeductiveError: has joined #RubyOnRails
[13:11:30] King_Rex: has joined #RubyOnRails
[13:11:37] CodaBrink: has joined #RubyOnRails
[13:12:18] flashpoint9: has joined #RubyOnRails
[13:14:01] duderonomy: has joined #RubyOnRails
[13:14:39] daftmonk: has joined #RubyOnRails
[13:15:27] daftmonk: I'd like to use poltergeist/selenium etc for :js => true tests in capybara, but when I specify js: true my "login" method appears to no longer work as expected/desired, I'm using Warden test mode
[13:16:08] johnflux: has joined #RubyOnRails
[13:16:08] johnflux: has joined #RubyOnRails
[13:16:08] sp1rs: has joined #RubyOnRails
[13:16:11] daftmonk: also I noticed, when running selenium, if I for example try to just manually fill out my login form and hit submit, the original login page renders on a port like localhost:44051 but then the submit ends up going to localhost:3000 which doesn't seem correct
[13:16:18] daftmonk: what might I be missing here?
[13:17:20] bahar: has joined #RubyOnRails
[13:18:38] epochwolf: daftmonk: I don't think warden runs in test mode when using selenium.,
[13:18:47] arup_r: has joined #RubyOnRails
[13:19:35] pawnbox: has joined #RubyOnRails
[13:19:41] n008f4g_: has joined #RubyOnRails
[13:19:53] pawnbox: has joined #RubyOnRails
[13:20:55] epochwolf: daftmonk: https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Capybara
[13:22:58] godzillaenlacasa: has joined #RubyOnRails
[13:23:33] nfk|laptop: workmad3, i might have figured out that magic bit, if i do -1 in each controller, it just might work
[13:23:41] nfk|laptop: *each angular controller
[13:24:08] rvanlieshout: it's never going to work
[13:24:09] Devalo: has joined #RubyOnRails
[13:24:13] rvanlieshout: if you keep on using an index as an id
[13:24:26] rvanlieshout: it'll fail after the first record you'll delete
[13:24:36] DragonPunch: has joined #RubyOnRails
[13:25:13] daftmonk: epochwolf, thanks
[13:25:49] sudoubuntu: has joined #RubyOnRails
[13:25:52] mikecmpbll: just came back from lunch and you're still trying to use index.
[13:26:09] hahuang65: has joined #RubyOnRails
[13:26:48] p1k: rvanlieshout: AR attributes don't do what I want really
[13:26:54] spiman: has joined #RubyOnRails
[13:27:27] p1k: at least the default seems to be to enforce typecast on get/set
[13:27:30] chipotle: has joined #RubyOnRails
[13:28:02] rvanlieshout: p1k: you could try composed_of
[13:28:06] rvanlieshout: to see if you get the raw value there
[13:28:27] merida: has joined #RubyOnRails
[13:28:35] joshkovach: has joined #RubyOnRails
[13:29:28] GodFather: has joined #RubyOnRails
[13:29:42] georgedrummond: has joined #RubyOnRails
[13:29:57] sevenseacat: has joined #RubyOnRails
[13:30:02] epochwolf: mikecmpbll: I think we need more popcorn. This channel is a never ending source of amusement.
[13:30:03] bahar: has joined #RubyOnRails
[13:30:49] p1k: rvanlieshout: ah type_cast_from_user is over-ridable though, I think I was wrong
[13:31:27] n1lo: has joined #RubyOnRails
[13:31:57] workmad3: p1k: there's also _before_type_cast methods for attributes that allow you to access raw values
[13:32:39] nfk|laptop: rvanlieshout, please understand that Angular has its own model inside it, okay?
[13:32:44] nfk|laptop: same to mikecmpbll
[13:33:53] adlerdias: has joined #RubyOnRails
[13:33:53] rvanlieshout: but it's still wrong
[13:33:53] nfk|laptop: if deleting poses an issue (not that stuff will get deleted, much), i'll think of it then
[13:33:59] rvanlieshout: angular knows about a foreign reference
[13:33:59] workmad3: nfk|laptop: yeah, we get that... but considering using array indexes as ids is completely braindead and I've seen people use angular, I'm fairly sure this issue is one of your own making, not a default angular thing
[13:34:01] rvanlieshout: so it can just use the id
[13:34:06] elaptics: nfk|laptop: off by 1 errors are not a thing you want to have to be dealing with, you're going to cause yourself a lot of hassle
[13:34:27] workmad3: nfk|laptop: but without seeing your code (which you refuse to share) there's nothing more we can say other than 'stop using indexes as ids)
[13:34:57] nfk|laptop: i'm not using indexes as id, the code is per one of the better angular rails tutorials
[13:35:02] Megamos: How do I write a uniqueness scope that only look for matches within the model of the current user? validates :name, presence: true, uniqueness: { scope: :name }, will check all
[13:35:03] TheRokh: has joined #RubyOnRails
[13:35:07] epochwolf: ACTION chokes on his tea
[13:35:47] epochwolf: Megamos: um... you're doing that wrong.
[13:36:04] sp1rs: has joined #RubyOnRails
[13:36:07] epochwolf: oh, wait, no... I misread. It's good.
[13:36:10] workmad3: nfk|laptop: you, or angular, are using array indexes as ids... as that's a braindead idea, I'm suspecting it's something in your code... if it's from a tutorial, chances are the tutorial isn't as good as you think
[13:36:11] Megamos: epochwolf, yes I know. That code checks for all records
[13:36:37] epochwolf: Megamos: what records do you want to check?
[13:37:03] Megamos: epochwolf, I just want a scope that looks for the current_user creating a record. So other users can use same name, but a user can only have one of the same
[13:37:26] epochwolf: Megamos: can you post the code for the user model and the model you're looking to be unique?
[13:38:05] epochwolf: In a gist, if you please. :) https://gist.github.com/
[13:39:58] sp1rs: has joined #RubyOnRails
[13:40:17] rake_db_migrate: has joined #RubyOnRails
[13:40:46] Megamos: epochwolf, https://gist.github.com/megamos/7daf0e0b089fb93bad2364a6b47acd78
[13:42:53] Pupeno: has joined #RubyOnRails
[13:43:31] Megamos: epochwolf, I added some more to make associations more clear
[13:43:51] epochwolf: Megamos: excellent, I'll take a look.
[13:44:32] epochwolf: Megamos: so you want practices to be unique for the venue?
[13:44:43] Megamos: epochwolf, yes
[13:44:53] Megamos: epochwolf, the name of a practice
[13:44:57] epochwolf: validates :name, presence: true, length: { in: 3..80 }, uniqueness: { scope: :venue_id }
[13:45:11] MrMaynes: has joined #RubyOnRails
[13:45:29] epochwolf: scope is the scope of the uniqueness of name. Having scope: :name makes no sense. :)
[13:45:41] Megamos: ..... :) ofc.
[13:46:08] Megamos: epochwolf, thanks mate. I'll try to think abit harder before asking next time
[13:46:31] epochwolf: Megamos: happens to all of us. :)
[13:47:20] PedramT: has joined #RubyOnRails
[13:47:38] Pupeno_: has joined #RubyOnRails
[13:48:21] chipotle: has joined #RubyOnRails
[13:49:38] myntcake: has joined #RubyOnRails
[13:49:55] Ergo__: has joined #RubyOnRails
[13:51:04] rickmasta: has joined #RubyOnRails
[13:52:07] epochwolf: ^ Also, this is why we ask for code. Megamos's stated question was missing a lot of important details.
[13:53:39] epochwolf: Code is clearer than trying to use english to describe the the context of the question.
[13:54:13] daftmonk: has left #RubyOnRails: ("Leaving")
[13:54:28] ngauthier: has joined #RubyOnRails
[13:55:08] Megamos: epochwolf, true that
[13:56:00] marcdel: has joined #RubyOnRails
[13:56:52] epochwolf: Megamos: yeah, you're good. You just provided a good example of how to ask for help. :)
[13:58:52] maxdoubt: has joined #RubyOnRails
[14:03:54] elaptics: < 5m from code being posted to problem being solved :)
[14:04:12] ekinmur: has joined #RubyOnRails
[14:07:23] drewdfw: has joined #RubyOnRails
[14:08:17] Yeomra: has joined #RubyOnRails
[14:12:02] herbst: has joined #RubyOnRails
[14:12:02] herbst: has joined #RubyOnRails
[14:16:48] joshkovach: has joined #RubyOnRails
[14:17:16] jmignault: has joined #RubyOnRails
[14:18:14] Rubie: has joined #RubyOnRails
[14:18:27] jhack: has joined #RubyOnRails
[14:18:45] moeabdol2: has joined #RubyOnRails
[14:19:17] sp1rs: has joined #RubyOnRails
[14:21:40] owenjones: has joined #RubyOnRails
[14:24:29] patrick-sartent: has joined #RubyOnRails
[14:25:59] dstarh: has joined #RubyOnRails
[14:27:08] hahuang65: has joined #RubyOnRails
[14:27:51] crameth: has joined #RubyOnRails
[14:28:55] Uranio: has joined #RubyOnRails
[14:29:14] joshkovach: has joined #RubyOnRails
[14:29:46] nfk|laptop: workmad3, and you and others were right, deleting a user did break stuff, time to fix it, but first i'm going home, bb
[14:30:59] workmad3: nfk|laptop: well, it was pretty obvious that anything vaguely trivial that broke the index->id sequencing would do so... things like pagination, non-contiguous IDs, server-side ordering or filtering...
[14:31:18] rubyonrailed: has joined #RubyOnRails
[14:32:09] Macaveli: has joined #RubyOnRails
[14:33:11] Wingar: has joined #RubyOnRails
[14:33:22] herbst: has joined #RubyOnRails
[14:33:39] herbst: has joined #RubyOnRails
[14:34:15] tjohnson: has joined #RubyOnRails
[14:36:34] rake_db__: has joined #RubyOnRails
[14:37:14] edwinvdgraaf: has joined #RubyOnRails
[14:38:44] alyyy: has joined #RubyOnRails
[14:41:02] Macaveli: has joined #RubyOnRails
[14:41:25] merida: has joined #RubyOnRails
[14:43:24] djellemah: has joined #RubyOnRails
[14:44:29] DefV: I want a function to have the signature "meta(property: 'og:description')", but I feel doing `def meta(fields); prop, field = fields.to_a[0]; end` is quite dirty. Is there a better way?
[14:45:10] Wingar: has joined #RubyOnRails
[14:45:29] epochwolf: I'm having an issue with RVM on the server, /usr/local/rvm/bin doesn't have any of the installed rubies in it.
[14:46:15] DylanJ: DefV: if you use ruby 2... you can do exactly that and you have a variable called property with a value "og:description"
[14:47:55] herbst0: has joined #RubyOnRails
[14:48:13] flashpoint9: has joined #RubyOnRails
[14:48:19] DylanJ: DefV: https://gist.githubusercontent.com/DylanJ/2438ca7b61284bc2f0ef864aa2911b7e/raw/d8af9fe145f6a6e5d2e84c06029a6f143cbe16f2/keyargs.rb
[14:50:06] Devalo: has joined #RubyOnRails
[14:51:25] DefV: DylanJ: well, I don't know what the keyname will be
[14:51:32] DefV: and I also need the keyname
[14:52:36] DylanJ: then i guess just do def meta(fields); fields.each { |k,v| whatever }; end
[14:53:47] adavia: has joined #RubyOnRails
[14:55:37] vedu: Hello. I am having problems setting up MySQL. code and error: https://gist.github.com/vedant1811/a795c32e92be937d6349e8025a5d7364
[14:55:40] rubyonrailed: has joined #RubyOnRails
[14:56:31] djellemah: has joined #RubyOnRails
[14:56:34] GnuYawk: has joined #RubyOnRails
[14:56:47] marcdel: has joined #RubyOnRails
[14:56:58] GnuYawk: has joined #RubyOnRails
[14:57:18] stannard_: has joined #RubyOnRails
[14:57:28] DylanJ: does /tmp/mysql.sock exist? is mysql running? where did you get /tmp/mysql.sock from?
[14:58:57] Sylario: has joined #RubyOnRails
[15:00:13] emilkarl: has joined #RubyOnRails
[15:00:41] mhoungbo_: has joined #RubyOnRails
[15:01:05] nartes: Hi guys. I use latest RoR. But can't write validates :column, :presence ...._id
[15:01:15] nartes: Rails says that column method is missing.
[15:01:17] Sylario: I want to add an route search to a namespace, but adding post :search in the namespace create a "products/:product_id/search" route, and i only want "products/search/" route
[15:01:34] Sylario: i meant resource, not namespace, sorry
[15:01:45] nartes: On the other hand old version validates_presence_of works find, but rubocop says that its and old style! you are a bastard!)
[15:02:00] epochwolf: sylario: use collection :search, not member :search
[15:02:04] nartes: How to fix issue with this validation
[15:02:07] Sylario: I did some search but i think i do not formulate my question correctly
[15:02:23] vedu: DylanJ: Got it from the rails guides :( And mysql is working. `mysql -u root -p` works
[15:02:33] Sylario: epochwolf: thanks
[15:02:54] nartes: this guide says to do that bad way with :column. http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Rails/Validation
[15:03:08] epochwolf: nartes: please gist the actual code.
[15:03:13] vedu: nartes: full code please
[15:03:56] epochwolf: nartes: include both the working validator and the non-working one.
[15:04:13] nartes: https://github.com/nartes/distributer-shop/commit/2378c94d3fbea2f94d5f98319b5804a5d57f7228#commitcomment-17007919
[15:04:38] epochwolf: nartes: validates :manufacturer_id, presence: true
[15:04:49] epochwolf: :column is a placeholder./
[15:04:59] nartes: aha, i am freak! really, i missed the point! ))) Thanks a lot!
[15:05:14] epochwolf: nartes: http://guides.rubyonrails.org/active_record_validations.html read up. :)
[15:05:16] mdel: has joined #RubyOnRails
[15:05:24] _djbkd: has joined #RubyOnRails
[15:05:52] epochwolf: Easy enough mistake to make when you haven't seen the newer validation format.
[15:06:23] hxegon: has joined #RubyOnRails
[15:06:51] rasalghul: has joined #RubyOnRails
[15:07:07] w09x_: has joined #RubyOnRails
[15:08:22] vedu: DylanJ: oh I just had to delete the socket: key?! Thanks :)
[15:09:03] mices: has joined #RubyOnRails
[15:10:06] rake_db_migrate: has joined #RubyOnRails
[15:10:29] jhack: has joined #RubyOnRails
[15:13:06] B1n4r10: has joined #RubyOnRails
[15:13:53] wij32: hi guys, I have a school, which has classes which has children. But I want my children to belong to school and a class, which is the best way here?
[15:14:24] epochwolf: wij32: any reason you can't have both relations?
[15:14:27] mikecmpbll: tell them to go to school
[15:14:44] wij32: epochwolf: I guess I can. Was wondering if there was a 'proper' way for this design pattern?
[15:14:55] epochwolf: wij32: in practice, things get messy.
[15:15:10] mikecmpbll: to through, or not to through.
[15:15:15] epochwolf: wij32: a student could belong to the school but not yet be placed in a class.
[15:15:15] wij32: Maybe I will do school > clases > children
[15:15:44] rake_db__: has joined #RubyOnRails
[15:16:10] Pupeno: has joined #RubyOnRails
[15:16:13] sandelius: has joined #RubyOnRails
[15:17:18] smatic: has joined #RubyOnRails
[15:17:43] mDuff: has joined #RubyOnRails
[15:19:49] B1n4r10: has joined #RubyOnRails
[15:21:43] wij32: would it be better design to put each school on a separate subdomain with their own instnace of the app running?
[15:21:51] wij32: hmm, just as I wrote that it didnt sound very efficient
[15:25:11] disgrntld: has joined #RubyOnRails
[15:27:26] B1n4r10: has joined #RubyOnRails
[15:28:10] hahuang65: has joined #RubyOnRails
[15:29:55] delgiudices: has joined #RubyOnRails
[15:30:07] Ropeney: has joined #RubyOnRails
[15:31:31] futilegames: has joined #RubyOnRails
[15:31:50] hinbody: has joined #RubyOnRails
[15:32:51] rubyonrailed: I’m having trouble using Devise with my Rails engine. I followed the devise wiki here https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine But my devise routes are not showing up. Here’s a gist of the code. https://gist.github.com/anonymous/f4619e18a09199e52ee58fdfeabc36a6
[15:35:53] jgt4: has joined #RubyOnRails
[15:37:38] djbkd: has joined #RubyOnRails
[15:38:46] smathy: has joined #RubyOnRails
[15:39:14] Ropeney: rubyonrailed, did u delete code from your engine definition?
[15:40:38] mostlybadfly: has joined #RubyOnRails
[15:41:16] Ropeney: I think your missing class Engine < ::Rails::Engine; end
[15:42:28] baweaver: has joined #RubyOnRails
[15:44:33] someish: has joined #RubyOnRails
[15:44:33] Frem: has joined #RubyOnRails
[15:44:59] stujah: has joined #RubyOnRails
[15:45:06] [Butch]: has joined #RubyOnRails
[15:45:13] rubyonrailed: ropeney: I Have that in my engine.rb The class in my first gist is my_engine.rb as in my plugin name. This is engine.rb https://gist.github.com/JasonMannon/a7738ea40545dd4885c06903c350bf80
[15:51:37] StevenXL: Hi guys. I have a rake task that creates a SQL file. I want to turn this on my heroku dyno and then download the file.
[15:51:56] StevenXL: I've had this problem often, and was just wondering if anyone has any recommended solutions.
[15:53:01] benlieb: has joined #RubyOnRails
[15:53:36] adavia: is rails 5 still in beta version?
[15:54:57] alex88: has joined #RubyOnRails
[15:55:23] godzillaenlacasa: has joined #RubyOnRails
[15:57:30] context: adavia: why dont you look and tell us what the internet says
[15:57:30] marcdel: has joined #RubyOnRails
[15:58:35] vedu: The mysql2 gem doesn't roll back indices? https://gist.github.com/vedant1811/b83683228d91040d2b6ea1fbd240982b
[16:00:15] adavia: context: it says "RC1 on March 1 and then final on March 16" which of course could have changed but we are on april 7 thats why i ask
[16:01:16] tildes: has joined #RubyOnRails
[16:01:45] finnnnnnnnnnn: has joined #RubyOnRails
[16:02:24] Ropeney: adavia, afaik its at 5.0.0.beta3
[16:03:52] adavia: ropeney: yes
[16:04:09] rake_db_migrate: has joined #RubyOnRails
[16:06:12] hinbody: has joined #RubyOnRails
[16:09:09] djbkd: has joined #RubyOnRails
[16:10:33] Pupeno_: has joined #RubyOnRails
[16:10:59] chipotle: has joined #RubyOnRails
[16:12:16] jamey-uk: has joined #RubyOnRails
[16:12:40] jamey-uk: Has anyone integrated Azure AD with OmniAuth?
[16:14:59] stujah: has joined #RubyOnRails
[16:20:32] Devalo: has joined #RubyOnRails
[16:20:32] matt_d: jamey-uk: nope, sorry.
[16:20:52] n008f4g_: has joined #RubyOnRails
[16:21:42] merida: has joined #RubyOnRails
[16:23:40] andrew-l: has joined #RubyOnRails
[16:24:27] sunya7a_: composite keys in activerecord. I only find composite_primary_keys gem....is there a native solution in place...or any plans for one in the works?
[16:25:47] bob434: has joined #RubyOnRails
[16:26:39] mices: what wrong with this <% @friended = current_user.profile.friendables.where('accepted = true and (from_id = ? OR to_id = ?)', current_user.id, current_user.id) %>
[16:27:49] vedu: Seems like the mysql2 gem is broken while postgres works fine: https://gist.github.com/vedant1811/b83683228d91040d2b6ea1fbd240982b
[16:28:04] apeiros: mices: apart from having logic in your template, which you really shouldn't?
[16:28:52] hahuang65: has joined #RubyOnRails
[16:29:48] matt_d: mices: doesn't look like enough info to help debug the issue. also, apeiros is right. move that over to your controller.
[16:30:45] Yeomra: has joined #RubyOnRails
[16:31:25] Malgorath: has joined #RubyOnRails
[16:32:40] mbreedlove: has joined #RubyOnRails
[16:33:45] sudoubuntu: has joined #RubyOnRails
[16:36:21] jgt4: has joined #RubyOnRails
[16:36:45] w09x: has joined #RubyOnRails
[16:41:59] brt: has joined #RubyOnRails
[16:44:23] shinnya: has joined #RubyOnRails
[16:44:56] kies: has joined #RubyOnRails
[16:45:12] mikecmpbll: has joined #RubyOnRails
[16:45:24] maxdoubt: has joined #RubyOnRails
[16:45:26] stannard: has joined #RubyOnRails
[16:45:47] stannard: has joined #RubyOnRails
[16:46:15] moeabdol: has joined #RubyOnRails
[16:46:33] stannard: has joined #RubyOnRails
[16:46:40] nodejunkie: has joined #RubyOnRails
[16:50:40] mbreedlove: has joined #RubyOnRails
[16:52:27] flashpoint9: has joined #RubyOnRails
[16:52:59] brt: has joined #RubyOnRails
[16:54:01] [Butch]_: has joined #RubyOnRails
[16:54:38] M-shine: has joined #RubyOnRails
[16:54:59] jenrzzz: has joined #RubyOnRails
[16:55:15] Disavowed: has joined #RubyOnRails
[16:55:17] xhoy: has joined #RubyOnRails
[16:55:22] blackmesa: has joined #RubyOnRails
[16:57:56] DoctorMonocular: has joined #RubyOnRails
[16:58:25] dionysus69: has joined #RubyOnRails
[16:58:32] marcdel: has joined #RubyOnRails
[16:59:38] arup_r: What that child_index: true option is doing here? http://tutorials.pluralsight.com/ruby-ruby-on-rails/ruby-on-rails-nested-attributes#adding-new-associations
[16:59:51] arup_r: first time I am seeing this option.
[17:00:39] diegoviola: has joined #RubyOnRails
[17:00:52] mikecmpbll: anyone here use ufw ? having a nightmare with it and #netfilter told me to fo with questions about "shitty" netfilter front ends and #ubuntu isn't being much help :D
[17:01:17] flashpoint9: has joined #RubyOnRails
[17:01:55] mikecmpbll: i had iptable rules that i added previously through iptables and i wanted rid of these so i could start afresh with ufw. i did sudo iptables --flush; sufo ufw allow 22; sudo ufw enable; and i got booted out of SSH
[17:01:58] mices: has joined #RubyOnRails
[17:03:23] mikecmpbll: from looking at iptables -L -v on other servers with ufw compared to this one, it seems the INPUT rules that ufw uses (i think?) were cleared out during iptables --flush ?
[17:04:05] agit0: has joined #RubyOnRails
[17:04:15] rake_db_migrate: has joined #RubyOnRails
[17:04:54] srinidhi: has joined #RubyOnRails
[17:04:56] KensoDev: has joined #RubyOnRails
[17:05:42] VeryBewitching: has joined #RubyOnRails
[17:05:57] epochwolf: mikecmpbll: nice work :D
[17:07:00] sleungcy: has joined #RubyOnRails
[17:07:42] diegoviola: has left #RubyOnRails: ("WeeChat 1.4")
[17:10:15] Macaveli: has joined #RubyOnRails
[17:11:56] epochwolf: mikecmpbll: do you have a way to get back into the server now that ssh is blocked?
[17:12:20] mikecmpbll: yeah, i have console access. i was able to get back in by doing sudo ufw reset
[17:12:31] mikecmpbll: which changed the default INPUT rule back to ACCEPT
[17:13:02] mikecmpbll: and disables ufw
[17:13:41] rake_db_migrate: has joined #RubyOnRails
[17:13:45] workmad3: mikecmpbll: hmm... I've tended to try to avoid directly playing with `iptables` too much when dealing with ufw
[17:14:20] mikecmpbll: i thought i wouldn't need to, i thought ufw stuff would just takeover but then i noticed my old iptables rules were still there, so i wanted to get rid of them :[
[17:14:44] workmad3: ah right, yeah... ufw just adds firewall rules, it doesn't clear out everything else in iptables
[17:14:54] workmad3: that would suck, it would make ufw impossible to use with things like fail2ban :)
[17:15:31] mhoungbo_: has joined #RubyOnRails
[17:15:52] mikecmpbll: on my servers that i never used iptables on and just set up ufw, when i do sudo iptables -L -v, the INPUT section looks like this: https://gist.github.com/mikecmpbll/6d469c1946c245900be9c74b01631713
[17:16:09] mikecmpbll: for the ones where i've flushed iptables then enabled ufw that section is empty.
[17:16:20] mikecmpbll: so i'm assuming it's related to that :/
[17:16:39] hahuang65: has joined #RubyOnRails
[17:16:41] workmad3: sounds like a reasonable assumption
[17:17:07] jgt4: has joined #RubyOnRails
[17:18:22] mikecmpbll: the docs for ufw are really lame considering it's considered the default firewall configuration tool
[17:21:43] kknight: has joined #RubyOnRails
[17:22:28] workmad3: yeah, they're a bit sparse :)
[17:23:03] chouhoulis: has joined #RubyOnRails
[17:23:34] manfrin: has joined #RubyOnRails
[17:23:58] chouhoulis: has joined #RubyOnRails
[17:24:13] kastenspasten: has joined #RubyOnRails
[17:24:45] flashpoint9: has joined #RubyOnRails
[17:25:30] diegoaguilar: has joined #RubyOnRails
[17:25:34] smatic: has joined #RubyOnRails
[17:27:22] aaronr: has joined #RubyOnRails
[17:27:46] Malgorath: hello again everyone
[17:29:01] jenrzzz: has joined #RubyOnRails
[17:30:23] tubbo: iptables is pretty lame :D
[17:30:27] Spami_: has joined #RubyOnRails
[17:32:27] rake_db_migrate: has joined #RubyOnRails
[17:33:31] smathy: ...not as lame as getting booted out of ssh ;)
[17:34:14] brentw: has joined #RubyOnRails
[17:35:46] VeryBewitching: Host *\ServerAliveInterval 60
[17:37:10] n008f4g_: has joined #RubyOnRails
[17:38:34] audy: has joined #RubyOnRails
[17:39:08] Mia: has joined #RubyOnRails
[17:42:24] baweaver: has joined #RubyOnRails
[17:42:51] pawnbox: has joined #RubyOnRails
[17:43:23] arup_r: What that child_index: true option is doing here? http://tutorials.pluralsight.com/ruby-ruby-on-rails/ruby-on-rails-nested-attributes#adding-new-associations. first time I am seeing this option.
[17:43:33] akshat: has joined #RubyOnRails
[17:46:50] mdw: has joined #RubyOnRails
[17:48:51] tubbo: arup_r: http://apidock.com/rails/ActionView/Helpers/FormHelper/fields_for#512-Setting-child-index-while-using-nested-attributes-mass-assignment
[17:49:21] tubbo: believe its for customizing how those fields get named
[17:49:39] arup_r: ok, I did not check that doc, but it seems undocumented officialy
[17:49:40] tubbo: but i'm not sure, doesn't seem to be documented well anywhere
[17:50:42] delgiudices: has joined #RubyOnRails
[17:50:50] Devalo: has joined #RubyOnRails
[17:51:05] DoctorMonocular: has joined #RubyOnRails
[17:52:59] _djbkd: has joined #RubyOnRails
[17:55:03] mdw: has joined #RubyOnRails
[17:55:18] KorriX: has joined #RubyOnRails
[17:56:40] rogue_koder: has joined #RubyOnRails
[17:57:33] tildes: has joined #RubyOnRails
[17:58:46] ramfjord: has joined #RubyOnRails
[17:59:00] marcdel: has joined #RubyOnRails
[18:00:44] Yeomra: has joined #RubyOnRails
[18:02:27] [Butch]: has joined #RubyOnRails
[18:06:37] Cohedrin: has joined #RubyOnRails
[18:07:50] [Butch]: has joined #RubyOnRails
[18:11:58] sleungcy: has joined #RubyOnRails
[18:12:35] mwlang: has joined #RubyOnRails
[18:14:45] cpruitt: has joined #RubyOnRails
[18:14:48] sp1rs: has joined #RubyOnRails
[18:14:58] mwlang: Is there a good strategy to organizing i18n yaml files so I I can avoid duplicating translations in every context it appears in? For example, I want to translate the word “item” just once at a top-level scope (or whatever) so it resolves no matter what scope was queried and if I happen to override it at the specific scope level queried, then that more specific scope takes precedence.
[18:15:13] sleungcy_: has joined #RubyOnRails
[18:15:31] baweaver: has joined #RubyOnRails
[18:18:04] [Butch]: has joined #RubyOnRails
[18:19:01] cpruitt: Every once in a while someone in this channel will reference a link to a page descibing the problem with someone asking for a specific “how do I do very specific thing X” instead of explaining what they’re trying to do and getting a good answer tha tmight be very different than “very specific thing X”. Anyone know what I’m talking about?
[18:19:37] jgt4: has joined #RubyOnRails
[18:20:55] cpruitt: Nevermind. XY problem. Found it. :-)
[18:21:26] smathy: mwlang, is item anything to do with an active record model? Fallbacks already exist there.
[18:21:44] rake_db_migrate: has joined #RubyOnRails
[18:21:44] smathy: mwlang, otherwise just write your own helper to go back through the hierarchy.
[18:21:46] finnnnnnnnnnn: has joined #RubyOnRails
[18:24:05] hooinator: has joined #RubyOnRails
[18:24:45] finnnnnnnnnnn: has joined #RubyOnRails
[18:25:18] mwlang: smathy: my own helper seems to be best option. “items” isn’t always part of the AR. Another example is “basket” and “shopping cart”
[18:26:01] mwlang: which I do realize I can tie to “orders” table…but some scenarios would be stretching it, tbh
[18:28:25] edwinvdgraaf: has joined #RubyOnRails
[18:30:51] njero: has joined #RubyOnRails
[18:31:56] diegoviola: has joined #RubyOnRails
[18:32:50] RegulationD: has joined #RubyOnRails
[18:34:09] joshkovach: has joined #RubyOnRails
[18:34:18] KensoDev: has joined #RubyOnRails
[18:36:07] Devalo: has joined #RubyOnRails
[18:36:24] sergey_makagon: has joined #RubyOnRails
[18:36:25] pcpanic: has joined #RubyOnRails
[18:36:56] cpruitt: has joined #RubyOnRails
[18:37:05] dannyguk: has joined #RubyOnRails
[18:37:31] ferr: has joined #RubyOnRails
[18:37:51] dever: has left #RubyOnRails: ()
[18:38:21] pcpanic: Hello peoples! I get Permission denied @ rb_sysopen file.zip when I run code from controller but with exact same code in rake task it works, what the diff?
[18:38:35] adavia: for creating ember apps is it better to use the ember-cli-rails gem or create two separate apps?
[18:38:41] syndikate: has joined #RubyOnRails
[18:38:59] smtp: has joined #RubyOnRails
[18:39:28] drbayer: has joined #RubyOnRails
[18:39:44] Guest64988: How to do subquery selection like 'SELECT a.*, sq.counter FROM authors a, (SELECT c.author_id, COUNT(*) as counter FROM commits c WHERE c.project_id = ? GROUP BY c.author_id) sq WHERE a.id = sq.author_id;' in active record?
[18:39:54] Guest64988: where author and commit are models
[18:40:03] M-shine: has joined #RubyOnRails
[18:40:24] mwlang: pcpanic: probably the path of the file you’re attempting to open is different in each context.
[18:41:44] tildes: has joined #RubyOnRails
[18:41:51] pawnbox: has joined #RubyOnRails
[18:42:00] B1n4r10: has joined #RubyOnRails
[18:43:05] brentw: is it true that OSX is the prefered OS for rails dev? Any issues w/ using fedora or arch?
[18:43:36] arup_r: Guest64988: from where value of `c.project_id = ? ` is coming?
[18:44:09] pawnbox: has joined #RubyOnRails
[18:44:11] arup_r: brent_: I used Ubuntu, openSUSE, now Mac :) so all was good
[18:44:40] mikecmpbll: has joined #RubyOnRails
[18:44:52] w09x: has joined #RubyOnRails
[18:45:04] arup_r: I used Windows while I was learning Ruby, then slowly move for some reasons, which I don't remember.
[18:45:46] arup_r: pcpanic: show your code with error
[18:45:48] pcpanic: mwlang: exactly! what's the diff in context?
[18:46:08] brentw: i'm new to rails and programming in situations which require servers and gems and such. Is it easy to work on the same projects on both an osx and linux machine?
[18:46:31] pcpanic: arup_r: agent.get("https://reporting.com/music/publish/partnerreportsdownload?u=0&year=#{year}&period=DAILY&subperiod=#{year}-#{month}-#{yday}").save(localfile)
[18:46:40] pcpanic: agent is an instance of mechanize
[18:46:57] mwlang: arup_r: ruby on windows is like riding horses on asphault. You can do it and it works, but it’s just plain wrong. :-)
[18:47:21] arup_r: mwlang: back then just used IRB and Notepad++ :D
[18:47:34] brentw: i understand i can work through github, to keep files up tot date, but like i said i'm new to servers,db's and other web related things. Is it easy to jump between a linux and osx machine on the same project
[18:48:02] arup_r: When I switched to Ubuntu, I was so happy.. I can't express
[18:48:53] arup_r: pcpanic: what is localfile?
[18:49:01] pcpanic: just a string
[18:49:03] solars: has joined #RubyOnRails
[18:49:04] brentw: arup_r what made you siwtch to osx from linux?
[18:49:09] pcpanic: like file.zip
[18:49:51] arup_r: yes, I know. But show me how you constructed the path..
[18:50:32] jtong: has joined #RubyOnRails
[18:50:38] patrick_star_2: has joined #RubyOnRails
[18:50:38] mwlang: brent_: for all intents and purposes, linux and mac support for Ruby is equivalent. The main difference is the package manager you use to install system libraries and your options for editors and IDE’s (if that’s your cup of joe)
[18:50:40] arup_r: brent_: people in Ruby talk mailing list.. They said me
[18:51:38] arup_r: They also said why I should change my environment. but that's 3 years back, I forgot the context.
[18:51:41] sergey_makagon: has joined #RubyOnRails
[18:52:14] nickjj: the main difference is about $1,000 :D
[18:52:15] rake_db__: has joined #RubyOnRails
[18:53:26] ekinmur: has joined #RubyOnRails
[18:53:55] pawnbox: has joined #RubyOnRails
[18:54:52] LastWhisper____: has joined #RubyOnRails
[18:55:06] brentw: so i understand it works on linux, but is it hard to maintain a project between a both a linux and osx machine?
[18:55:30] yfeldblum: has joined #RubyOnRails
[18:55:52] mwlang: brent_: no.
[18:56:08] aegis3121: has joined #RubyOnRails
[18:56:20] sjm: has joined #RubyOnRails
[18:56:24] brentw: mwlang: thanks
[18:56:32] mwlang: brent_: code repositories like git are exactly for this sort of thing.
[18:57:10] Guest1982: arup_r: Guest64988: from where value of `c.project_id = ? ` is coming? -- the question mark is just a parameter to the query
[18:57:24] mwlang: brent_: if you’re in the habit of always checking your code in when done with a feature, you’ll likely also be in the habit of git pulling it on your other machine before starting work.
[18:57:24] brentw: mwlang: yeah, i understand that. but like i said i'm new to using servers and wondering how that affects thigns beyond git
[18:57:38] Detch: has joined #RubyOnRails
[18:57:52] Guest1982: e.g. SELECT a.*, sq.counter FROM authors a, (SELECT c.author_id, COUNT(*) as counter FROM commits c WHERE c.project_id = 123 GROUP BY c.author_id) sq WHERE a.id = sq.author_id;
[18:58:11] Guest1982: i dont know how to express it idiomatically
[18:58:21] Guest1982: maybe i can't
[18:58:38] Guest1982: like what i want is the author model, but with an additional count parameter
[18:58:49] tubbo: like maybe an author_count?
[18:58:54] mwlang: brent_: one way to learn is to install virtualbox on your computer and install another OS. makes it easy to emulate having two or more machines and moving data between them.
[18:59:07] Guest1982: sure, but it's a subquery result that's quite dynamic
[18:59:17] Guest1982: i can't store it on the model
[18:59:18] mwlang: *install another OS as a guest VM*…
[18:59:59] fox_mulder_cp: has joined #RubyOnRails
[19:00:03] marcdel: has joined #RubyOnRails
[19:00:49] mdw: has joined #RubyOnRails
[19:00:51] fox_mulder_cp: hi. what hook for model i need, when i try to create object of this model and want to change it property?
[19:00:54] brentw: mwlang, i'll give it a shot
[19:02:18] mwlang: fox_mulder_cp: after_create
[19:04:03] webdestroya: has joined #RubyOnRails
[19:05:53] akkmaxon: has joined #RubyOnRails
[19:06:13] emilkarl: has joined #RubyOnRails
[19:06:17] DoctorMonocular: has joined #RubyOnRails
[19:08:12] RegulationD: has joined #RubyOnRails
[19:09:02] jtong: has joined #RubyOnRails
[19:09:08] agit0: has joined #RubyOnRails
[19:09:17] PedramT: has joined #RubyOnRails
[19:09:48] algernop_k: has joined #RubyOnRails
[19:11:38] Detch: has joined #RubyOnRails
[19:11:47] netzfisch: has joined #RubyOnRails
[19:12:58] pawnbox: has joined #RubyOnRails
[19:13:03] Disavowed: has joined #RubyOnRails
[19:13:27] michael_mbp: Hi All - I'm Looking for #remote #work as #Ruby on #Rails #developer, 5+ years experience
[19:13:28] Silox|: has joined #RubyOnRails
[19:13:30] michael_mbp: http://buff.ly/1MfHi34
[19:14:31] petor: has joined #RubyOnRails
[19:16:59] blackmesa: has joined #RubyOnRails
[19:19:04] d0nn1e: has joined #RubyOnRails
[19:21:07] antgel: has joined #RubyOnRails
[19:21:47] merida: has joined #RubyOnRails
[19:22:58] aldodelgado: has joined #RubyOnRails
[19:24:11] magikid: has joined #RubyOnRails
[19:25:15] aldodelgado: Question? I just finished upgrading an old rails 3 application and now I'm getting "Mass Assignment" warnings from Code Climate. I see in the models the last developer used "attr_accessble". Should I remove those? There are no tests in this application to tell me if I'm breaking the code. So not sure whats a good approach to patch this.
[19:25:53] weaksauce: aldodelgado yeah. use strong parameters for that in rails4
[19:26:14] aldodelgado: thanks @weaksauce
[19:26:23] weaksauce: params.require(:someclass).permit(the_whitelisted_params)
[19:26:58] weaksauce: might want to write some tests though
[19:27:03] aldodelgado: weaksauce: Just wanted to make sure I was taking a good approach
[19:27:08] aldodelgado: doing that also
[19:27:32] arBmind: has joined #RubyOnRails
[19:30:45] nickenchuggets: has joined #RubyOnRails
[19:30:55] kies: has joined #RubyOnRails
[19:31:21] baweaver: has joined #RubyOnRails
[19:31:49] Detch: has joined #RubyOnRails
[19:33:35] rodfersou: has joined #RubyOnRails
[19:33:56] akkmaxon: has joined #RubyOnRails
[19:34:09] quazimodo: has joined #RubyOnRails
[19:34:13] akkmaxon: has joined #RubyOnRails
[19:34:48] pawnbox: has joined #RubyOnRails
[19:38:08] ramfjord_: has joined #RubyOnRails
[19:40:11] alaing: has joined #RubyOnRails
[19:40:22] alaing: has joined #RubyOnRails
[19:40:39] jstransky: has joined #RubyOnRails
[19:41:17] alaing: hi how can i see what @template has to offer me? i am in byebug at the moment and trying to build custom form builder
[19:42:29] jstransky: I have a css duplication problem I’m hoping someone can help with.
[19:43:01] jstransky: I have this line in my layout.html.erb file. <%= stylesheet_link_tag 'application', 'main', media: 'all' %>
[19:43:08] a1fa: has joined #RubyOnRails
[19:43:12] a1fa: is it possible to have a has_many with additional scope?
[19:43:37] arup_r: a1fa: yes.. the second argument it takes is a scope
[19:44:23] jstransky: where application.css.scss and main.scss both @import bootstrap, @import _variables.scss, and @import _mixins.scss
[19:44:25] srinidhi: has joined #RubyOnRails
[19:45:50] dcope: hi all, is there a helper method to iterate over batches of an AR result set?
[19:45:58] dcope: say i get 200 records back, is there a helper method to loop over them 5 at a time?
[19:46:10] dcope: instead of `each`
[19:46:30] SeanLazer: has joined #RubyOnRails
[19:46:45] jstransky: So obviously, the entire bootstrap core is included in both. I’d like it so the bootstrap core is only included in application.css. But… .scss files imported in main.scss rely on those variables/mixins
[19:48:09] jstransky: I tried just importing application.css.scss into main.scss, but that confuses one of my gems (dragula-rails) which apparently expects to be able inject css into application.css
[19:48:47] jstransky: Can someone help me figure out what to do?
[19:49:27] arup_r: you can import them @import bootstrap, @import _variables.scss, and @import _mixins.scss in appilcation.scss only. why in 2 places?
[19:49:30] smatic: hola a todos
[19:50:16] King_Rex: has joined #RubyOnRails
[19:50:18] jstransky: arup_r: because files imported into main.scss rely on variables and mixins defined in those files.
[19:50:19] arup_r: and also @import _variables.scss these has to be imported before bootstrap, @import bootstrap ..
[19:50:26] tildes: has joined #RubyOnRails
[19:50:46] arup_r: jstransky: main.scss is a menifest file?
[19:51:13] arup_r: but you did say this "I have this line in my layout.html.erb file. <%= stylesheet_link_tag 'application', 'main', media: 'all' %>"
[19:51:31] arup_r: I thought you are importing main.scss in application.scss also.
[19:51:39] a1fa: Model1.Model2.where('user_id = ?',current_user).each do < is there a better way of doing this
[19:51:48] jstransky: well, by “manifest” file do you mean its nothing but a list of imports?
[19:51:58] jstransky: or does the mean something else in rails?
[19:52:08] arup_r: something else in rails 1 min
[19:52:21] jstransky: Yah sorry, I’m bad at explaining
[19:52:25] baweaver: has joined #RubyOnRails
[19:52:32] arup_r: what you see in assets.rb file?
[19:53:15] arup_r: I'll tell you if it is menifest or not :) or show us application.scss content only the included or imported part
[19:53:39] jstransky: Rails.application.config.assets.precompile += %w( admin.css )
[19:53:40] jstransky: Rails.application.config.assets.precompile += %w( main.css )
[19:53:46] Darmani: has joined #RubyOnRails
[19:53:56] arup_r: hmm it is a menifest file
[19:54:04] eyeamaye: has joined #RubyOnRails
[19:54:14] arup_r: so then I don't know why is it duplicating..
[19:54:35] arup_r: jstransky: http://guides.rubyonrails.org/asset_pipeline.html#manifest-files-and-directives
[19:54:57] fox_mulder_cp: folks, how to implement market basket in my rails app?
[19:55:01] jstransky: Let me gist it for you, that will make more sense
[19:55:05] arup_r: but that wouldn't answer why duplicating, it is just to tell what is menifest
[19:55:33] fox_mulder_cp: in rails agile development i read about basket model, which create when user add some into basket...
[19:55:37] arup_r: fox_mulder_cp: what that term means ? :)
[19:55:38] stannard: has joined #RubyOnRails
[19:55:46] jenrzzz: has joined #RubyOnRails
[19:55:46] jenrzzz: has joined #RubyOnRails
[19:55:54] arup_r: ok.. **Cart**
[19:56:32] fox_mulder_cp: but some people says me, that this way - bad idea for real production
[19:57:21] rake_db_migrate: has joined #RubyOnRails
[19:57:44] weaksauce: bad is pretty subjective fox_mulder_cp
[19:57:54] jstransky: arup_r: think I just figured it out. I think it has to do with *= require statement
[19:58:12] jstransky: *= require dragula
[19:58:26] arup_r: jstransky: nice
[19:59:06] arup_r: don't use them, use manual @import .. as u are using sass-rails gem, their readme told about it.
[19:59:38] ur5us: has joined #RubyOnRails
[19:59:52] ur5us: has joined #RubyOnRails
[19:59:56] fox_mulder_cp: https://pragprog.com/titles/rails5/source_code
[20:00:02] fox_mulder_cp: this book code
[20:02:49] weaksauce: fox_mulder_cp i mean bad is a generic term for lazy thinking. every approach has tradeoffs.
[20:03:12] weaksauce: fox_mulder_cp asking them why it's bad is a good start
[20:04:09] weaksauce: maybe knowing the patterns of what people put into their carts and when is important for your low volume business.
[20:04:11] fox_mulder_cp: weaksauce: so, don't worry and use described methods in this manual?
[20:04:47] weaksauce: fox_mulder_cp I can't make that call for you but i'd ask the people who said it's "bad" to do in production why they think that
[20:05:22] jstransky: arup_r: are you saying the *= require dragula is optional in that I can just use @import ‘dragula’ ?
[20:05:50] fox_mulder_cp: weaksauce: i think about use sql for cart bad idea - may be true path - use session
[20:06:19] fox_mulder_cp: but when we use sql - we can control reservation of resoure, which user wants
[20:06:35] weaksauce: it's use case dependent
[20:07:45] arup_r: jstransky: ok sorry here I saw https://github.com/twbs/bootstrap-sass#a-ruby-on-rails
[20:09:18] benlieb: has joined #RubyOnRails
[20:09:28] _djbkd: has joined #RubyOnRails
[20:12:37] jstransky: arup_r: sorry was afk.
[20:12:55] jstransky: arup_r: that IS how I’m importing bootstrap, the library in question is dragula
[20:13:06] jstransky: dragula-rails that is
[20:13:43] arup_r: ok.. good then
[20:14:03] Macaveli: has joined #RubyOnRails
[20:14:04] arup_r: it is not about bootstrap, it is about sprockets directives
[20:14:13] arup_r: :) anyway good luck
[20:14:20] ramfjord: has joined #RubyOnRails
[20:15:19] domgetter: has joined #RubyOnRails
[20:15:51] domgetter: Is there an idiomatic way for a Rails server to send itself a post request?
[20:16:13] SteenJobs: has joined #RubyOnRails
[20:16:29] weaksauce: domgetter what's the use case?
[20:17:06] domgetter: weaksauce: I'd like to have it so that sending an email is its own request lifecycle
[20:17:29] domgetter: instead of sending an email *and* generating a html response for some action
[20:17:46] tubbo: domgetter: Net::HTTP.get 'http://localhost:3000/the/request' haha
[20:18:03] tubbo: domgetter: not sure how sending an email is at all relevant to this
[20:18:14] domgetter: So I figured it would make sense to just pass some of the params as a post request to the server to encapsulate that bit of work
[20:18:30] SteenJobs: hey guys - in a nested fields_for form, for my portfolio_links model, i have three text inputs - each corresponding to a potential portfolio_links object - problem is they all have the same name attribute, so only the final one is saved in params. is the best approach to just edit params in my controller before saving? (meaning map through each of the params objects and save them individually to the db with the proper attribute na
[20:18:34] weaksauce: why not use a background queue like suckerpunch or sidekiq?
[20:19:05] domgetter: tubbo: Since there's a render involved in sending an email, it doesn't seem appropriate for one request to be responsible for two renders
[20:20:18] PlasmaStar: has joined #RubyOnRails
[20:20:21] tubbo: domgetter: i'm still not really sure what you're trying to do here
[20:20:24] dannyguk: has joined #RubyOnRails
[20:20:45] domgetter: tubbo: also, weaksauce asked me about a usecase. I only asked what the idiomatic way is to send a post request to myself
[20:21:44] tubbo: domgetter: yeah i read that but i still wasn't entirely sure what you meant by "sending an email is its own request lifecycle"
[20:21:46] domgetter: weaksauce: In the new request, I'll pass it off to a queue
[20:22:27] tubbo: do you mean like "when i make a POST request to /some/endpoint, it sends an email?"
[20:22:46] czerasz: has joined #RubyOnRails
[20:23:22] domgetter: tubbo: no, I know how to send an email in an action with ActionMailer, I just want that to be in it's own request
[20:24:21] tubbo: domgetter: can you explain what you want without using any pronouns?
[20:25:12] arup_r: in my GemFile. I have gem 'rails', '~> 4.2.4'. But I found Vulnerabilities! So, I need to upgrade some gems. https://gist.github.com/aruprakshit/f2b77805cfc2719d8db9ccf275167cb9. So if I change the rails version to gem 'rails', '~> 4.2.5, all dependencies will be upgraded right?
[20:25:14] Maletor: has joined #RubyOnRails
[20:25:33] rickmasta: has joined #RubyOnRails
[20:25:46] Maletor: What am I doing so wrong that I can't do this join on the Developer model. When passing filter[term]=1 I get missing FROM-clause entry for table "terms" https://gist.github.com/maletor/68f8739d65a20cede224f3d467881b3f
[20:26:00] arup_r: what is the good step to follow while upgrading?
[20:26:58] tubbo: arup_r: i think if you just did `bundle update rails` it will update all the relevant dependencies. but it won't, e.g., update things that depend on rails.
[20:27:05] tubbo: it only updates rails and things rails depends on.
[20:27:45] domgetter: The current developer knows how to send an email in an action with ActionMailer. Said developer wants the sending of the email to be in a request that is separate from another request (we'll call this the "original request"). The original request was responsible for creating a record in the database, as well as sending a confirmation email that a
[20:27:45] domgetter: creation had occurred.
[20:28:21] tubbo: domgetter: so you want to use an HTTP request of some sort to send an email on demand
[20:28:34] codezomb: has joined #RubyOnRails
[20:28:50] arup_r: tubbo: then I have to upgrade those manually 1 by 1 as it is showing in the report?
[20:28:52] tubbo: usually people just offload that to a background job, or better yet, use deliver_later on the mailer to send it in the background implicitly with ActiveJob
[20:29:14] tubbo: arup_r: you have to/should update gems manually that depend on a given version of rails, if necessary...yeah.
[20:29:48] tubbo: arup_r: like when rails 5 comes out, you'll want to `bundle update rails`, run the `rails:update` rake task or whatever, and then update any gems that depend on rails 4 like redis-rails and pg
[20:29:49] jenrzzz_: has joined #RubyOnRails
[20:30:02] weaksauce: maletor can you add the stack trace to the gist?
[20:30:07] Maletor: weaksauce sure
[20:30:36] domgetter: tubbo: I just wanted to decouple that logic from this request. Is there no idiomatic way for a rails app/server to send itself a post request? That just seemed like the sort of thing it would be able to do, and had nice tools to do it with.
[20:30:59] domgetter: tubbo: Thank you for the input
[20:31:01] someish: has joined #RubyOnRails
[20:31:22] Maletor: weaksauce down
[20:31:44] tubbo: domgetter: ahh no i was just totally unsure what you wanted to do...it's a little unusual. anyway, check out Ruby's 'net/http' library documentation for an example on how to make a POST request easily
[20:32:04] tubbo: domgetter: rails apps typically don't need to make requests to themselves. why not just run the ruby?
[20:32:35] domgetter: tubbo: If that's the idiomatic way, then that's fine. I didn't know if there were already tools for the server to do that in a more privileged fashion
[20:32:41] Maletor: weaksauce i guess we can plainly see the terms table is not part of this join. but what i want is termed bugs to be preloaded but also be filtered by the id i give it
[20:34:10] B1n4r10: has joined #RubyOnRails
[20:34:40] tubbo: domgetter: nah, i mean...my thought process is this: https://gist.github.com/tubbo/f3435b95789430e164e119e835c1ac77
[20:34:40] Maletor: does what i'm trying to do make sense?
[20:35:13] tubbo: domgetter: like say you have some POST req that does some stuff. why not just encapsulate all that logic into its own PORO, then instead of having to deal with the overhead bullshit of an HTTP request, you can just run Ruby cod
[20:35:25] drbayer: has joined #RubyOnRails
[20:35:36] DoctorMonocular: has joined #RubyOnRails
[20:35:37] diegoaguilar: has joined #RubyOnRails
[20:35:50] Radar: Warm greetings to all, I am the Evi... oh wait wrong meme.
[20:35:51] Radar: GOOD MORNING
[20:35:57] alaing: i'm building a custom form builder and for some reason my content_tags are being escaped
[20:36:08] Radar: alaing: !rule0
[20:36:08] helpa: alaing: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[20:36:37] tubbo: i thought TheEvilEpoch was epochwolf
[20:37:09] Radar: tubbo: No idea who TheEvilEpoch actually is.
[20:37:49] tubbo: Radar: http://logs.ryanbigg.com/p/EvilEpoch
[20:37:56] benlieb: has joined #RubyOnRails
[20:38:08] alaing: https://gist.github.com/aliuk2012/672d601db37c289745897f77bfef9541
[20:38:11] Radar: tubbo: indeed
[20:38:22] FooMunki: has joined #RubyOnRails
[20:38:49] Ergo: has joined #RubyOnRails
[20:38:58] w09x: has joined #RubyOnRails
[20:39:01] arup_r: tubbo: as this gems https://gist.github.com/aruprakshit/f2b77805cfc2719d8db9ccf275167cb9#file-report-txt-L102-L110 come from rails core, I can't edit to Gemfile. Then how should I upgrade it? Should I do like `bundle update activemodel -v '>= 4.2.5.1'`
[20:39:03] tubbo: the hell is wrong with you man
[20:39:15] alaing: I'm trying to overload the default collection_radio_buttons and out the radio buttons with labels fields wrapped around it
[20:39:19] tubbo: arup_r: it should upgrade when you `bundle update rails`
[20:39:31] weaksauce: maletor this might be more complicated than you can do without dipping your toes into raw sql. I could be wrong though
[20:39:44] Radar: alaing: liberal use of html_safe on the content_tag results should fix it... although I would think that you don't need to do that by default
[20:39:52] domgetter: tubbo: what is the overhead of a new request? Either way, I'm just trying to make it so that there's one render per request, since that just makes sense to me.
[20:40:24] tubbo: domgetter: dependent on how much technical debt you have, if you have force_ssl turned on, etc.
[20:40:50] pawnbox: has joined #RubyOnRails
[20:40:56] tubbo: domgetter: i can say that it's a non-negligible amount of time. when you run an HTTP request to create a new model, it takes more time to respond back to you than if you just did YourModel.create
[20:41:00] tubbo: in like rails console
[20:41:05] arup_r: ok.. you meant, the one like `jquery-rails` https://gist.github.com/aruprakshit/f2b77805cfc2719d8db9ccf275167cb9#file-report-txt-L118 I need to edit in the Gemfile, and then `bundle update jquery-rails` .. I first time misunderstood you :)
[20:41:13] Maletor: I bet Radar knows
[20:41:19] Radar: maletor: maybe
[20:41:22] arup_r: thnks tubbo
[20:41:37] alaing: Radar: so like on line 18 just add .html_safe
[20:41:53] domgetter: tubbo: ah, I'm imagining that since the server is sending itself the request, it can do so in a streamlined fashion. I'll probably just have to write the thing I'm imagining myself.
[20:42:10] Radar: maletor: https://gist.github.com/maletor/68f8739d65a20cede224f3d467881b3f#file-developers_controller-rb-L7 where are you joining the terms table to this query?
[20:42:16] Radar: maletor: please point to the line
[20:42:31] Maletor: Radar I'm joing because i only want bugs that have a batch and the batches have terms.
[20:42:32] tubbo: domgetter: that's EXACTLY what i'm telling you dude...
[20:42:42] Radar: maletor: That is not the answer to my question.
[20:42:47] Radar: maletor: You are not joining the terms table.
[20:42:49] morenoh149: has joined #RubyOnRails
[20:42:52] Maletor: therefore my custom assoc. of "termed_bugs"
[20:42:59] Maletor: help me help myself?
[20:43:03] domgetter: tubbo: ...but still be a 'request'. That is, still run through routing and go through a controller and action.
[20:43:11] morenoh149: can you specify something like account has_at_least_one records?
[20:43:21] Radar: maletor: what even is a batch?
[20:43:22] tubbo: domgetter: no, you don't want to do that.
[20:43:45] Maletor: It's usually like the term of a week. and a term is usually a term of a year. but not always thus these assoc.
[20:43:50] arup_r: morenoh149: Rails have a has_one assoc right .
[20:43:53] Maletor: a term has many batches and a batch has many bugs
[20:44:05] arup_r: ok atleast one..
[20:44:25] tubbo: domgetter: like my question is more...why do you need all that other crap in there? why are you leveraging a router and a controller and an action when you could just call a method on a class?
[20:44:34] alaing: Radar: i've added some output from an rspec spec that i'm using to base the method on
[20:44:41] domgetter: tubbo: I don't have a production app with real people depending on me. This is all just me messing around and exploring, and if it is a bad idea, I'd like to find out and prove it to myself. Especially with some metrics
[20:44:58] alaing: it has the markup i'm hoping it will produce and the actual markup its currently returning
[20:45:00] Maletor: You asked what lines and it's defintely lines 6 and 7 of that first file in the gist. If it's not already clear I want to filter all the bugs that have a term id of 1 for instance while preloading them.
[20:45:10] arup_r: morenoh149: means when you are saving parent record, you want to save at least 1 child? Otherwise parent record save should fail?
[20:45:13] morenoh149: no, I need has_many but ensure at least one
[20:45:15] Radar: alaing: Oh I think I see what's happening then.
[20:45:19] Radar: maletor: !rule0
[20:45:19] helpa: maletor: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[20:45:29] Radar: alaing: https://gist.github.com/aliuk2012/672d601db37c289745897f77bfef9541#file-gistfile1-txt-L10-L17
[20:45:32] Maletor: https://gist.github.com/maletor/68f8739d65a20cede224f3d467881b3f#file-developers_controller-rb-L6-L7
[20:45:44] Radar: alaing: This should be doing each, not map. And then inside the each, wrap the content tags with concat()
[20:45:45] domgetter: tubbo: I want to do that so that it's simpler. Having every request in charge of a single render is simpler than having some in charge of one render, and others in charge of two or more.
[20:45:59] Radar: alaing: Otherwise the content that gets put inside that wrapping tag is an array of tags, and that's not what you want.
[20:46:22] morenoh149: custom validation it seems v
[20:46:24] tubbo: domgetter: haha what are you even talking about man
[20:46:25] morenoh149: http://stackoverflow.com/a/17813593/630752
[20:46:53] domgetter: tubbo: lol I only asked if there was already a way to do this, I didn't ask if it was a good idea.
[20:46:58] alaing: Thanks I'll try .each
[20:47:18] tubbo: domgetter: XD yeah i was just trying to figure out what you were doing b/c it seemed weird and/or interesting
[20:47:39] tubbo: but yeah, rails is a web framework...ruby speaks http inherently with net/http...so you're all good!
[20:48:13] snowy: has joined #RubyOnRails
[20:48:14] Maletor: Radar: ok, this is definitely more clear to us now. i changed lines 6 and 7 to be something that "works" but causes an N+1. My quesiton then would be how to defeat the N+1.
[20:48:14] Maletor: https://gist.github.com/maletor/68f8739d65a20cede224f3d467881b3f#file-developers_controller-rb-L6-L7
[20:49:09] Radar: maletor: Does this `if` actually run before that AMS render? https://gist.github.com/maletor/68f8739d65a20cede224f3d467881b3f#file-developers_controller-rb-L10-L13
[20:49:20] Radar: maletor: If it doesn't, then I could see that as being the reason for what you're seeing.
[20:49:32] jsrn: has joined #RubyOnRails
[20:49:48] Maletor: yes both if statements are running. if only one or the other than no N+1.
[20:50:02] domgetter: tubbo: haha I tend to code on the fringe. But I don't think I'm doing anything new in this case. Sort of like how with React you should work with the render pipeline, and not modify the DOM yourself.
[20:50:27] alaing: Radar: how do i use concat? cant i just do it a block within label?
[20:50:35] Radar: alaing: concat(label ... )
[20:50:58] domgetter: tubbo: In a sense, I'm trying to work with Rails instead of against it. I'm actually kind of surprised Rails doesn't offer a way to do this
[20:51:22] alaing: but i need <label><input type="radio">my radio button</label>
[20:51:36] someish: has joined #RubyOnRails
[20:51:57] alaing: wouldn;t concat just output <label>my radio button</label><input ....>
[20:51:57] bronson: has joined #RubyOnRails
[20:52:14] Radar: alaing: https://gist.github.com/radar/89ae7fd4af2af3a3fec997623a1a5104
[20:53:08] weaksauce: domgetter i don't see it as two renders though.
[20:53:26] weaksauce: it's a render with a background task that sends an email
[20:53:35] weaksauce: at least that's how most people do it
[20:54:00] alaing: ah ok i see now it would just concat all the labels/radio within records instead of tradtionally creating variable that you just keep concat until your loop is finsihed and then use that variable
[20:54:12] patrick-sartent: has joined #RubyOnRails
[20:54:32] sypheren: has joined #RubyOnRails
[20:54:43] tubbo: domgetter: it doesn't offer "a way to do this" because rails is a practicality-first framework, and something like this is not practical.
[20:55:02] tubbo: domgetter: in addition, Net::HTTP is part of the Ruby standard library so why *should* Rails have anything to do with this?
[20:56:31] alaing: has joined #RubyOnRails
[20:56:42] Maletor: Radar just the opposite. that if is running.
[20:56:53] alaing: Radar: concat is undefined method
[20:56:54] delgiudices: has joined #RubyOnRails
[20:57:00] Maletor: refer to the comment below with params
[20:59:16] domgetter: tubbo: It might turn out to be practical :)
[20:59:58] tubbo: domgetter: definitely write it up in a blog post if it does end up being practical. i'm just saying no one has seen it as practical until now.
[21:00:01] rake_db__: has joined #RubyOnRails
[21:00:53] w09x: has joined #RubyOnRails
[21:01:16] marcdel: has joined #RubyOnRails
[21:02:55] jero_: has joined #RubyOnRails
[21:05:09] solars: has joined #RubyOnRails
[21:05:31] DukeDave: So, I can url_for(my_model), but can I model_from(my_url)? :)
[21:07:18] maxdoubt: i’ve been fighting with this all day… when i run rake spec… it drops the db, but doesn’t recreate the tables… rake db:structure:load doesn’t appear to load tables… i can manually recreate all tables from psql and then rails is peachy… but once i re-run tests everything is blown away again and doesn’t come back. any ideas?
[21:08:36] delgiudices: has joined #RubyOnRails
[21:10:20] jtong_: has joined #RubyOnRails
[21:10:45] pawnbox: has joined #RubyOnRails
[21:11:18] mhoungbo: has joined #RubyOnRails
[21:11:50] DoctorMonocular: has joined #RubyOnRails
[21:13:17] Palsson: has joined #RubyOnRails
[21:13:46] alaing: has joined #RubyOnRails
[21:13:53] alaing: has joined #RubyOnRails
[21:13:58] tubbo: maxdoubt: database definitely shouldn't get outright dropped every time
[21:14:13] alaing: Radar: it keeps telling me that 'concat' is undefined
[21:14:40] maxdoubt: tubbo: seems like first part of rake spec is - DROP DATABASE IF EXISTS
[21:15:32] jtong: has joined #RubyOnRails
[21:16:08] yfeldblum: has joined #RubyOnRails
[21:18:00] benlieb: has joined #RubyOnRails
[21:18:42] alaing: this is the updated gist https://gist.github.com/aliuk2012/672d601db37c289745897f77bfef9541
[21:21:20] Cohedrin: has joined #RubyOnRails
[21:22:27] dannyguk: has joined #RubyOnRails
[21:23:20] Darmani: Hey Radar ^.^
[21:26:35] yohle: has joined #RubyOnRails
[21:28:26] baweaver: has joined #RubyOnRails
[21:29:29] dvinciguerra__: has joined #RubyOnRails
[21:31:18] maxdoubt: does rake db:structure:load require psql?
[21:31:42] workmad3: maxdoubt: it will if the structure.sql file was generated from a psql db
[21:32:27] maxdoubt: workmad3: ah… that would explain why it doesn’t work for me (i have no psql in my ruby container for docker)… is there a way to prevent rspec from dropping the database?
[21:33:04] B1n4r10: has joined #RubyOnRails
[21:33:43] workmad3: maxdoubt: you could probably remove the `ActiveRecord::Migration.auto_maintain_test_schema` (or something like that) incantation from your spec_helper or rails_helper file
[21:35:47] delgiudices: has joined #RubyOnRails
[21:37:38] Radar: Darmani: Hi. Did you ask of other people yet?
[21:38:12] pawnbox: has joined #RubyOnRails
[21:39:02] Darmani: Radar: Hey bro, no I figured out the problem eventually.
[21:39:53] Radar: Darmani: You can't just keep relying on me.
[21:39:56] Radar: I'm not around all the time.
[21:40:11] Darmani: Lol I told you I figured it out.
[21:41:06] Radar: Darmani: And I told you that you can't keep relying on me.
[21:41:49] Darmani: Radar: o.O
[21:47:59] fox_mulder_cp: Radar: hi :) how are you?
[21:48:45] cpruitt: has joined #RubyOnRails
[21:49:41] fox_mulder_cp: Radar: i have a question about cart implement in my app. some people says, that touch sql for it - bad idea, but ok for controlling positions reservation
[21:50:06] fox_mulder_cp: some people says that cart must stored in session...
[21:50:23] Jon30: I am trying to do LEFT OUTER JOIN, but then I am not getting the reference to the object. For example: Diamond.joins(:users) works fine and I am able to do diamond.user.name, but if I do Diamond.joins("LEFT OUTER JOIN users ON diamonds.user_id = users.id"), then diamond.user is nil. Any ideas how to make diamond.user reference the user?
[21:53:49] workmad3: Jon30: a LEFT OUTER JOIN will get you all Diamond instances, and join the user if there happens to be one, but it'll also return instances where user_id is null. The default for Diamond.joins(:users) is an INNER JOIN which will result in only Diamond rows that have user_id values
[21:53:50] capin: fox_mulder_cp: did you write your own cart solution?
[21:54:56] Jon30: workmad3, oh that makes sense... so diamond.user is only empty for the records that dont have reference to user. gotcha thanks
[21:55:01] capin: and from what I have read it is indeed a good idea to store the cart items in the session
[21:55:06] fox_mulder_cp: capin: i read rails agile development book, and take ideas from it
[21:55:22] stannard: has joined #RubyOnRails
[21:55:23] workmad3: Jon30: that should be the case, as long as you've also not modified the select clause to remove user_id :)
[21:55:54] fox_mulder_cp: may be a highload used redis/memcahe for sessions, but use main posgresql server for it...
[21:56:28] capin: fox_mulder_cp: i spent some time following this tut, http://code.tutsplus.com/articles/new-course-build-a-store-with-a-payment-gateway-in-rails--cms-22959 but eventually ended up going with the solidus gem
[21:57:01] crdpink: has joined #RubyOnRails
[21:57:14] workmad3: has joined #RubyOnRails
[21:57:39] bruno-: has joined #RubyOnRails
[21:58:06] DragonPunch: has joined #RubyOnRails
[21:58:58] fox_mulder_cp: but i intrested in cart, i have a very cpecific billing gateway
[21:59:30] DoctorMonocular: has joined #RubyOnRails
[21:59:48] capin: fox_mulder_cp: i'd recommend using solidus because it's pretty much a plug n play solution, and maybe you can adapt the gem to use your specific gateway
[22:00:12] Devalo: has joined #RubyOnRails
[22:00:28] capin: there's also an IRC channel / slack channel for solidus as well
[22:01:17] someish: has joined #RubyOnRails
[22:02:03] marcdel: has joined #RubyOnRails
[22:02:31] Maletor: so is it possible and i'm just doing it wrong or is this a problem with rails?
[22:02:58] fox_mulder_cp: capin: hhe. if i want write my own market i take an ready product
[22:03:20] fox_mulder_cp: but i write shared applications hosting control panel
[22:05:12] smatic: has joined #RubyOnRails
[22:05:14] capin: fox_mulder_cp: what do you mean by "shared applications hosting control panel" ?
[22:06:02] drbayer: has joined #RubyOnRails
[22:06:16] fox_mulder_cp: capin: my small heroku L)
[22:07:34] fox_mulder_cp: capin: i'm a hostmaster in two small hosting operators - domain registration, master dns, email, sql, apache/php hosting, backups, etc
[22:07:35] capin: ahhh, i'd recommend using Digital Ocean if you get a chance, very reliable and pretty inexpensive :)
[22:07:54] fox_mulder_cp: capin: see my last phrase ^^
[22:08:06] GodFather: has joined #RubyOnRails
[22:08:19] pawnbox: has joined #RubyOnRails
[22:08:26] capin: you still use apache?
[22:08:32] fox_mulder_cp: capin: i have a ~1k web sites per server on two my hosting
[22:08:51] fox_mulder_cp: capin: when nginx can read apache's .htaceess )))
[22:08:52] yfeldblum: has joined #RubyOnRails
[22:09:19] capin: ahhh i switched everything over to nginx myself ;)
[22:10:46] fox_mulder_cp: capin: ook. i have a EXTERNAL customers with shit's of bitrix, drupal, wp, and some other's php-based trash
[22:11:41] capin: damn that sucks :/ rails app due chew up a lot memory FWIW
[22:12:35] fox_mulder_cp: capin: when my ~k customers want to migrate from it's already worked php-based stuff - i make a car-crash ))
[22:13:48] AntiSpamMeta: has joined #RubyOnRails
[22:15:05] capin: well i'd make sure you keep that PHP stuff updated, i just read an article that outdated PHP CMS's is what contributed to the panama papers (-.-)
[22:16:39] fox_mulder_cp: capin: i use plesk, cpanel, ispmanager/vdsmanager,vesta, ispconfig... it's a php-based idiotic panels
[22:16:50] bob434: has joined #RubyOnRails
[22:17:00] fox_mulder_cp: which serve all services in one server - mail, dns, sql, web for client
[22:17:33] fox_mulder_cp: i write my own clustered project, with docker as containers for applications
[22:17:49] fox_mulder_cp: rails, nodejs, django, all, what client need )
[22:19:26] fox_mulder_cp: not only php stuff
[22:20:21] capin: ACTION is ready for a walk
[22:21:48] fox_mulder_cp: ~1.30am. ~20min to end of rewriting my own home finance quick app from aspnet to rails
[22:22:36] nettoweb: has joined #RubyOnRails
[22:23:09] dannyguk: has joined #RubyOnRails
[22:25:02] bob434: has joined #RubyOnRails
[22:25:59] GG: has joined #RubyOnRails
[22:26:42] ramfjord: has joined #RubyOnRails
[22:26:59] yohle: has joined #RubyOnRails
[22:27:36] ZerGabriel: has joined #RubyOnRails
[22:30:56] weaksauce: capin do you have a source on that php panama papers link?
[22:31:27] mwlang: Is there an easy way to turn a given hash into query parameters (URI) without resorting to the addressable gem?
[22:32:54] kknight: has joined #RubyOnRails
[22:33:00] ensyde_: has joined #RubyOnRails
[22:33:49] atm0sphere: has joined #RubyOnRails
[22:33:54] totimkopf: capin: enjoy your walk
[22:36:06] smathy: mwlang, https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=rails+create+query+params
[22:36:42] mwlang: Ah, I didn’t even think to query for “query” :-)
[22:37:15] smathy: ACTION would have also given points for: query string
[22:37:20] baweaver: has joined #RubyOnRails
[22:37:37] delgiudices: has joined #RubyOnRails
[22:38:16] mwlang: it’s like brain cramping on the term itself.
[22:38:24] capin: weaksauce: https://news.slashdot.org/story/16/04/07/008230/outdated-and-vulnerable-wordpress-drupal-versions-contributed-to-panama-papers-breach
[22:38:58] mwlang: slashdot still exists!?
[22:39:57] capin: mwlang: why wouldn't it?
[22:40:00] VeryBewitching: For so long as CmdrTaco can draw breath, it seems
[22:40:10] weaksauce: ha capin... the one good thing php has done for the world
[22:40:55] capin: weaksauce: ha :P i enjoy facebook as well ...my guilty pleasure (-.-)
[22:41:32] VeryBewitching: I'll tell ya, where I really decided to not follow PHP as a language anymore was \Their\Use\Of\This\Character\As\A\Namespace\Separator.
[22:41:36] mwlang: capin: no reason…they just got lost in the shuffle and fell off my radar. I’m reasonably sure it’s been about 10 years since I last hit their site.
[22:41:39] weaksauce: nothing good comes of php vulnerabilities in facebook though capin
[22:41:46] DragonPunch: has joined #RubyOnRails
[22:42:35] capin: weaksauce: well yeah, it's all custom code.
[22:45:13] SteenJobs: answered my q before in case you guys were so worried you couldn’t move on with your lives
[22:45:24] SteenJobs: fields_for is cool stuff when combined with accepts_nested_attributes
[22:45:52] flashpoint9: has joined #RubyOnRails
[22:46:58] capin: SteenJobs: i knew you could do it ;)
[22:47:03] SteenJobs: haha thanks man
[22:47:16] SteenJobs: usually can, you know how it is
[22:47:47] yfeldblum: has joined #RubyOnRails
[22:47:47] capin: yeah i just rely on stackoverflow to solve my problems :P
[22:47:49] SteenJobs: a combo of questions, few of which you’re truly stuck on, most of which you just need to kind of talk out and you’ll get it
[22:48:09] owenjones: has joined #RubyOnRails
[22:48:10] SteenJobs: honestly sometimes just stating my q is enough for the answer to hit me, or just talking it out with someone
[22:48:31] capin: SteenJobs: i think you should look into the ruberducky approach :)
[22:48:37] SteenJobs: yea only issue with stackoverflow is sometimes you don’t know what you should be looking for - that’s usually what i come here for, not the answers
[22:48:46] SteenJobs: oh i know allllll about it haha
[22:49:10] mwlang: SteenJobs: like how to turn hashes into uri query strings?
[22:49:39] SteenJobs: mwlang: haha was that something you’re quoting me on?
[22:50:20] mwlang: not that I’m aware of…just acknowledging what you’re sayin’
[22:50:52] mwlang: Usually I find the answers on SO or figure it out before I finish typing the question. Usually, it’s the gisting step that finds me the answer.
[22:51:00] SteenJobs: when s1 gives you direction, it’s much better - this way you still learn it on your own and gain those benefits, but you also don’t waste a shit ton of time looking in irrlevant places
[22:51:13] SteenJobs: haha yea, gisting often does it
[22:51:28] akshat: has joined #RubyOnRails
[22:51:29] capin: SteenJobs: are you the objc IRC room as well, i think i remember seeing you there a while ago?
[22:51:46] SteenJobs: that’s why your name looks so familiar!
[22:51:50] SteenJobs: swift and iphonedev
[22:51:54] SteenJobs: i stay far away from objc
[22:52:09] SteenJobs: except for some extenuating circumstances of course
[22:52:10] capin: ahhh yeah probably #iphonedev
[22:52:22] capin: haven't been in there in a while :/
[22:52:48] SteenJobs: same haha - i was doing iOS dev full time for a while, but ever since i started on this platform i’ve been doing 0 iOS and all rails dev
[22:53:26] capin: yeah I think web based apps are the futcha :P
[22:53:39] SteenJobs: i mean having a background in both is pretty great to have
[22:54:00] fourq: has joined #RubyOnRails
[22:54:16] SteenJobs: aright, i’ll be back in a bit. need a short break of fresh air.
[22:54:20] SteenJobs: getting antsy in this sbux
[22:54:22] girlydev: has joined #RubyOnRails
[22:54:27] srinidhi: has joined #RubyOnRails
[22:54:32] capin: a lot of companies still think having a rich client side app on a mobile platform is a good idea though :/
[22:55:03] twilling: has joined #RubyOnRails
[22:55:42] quazimodo: has joined #RubyOnRails
[22:59:00] 7F1AAP1G0: has joined #RubyOnRails
[23:01:11] johnflux: has joined #RubyOnRails
[23:02:15] DoctorMonocular: has joined #RubyOnRails
[23:02:46] marcdel: has joined #RubyOnRails
[23:03:36] neanderslob_: has joined #RubyOnRails
[23:04:20] Inside: has joined #RubyOnRails
[23:06:52] rubyonrailed: has joined #RubyOnRails
[23:12:38] delgiudices: has joined #RubyOnRails
[23:14:46] theery: has joined #RubyOnRails
[23:15:41] rubyonrailed: has joined #RubyOnRails
[23:18:45] maxdoubt: has joined #RubyOnRails
[23:20:17] joshkovach: has joined #RubyOnRails
[23:20:27] aloneintheworld: has joined #RubyOnRails
[23:24:03] DoctorMonocular: has joined #RubyOnRails
[23:24:17] patrick_star_2: has joined #RubyOnRails
[23:24:31] diegoaguilar: has joined #RubyOnRails
[23:26:03] p1k: has joined #RubyOnRails
[23:28:51] running_rails: has joined #RubyOnRails
[23:31:03] bronson: has joined #RubyOnRails
[23:31:16] Spami: has joined #RubyOnRails
[23:34:00] valetudo: has joined #RubyOnRails
[23:37:20] vale_tudo: has joined #RubyOnRails
[23:37:45] delgiudices: When a developer is hired for a job
[23:38:04] delgiudices: Is he expected to quickly be able to code and be productive
[23:38:18] delgiudices: Or is it normal that he/she takes longer than usual for easy tasks
[23:38:53] delgiudices: Taking into consideration there is a huge codebase he/she has to get used to
[23:39:27] Arcaire: Bit of both.
[23:39:35] delgiudices: Arcaire what do you mean
[23:39:46] Arcaire: I mean it's a bit of both.
[23:39:49] Arcaire: Little column A, little column B.
[23:39:55] Arcaire: Can be a mix of one and the other.
[23:40:08] quazimodo: has joined #RubyOnRails
[23:40:15] delgiudices: When would you say that developer is not qualified to work for the company?
[23:40:43] Arcaire: Probably at the interview stage, if at all.
[23:40:55] Technodrome: has joined #RubyOnRails
[23:41:01] owenjones: has joined #RubyOnRails
[23:41:22] Arcaire: Generally if you get through the interview stages you're qualified to work there.
[23:41:34] delgiudices: Well i got through it
[23:41:42] delgiudices: I'm in a "bootcamp" that takes like 1 to 4 weeks
[23:41:44] Arcaire: But if you don't ask and learn and show improvement in your methods then you're probably going to need to get some proper learning done.
[23:41:55] tvon: has joined #RubyOnRails
[23:42:17] delgiudices: The thing is it took me like 3-4 hours to do a simple refactoring of a function
[23:43:22] weaksauce: delgiudices why did it take that long?
[23:43:36] weaksauce: and was that considered that long?
[23:43:42] delgiudices: weaksauce well the function was like 200 hundred lines of code
[23:43:44] benlieb: has joined #RubyOnRails
[23:43:46] delgiudices: i don't know if it's long
[23:43:48] DLSteve: has joined #RubyOnRails
[23:43:55] delgiudices: But it was my first time running the tests
[23:44:04] delgiudices: Getting used to the testing tools and everything
[23:44:11] delgiudices: Looking at the code that i've never seen
[23:44:16] weaksauce: your dev lead should be giving you low hanging fruit
[23:44:25] delgiudices: what is low hanging fruit
[23:44:31] weaksauce: and it's not unreasonable to take a while so you don't break things
[23:44:45] weaksauce: easy picked fruit(easy tasks)
[23:44:59] delgiudices: All i had to do was take code out of the function
[23:45:06] delgiudices: And put it somewhere else
[23:45:08] ekinmur: has joined #RubyOnRails
[23:45:15] delgiudices: To keep the code more organized
[23:45:25] weaksauce: if they gave you the same task tomorrow would you take the same amount of time?
[23:45:46] delgiudices: The thing is i don't even know if i did it right
[23:45:50] delgiudices: He hasn't code review me yet
[23:46:14] weaksauce: I wouldn't stress too much
[23:46:16] delgiudices: And i have slept like 2 hours in the last 40 hours really stressed
[23:46:28] delgiudices: Probably that had to do with my performance aswell
[23:46:37] girlydev: Hello, I'm trying to use Klaviyo API with RoR 4.2.5 app, to render a template and send an email by using the POST form request, and it gave me an error of "Net::HTTPUnauthorized 401 UNAUTHORIZED readbody=true". Here is the pastie with the general idea of the code: http://pastie.org/private/cmkapqgkkbdhcusacg9mtq. Maybe one of you can help me figure out why I ran into this error? The Klaviyo API doc can be found at the bottom of
[23:46:45] girlydev: https://www.klaviyo.com/docs/api/email-templates *
[23:47:47] SteenJobs: has joined #RubyOnRails
[23:48:24] weaksauce: girlydev does that apikey work when you curl it?
[23:48:57] girlydev: weaksauce: yes. at least when i tried to do a GET request.
[23:49:07] mices: has joined #RubyOnRails
[23:49:31] weaksauce: what about the post example?
[23:51:16] meinside: has joined #RubyOnRails
[23:52:07] aznloren: has joined #RubyOnRails
[23:52:55] weaksauce: girlydev the only thing I can see might be that you haven't setup the external sender correctly yet
[23:53:10] dalbusch1t: has joined #RubyOnRails
[23:53:15] weaksauce: for that apikey
[23:53:32] Technodrome: anyone here a django dev?
[23:53:46] weaksauce: Technodrome a while ago yeah
[23:54:33] Technodrome: i am doing two somewhat large projects with both, kinda interesting how I look at them now
[23:55:28] Technodrome: well the django one i've worked on for a long time, so its been around for a while, but yeah, rails one is about 15 models or so in, and decent size as well
[23:56:10] girlydev: weaksauce: it could be it, not setup properly the external sender. tbh, i ran the pastie code on my Rails command line and thats how I found out about the error
[23:57:18] weaksauce: girlydev permissions can be granular and if they are not enabled for sending or the entire account is not enabled for sending then you'd probably get that kind of error
[23:57:34] _djbkd: has joined #RubyOnRails
[23:58:01] girlydev: weaksauce: from what i read in the Klaviyo API doc, it seems it just needs to send the api_key as part of each request
[23:58:13] weaksauce: girlydev though. it may be yelling at you because you have a malformed to email address
[23:58:35] girlydev: weaksauce: hmm, that's good to know. i also sent an email to their support to see what i might be oing wrong
[23:58:46] weaksauce: the 400 errors are "Request is missing or has an invalid API key."
[23:58:53] girlydev: weaksauce, haha i used actual real emails. i just wrote a dummy one in the pastie
[23:59:17] weaksauce: hopefully the real one has a .com at the end ;)
[23:59:33] Spami: has joined #RubyOnRails
[23:59:59] owenjones: has joined #RubyOnRails