« Back to channel list

#RubyOnRails - 25 February 2016

« Back 1 day Forward 1 day »
[00:00:16] nogic: has joined #RubyOnRails
[00:02:21] ppinkerton: has joined #RubyOnRails
[00:05:13] jeanlinux: has joined #RubyOnRails
[00:05:59] one_zero: has joined #RubyOnRails
[00:09:01] _Tariq: has joined #RubyOnRails
[00:13:00] mostlybadfly: has joined #RubyOnRails
[00:13:26] _bogus_: can anyone recommend me a simple cms that allows the user alters some content in the already created views without much change to the existing ?
[00:14:41] hahuang65: has joined #RubyOnRails
[00:15:24] jottr: has joined #RubyOnRails
[00:15:34] maxdoubt: has joined #RubyOnRails
[00:17:49] askhat: has joined #RubyOnRails
[00:18:07] DLSteve: has joined #RubyOnRails
[00:19:46] askhat: has joined #RubyOnRails
[00:21:38] askhat: has joined #RubyOnRails
[00:22:12] jottr_: has joined #RubyOnRails
[00:22:25] tejasmanohar: has joined #RubyOnRails
[00:23:00] askhat: has joined #RubyOnRails
[00:23:51] flashpoint9: has joined #RubyOnRails
[00:24:18] baweaver: has joined #RubyOnRails
[00:24:43] askhat: has joined #RubyOnRails
[00:26:26] askhat: has joined #RubyOnRails
[00:28:11] askhat: has joined #RubyOnRails
[00:28:42] ppinkerton: has joined #RubyOnRails
[00:30:47] codesoda: has joined #RubyOnRails
[00:31:21] puerile: has joined #RubyOnRails
[00:32:53] _bogus_: has anyone experimented with this casein cms gem ?
[00:33:45] Dreamer3: has joined #RubyOnRails
[00:41:57] sled: has joined #RubyOnRails
[00:47:07] jottr_: has joined #RubyOnRails
[00:48:26] uglybandersnatc1: has left #RubyOnRails: ()
[00:48:38] uglybandersnatc1: has joined #RubyOnRails
[00:48:56] uglybandersnatc1: has left #RubyOnRails: ()
[00:49:06] uglybandersnatc1: has joined #RubyOnRails
[00:49:59] slash_nick: _bogus_: the coolest one i've seen is phrasing
[00:50:14] slash_nick: this one https://github.com/infinum/phrasing
[00:52:06] sled: has joined #RubyOnRails
[00:53:05] griffindy: has joined #RubyOnRails
[00:53:23] kirillzh: has joined #RubyOnRails
[00:54:28] kirillzh: has joined #RubyOnRails
[00:55:45] kies^: has joined #RubyOnRails
[00:57:09] puerile: has joined #RubyOnRails
[01:00:46] tvw: has joined #RubyOnRails
[01:02:16] alexblom: has joined #RubyOnRails
[01:02:42] njero: has joined #RubyOnRails
[01:03:54] Dreamer3: has joined #RubyOnRails
[01:05:25] guacamole: hey! can anyone point me to a good tutorial or example for making my rails app an omniauth2 provider?
[01:06:18] ppinkerton: has joined #RubyOnRails
[01:07:32] barhum2013: has joined #RubyOnRails
[01:13:30] jenrzzz: has joined #RubyOnRails
[01:14:23] bricker: has joined #RubyOnRails
[01:14:53] puerile: has joined #RubyOnRails
[01:15:38] Jeremy1023: has joined #RubyOnRails
[01:17:19] Scient: there is no such thing as omniauth2 provider
[01:17:23] Scient: you mean oauth2 provider
[01:17:31] Scient: and i havent come across a tutorial so far
[01:17:35] Scient: because its not trivial
[01:17:39] Scient: its actually far from it
[01:17:45] Scient: your best bet is to look at the doorkeeper gem
[01:18:05] askhat: has joined #RubyOnRails
[01:18:07] guacamole: i understand this, perhaps an example of someone that successfully accomplished it?
[01:18:27] Scient: yes, i built an oauth2 provider from scratch
[01:18:31] Scient: but its proprietary :D
[01:18:47] guacamole: haha right, i figure that's the problem in finding an example
[01:19:03] guacamole: most of the stuff i'm finding is 6-7 years old and like rails 3
[01:19:08] Scient: im telling you, check out doorkeeper
[01:19:16] guacamole: i'm on the docs now, thanks Scient
[01:19:21] ebertx: has left #RubyOnRails: ()
[01:19:22] Scient: i think they even had an example app
[01:19:24] Scient: at some point
[01:19:40] Scient: if not, their stuff is not overly complex, it just did not meet our needs, thats why we ditched it
[01:19:42] guacamole: this would allow me to build an app that would authorize access to other apps i've built?
[01:19:44] Scient: not saying its bad or anything
[01:19:52] Scient: technically yes
[01:19:53] guacamole: like as a single sign on point
[01:20:00] guacamole: i don't want to login with facebook or twitter
[01:20:08] sevenseacat: this sounds like something i would be terrified of touching
[01:20:15] guacamole: hahaha lucky me
[01:20:19] Scient: yes, in this case _you_ are like the facebook in a facebook connect login scenario
[01:20:26] Scient: i.e the IDP
[01:20:29] Scient: i.e the identity provider :P
[01:20:47] guacamole: yes great! thats what i've been tasked with lol
[01:20:56] sevenseacat: oh thats right, you were at id.me
[01:21:05] Scient: oauth2 is not ideal for SSO though... OpenID Connect is a little better for that
[01:21:15] Scient: BUT there is only one rather shitty ruby lib for that :D
[01:21:53] guacamole: hm alright, thanks for the suggestions and i'll keep reading docs!
[01:22:04] matthewd: CAS is a thing, too
[01:23:35] hnanon: has joined #RubyOnRails
[01:23:42] guacamole: CAS is out of the question for my scenario
[01:24:43] hnanon: If I have a City model and I want to seed a companies table where company belongs to city, is it possible to seed with the city name instead of its ID?
[01:25:09] matthewd: At the time I cared, it felt like the simplest way to implement standalone SSO ¯\_(ツ)_/¯
[01:25:16] sevenseacat: hnanon: its just ruby code, so you can use whatever rails-provided methods you want in seeds
[01:25:48] guacamole: thanks matthewd Scient this is at least putting me in the right direction. much appreciated!
[01:25:57] choke: has joined #RubyOnRails
[01:26:07] Coldblackice: has joined #RubyOnRails
[01:27:14] puerile: has joined #RubyOnRails
[01:27:47] Scient: CAS is also yes a good option for an actual SSO
[01:27:50] hnanon: sevenseacat: What would be a rails-provided method that would allow me to use the company name in the seeds file?
[01:28:22] sevenseacat: hnanon: I feel like you're not understanding what I'm saying
[01:28:33] sevenseacat: the fact its a seeds file is irrelevant
[01:28:35] hnanon: Probably not.
[01:29:10] sevenseacat: you have all of the same ActiveRecord building, querying, etc. methods available that you normally would
[01:29:37] puerile: has joined #RubyOnRails
[01:30:03] puerile: has joined #RubyOnRails
[01:30:45] robbyoconnor: has joined #RubyOnRails
[01:31:03] ppinkerton: has joined #RubyOnRails
[01:31:10] robbyoconnor: has joined #RubyOnRails
[01:31:44] alexhartley: has joined #RubyOnRails
[01:32:22] Cohedrin: has joined #RubyOnRails
[01:33:54] RecursiveForce: has joined #RubyOnRails
[01:35:08] flashpoint9: has joined #RubyOnRails
[01:35:27] hahuang65: has joined #RubyOnRails
[01:39:49] RecursiveForce: Does anyone know how to bypass the delegate method in a model class? i.e. ModelA.some_method delegates to ModelB.some_method, but ModelA has it’s own method named “some_method”; how do I call the “some_method” method on ModelA and not the delegated method? Or is that not possible?
[01:46:14] Rodya_: has joined #RubyOnRails
[01:46:24] sevenseacat: its likely possible, but it smells to high heaven
[01:46:34] _Tariq: has joined #RubyOnRails
[01:46:54] matthewd: RecursiveForce: If it's delegating, that *is* the method -- delegation isn't magic
[01:46:58] matthewd: also that ^^
[01:47:26] lessless: has joined #RubyOnRails
[01:50:07] RecursiveForce: sevenseacat/matthewd: thanks, it does smell
[01:52:24] htmldrum: has joined #RubyOnRails
[01:52:38] KensoDev: has joined #RubyOnRails
[01:52:57] robbyoconnor: has joined #RubyOnRails
[01:53:32] kirillzh: has joined #RubyOnRails
[01:54:00] yfeldblum: has joined #RubyOnRails
[01:56:37] rogue_koder: has joined #RubyOnRails
[01:59:13] stannard: has joined #RubyOnRails
[01:59:27] Coldblackice: has joined #RubyOnRails
[02:02:19] KensoDev: has joined #RubyOnRails
[02:02:49] B1n4r10: has joined #RubyOnRails
[02:06:23] Coldblackice: has joined #RubyOnRails
[02:07:08] twilling: has joined #RubyOnRails
[02:10:20] arBmind: has joined #RubyOnRails
[02:10:52] greengriminal: has joined #RubyOnRails
[02:10:53] ElFerna: has joined #RubyOnRails
[02:12:10] intrigueD: has joined #RubyOnRails
[02:12:24] bronson: has joined #RubyOnRails
[02:12:31] _Tariq: has joined #RubyOnRails
[02:16:12] srinidhi: has joined #RubyOnRails
[02:17:57] Coldblackice: has joined #RubyOnRails
[02:19:42] Kryptonical: has joined #RubyOnRails
[02:21:12] jasmo2: has joined #RubyOnRails
[02:24:21] tweeeaks: has joined #RubyOnRails
[02:27:00] hahuang65: has joined #RubyOnRails
[02:28:15] ppinkerton: has joined #RubyOnRails
[02:31:21] Kryptonical: has joined #RubyOnRails
[02:32:39] Pazician: has joined #RubyOnRails
[02:35:10] chagel: has joined #RubyOnRails
[02:35:31] makenoise: has joined #RubyOnRails
[02:36:17] jetpack_joe: has joined #RubyOnRails
[02:38:18] sled: has joined #RubyOnRails
[02:39:56] zworks: has joined #RubyOnRails
[02:40:09] flashpoint9: has joined #RubyOnRails
[02:41:59] ppinkerton: has joined #RubyOnRails
[02:44:03] blackmes1: has joined #RubyOnRails
[02:44:40] maxdoubt: has joined #RubyOnRails
[02:45:07] hahuang61: has joined #RubyOnRails
[02:48:23] Ropeney: anyone know of changes to rails 5 for eager_loading/auto_loading in console on production?
[02:49:28] moei: has joined #RubyOnRails
[02:49:34] matthewd: Ropeney: Maaaybe :)
[02:50:05] Ropeney: matthewd: care to share? I upgraded from 4.2 to 5 so some configs might be out but rails c wont load any models when in production
[02:51:30] matthewd: As in error, or hang?
[02:51:45] Ropeney: unitialized constant User
[02:52:05] nchambers: has joined #RubyOnRails
[02:52:09] matthewd: That doesn't sound so familiar :/
[02:52:19] nchambers: hey guys... could someone help me with this traceback? http://imgur.com/a/l97C4
[02:52:42] bronson: has joined #RubyOnRails
[02:53:06] sevenseacat: why do people think screenshots are a good way to share code?
[02:53:24] sevenseacat: oh, guys only. carry on.
[02:53:34] Radar: sevenseacat: Questionable ancestry is my guess.
[02:54:26] Radar: nchambers: Check your apache logs.
[02:55:08] nchambers: sevenseacat, because its not code :P. if it was a normal traceback I could just copy it
[02:55:17] sevenseacat: it is a normal traceback.
[02:55:23] Radar: Ropeney: Can you reproduce in a new app?
[02:55:32] Radar: nchambers: Focus plz. Apache logs are being checked now, yes?
[02:55:43] sevenseacat: but whatever :) hope some guys can help you
[02:55:49] Radar: quazimodo: sorry I mean "hi" typo
[02:56:04] nchambers: Radar, let me see
[02:56:07] Ropeney: https://gist.github.com/Ropeney/478f6a70cde295c84972 is my production.rb, it works perfect in development mode. Radar, no next move was make new app and compare
[02:56:14] quazimodo: that's alright i meant 'hello bastard'
[02:56:20] quazimodo: typo, naturally
[02:56:39] Radar: Hey at least my dad was around when I was born.
[02:56:41] sevenseacat: Radar's parents weren't married at the time of his conception?
[02:56:44] Radar: ACTION stops now
[02:57:03] nchambers: Radar, I think its nginx, not apache if that matters
[02:57:06] Radar: sevenseacat: I believe they were although history has this nasty habit of being rewritten by the people involved.
[02:57:19] Radar: nchambers: nginx logs then? Nothing in error.log?
[02:57:52] nchambers: nothing in nginx-error.log
[02:58:01] nchambers: well, except an entry saying the logfile is created
[02:58:10] nchambers: Feb 24 17:37:20 ls newsyslog[722]: logfile first created
[02:58:14] Radar: nchambers: It's not very much for us to go on...
[02:58:27] Radar: nchambers: Can you start the app with RAILS_ENV=production bundle exec rails s in the app's directory on the server?
[02:59:09] matthewd: Ropeney: Tests pass? Does changing cache_classes/eager_load change things?
[02:59:16] Chagel_: has joined #RubyOnRails
[02:59:18] matthewd: Ropeney: Exactly which 5.0 are you on?
[02:59:19] duncannz: has joined #RubyOnRails
[02:59:22] kyledr: has joined #RubyOnRails
[02:59:30] kyledr: i just upgraded to rails 4.2 from 3.2 and none of the images, css, fonts, etc work
[02:59:32] nchambers: I can try, but honestly its not my software so I'm not sure where it would be
[02:59:45] Radar: kyledr: Give us an example of one of their paths please.
[02:59:51] nchambers: eh I figured it was a long shot. I'll just get help from my buddy tomorrow. thanks though!
[02:59:54] sevenseacat: nchambers: if you're working on it, its your software
[02:59:55] Radar: nchambers: Look at the nginx config for the app. It'll tell you where it's hosted.
[03:00:04] Radar: nchambers: Or at least where the path is on the filesystem.
[03:00:19] nchambers: has left #RubyOnRails: ("if you get offended by "guy", I feel sorry for your messed up mind")
[03:00:21] Ropeney: matthewd: 5.0.0.beta2, havent run specs in production mode but the app is running perfectly
[03:00:39] Ropeney: I just wanted to quickly see a record and ran into this
[03:00:48] _bogus_: can anyone recommend me a simple cms that allows the user alters some content in the already created views without much change to the existing ?
[03:01:02] kyledr: Radar: = image_tag "kyleAsJedi.png", :id => "kyleAsJediImage", :alt => "Kyle Robson as a jedi"
[03:01:13] Radar: kyledr: What path does that generate?
[03:01:14] sevenseacat: Ropeney: sure you're loading rails c and not irb?
[03:01:20] sevenseacat: its a mistake I've made before
[03:01:29] Radar: kyledr: is it something like /images/kyleAsJedi.png or /assets/KyleAsJedi.png?
[03:01:47] Ropeney: sevenseacat: `rails c production` && `RAILS_ENV=production rails c`
[03:01:55] sevenseacat: bugger. there goes my ideas :)
[03:02:02] Ropeney: would of liked it to be that
[03:02:31] matthewd: Ropeney: Is ApplicationController there?
[03:02:36] bulldawgden: has joined #RubyOnRails
[03:03:14] bulldawgden: has joined #RubyOnRails
[03:03:57] bulldawgden: has joined #RubyOnRails
[03:04:00] Ropeney: matthewd: i dont know what to say, but it just works now :\
[03:04:16] chagel: has joined #RubyOnRails
[03:04:20] Ropeney: i dont like gremlins
[03:04:28] sevenseacat: either. they are cute though
[03:04:29] joshkovach: has joined #RubyOnRails
[03:04:41] bulldawgden: has joined #RubyOnRails
[03:04:51] cabargas: has joined #RubyOnRails
[03:04:51] Ropeney: i screenshotted the exact same commands loading rails c and doing same command failing :|
[03:04:56] Radar: you changed literally nothing and it works now?
[03:05:11] Skeptical: call me Skeptical.
[03:05:19] kyledr: Radar: fixed it. gem 'rails_12factor', group: :production and config.assets.compile = true
[03:05:28] Radar: kyledr: Heroku?
[03:05:31] bulldawgden: has joined #RubyOnRails
[03:05:32] sevenseacat: ACTION raises eyebrow
[03:05:33] kyledr: Radar: yes
[03:07:10] Ropeney: nope just a vps
[03:07:25] Ropeney: matthewd: I got grant to look at my screen i did same thing both times as a witness i'm not going crazy
[03:08:48] bulldawgden: has joined #RubyOnRails
[03:08:51] matthewd: Ropeney: Let me know if it happens again, I guess ¯\_(ツ)_/¯
[03:09:16] chagel: has joined #RubyOnRails
[03:09:31] Radar: kyledr: Yup, that'll do it then :)
[03:10:38] unreal: has joined #RubyOnRails
[03:11:17] uglybandersnatc1: has joined #RubyOnRails
[03:13:16] DmitryBochkarev: has joined #RubyOnRails
[03:14:08] ppinkerton: has joined #RubyOnRails
[03:15:38] chagel: has joined #RubyOnRails
[03:16:40] jasmo2: has joined #RubyOnRails
[03:17:33] codesoda_: has joined #RubyOnRails
[03:17:37] DEA7TH: has joined #RubyOnRails
[03:18:47] ensyde_: has joined #RubyOnRails
[03:21:53] chagel: has joined #RubyOnRails
[03:23:45] moeabdol2: has joined #RubyOnRails
[03:24:31] fedexo: has joined #RubyOnRails
[03:26:52] chagel: has joined #RubyOnRails
[03:27:25] KensoDev: has joined #RubyOnRails
[03:29:45] Axilla: has joined #RubyOnRails
[03:29:56] Coldblackice_: has joined #RubyOnRails
[03:32:26] kknight: has joined #RubyOnRails
[03:32:35] LudicrousMango: has joined #RubyOnRails
[03:32:54] kknight: i want to contribute to rails community
[03:33:02] kknight: for that i need to fork first
[03:34:00] kknight: then how it will got added if i add some functionality in self repo
[03:34:34] Radar: kknight: Through a pull request
[03:35:09] kknight: m plannig to take part in gsoc
[03:35:31] kknight: any idea which project rails team are thinknig
[03:35:42] kknight: m looking something related to nokogiri
[03:37:09] chagel: has joined #RubyOnRails
[03:37:58] fryguy: kknight: https://github.com/rails/rails/issues
[03:38:02] fryguy: that might be a reasonable starting point
[03:38:58] Axilla: has joined #RubyOnRails
[03:39:28] kknight: m looking throughly it
[03:40:04] havenwood: kknight: here's an example of a successful rails/nokogiri gsoc application: https://github.com/kaspth/gsoc-application
[03:41:41] kknight: can it be extended? havenwood?
[03:42:09] kknight: mean adding more feature to it will be a valid project?
[03:42:12] ppinkerton: has joined #RubyOnRails
[03:42:13] emachnic: has joined #RubyOnRails
[03:42:57] sled: has joined #RubyOnRails
[03:43:36] sevenseacat: ACTION puts kknight out of their misery
[03:43:36] sevenseacat: https://github.com/railsgsoc/ideas/wiki/2016-Ideas
[03:44:33] Axilla: has joined #RubyOnRails
[03:44:42] havenwood: add tab support for web console, full stop. <3
[03:46:14] blackmes1: has joined #RubyOnRails
[03:46:23] dstarh: has joined #RubyOnRails
[03:48:35] chagel: has joined #RubyOnRails
[03:48:52] makenoise: has joined #RubyOnRails
[03:49:21] Jeremy1023: has joined #RubyOnRails
[03:53:34] chagel: has joined #RubyOnRails
[03:53:44] Jeremy1023: has joined #RubyOnRails
[03:54:36] lessless: has joined #RubyOnRails
[03:55:45] hcnewsom: has joined #RubyOnRails
[03:56:22] _Tariq: has joined #RubyOnRails
[03:58:35] chagel: has joined #RubyOnRails
[03:58:36] DmitryBochkarev: has joined #RubyOnRails
[03:58:56] Guest34101: has joined #RubyOnRails
[04:03:56] chagel: has joined #RubyOnRails
[04:05:03] bahar: has joined #RubyOnRails
[04:05:29] cajone: has joined #RubyOnRails
[04:05:33] quazimodo: ruby/rails stuff
[04:06:13] sevenseacat: i like turtles.
[04:06:30] sysx1000: has joined #RubyOnRails
[04:07:09] sevenseacat: sysx1000: afternoon.
[04:07:29] tinto: has joined #RubyOnRails
[04:07:46] havenwood: i can neither confirm nor deny that i like those very likable and adorable TURTLES OMG!
[04:08:10] sysx1000: I am using activerecord-postgis-adapter, and I wonder, how can I serialize record of table with geographic point to JSON
[04:08:36] sysx1000: i tried, but I've got following: "location"=>#<RGeo::Geographic::SphericalPointImpl:0x3ff42aefde3c "POINT (-122.0 47.0)">
[04:09:13] sysx1000: tbh, I'd like to have something like "point": {"x":0, "y":1}, is it possible?
[04:09:18] techsethi: has joined #RubyOnRails
[04:09:42] sevenseacat: i think that would cause problems
[04:10:13] cajone: has joined #RubyOnRails
[04:10:20] sevenseacat: but there's likely a way to do it anyway
[04:10:43] krzkrz: has joined #RubyOnRails
[04:10:50] Eswar: has joined #RubyOnRails
[04:11:13] sysx1000: location is not yet readable by client, this technical stuff is not for MapKit for example, to present pins on mobile app map view
[04:12:06] sysx1000: and parsing that POINT (X, Y) is not a good idea at all
[04:13:14] DEA7TH: I'm getting this: You tried to define an enum named "payment_scheme" on the model "Customer", but this will generate a instance method "payment_scheme=", which is already defined by another enum.
[04:13:27] DEA7TH: but the only two lines which mention this in my code are:
[04:13:49] DEA7TH: https://gist.github.com/VelizarHristov/e8c5898360502b467514
[04:13:56] DEA7TH: in the model at least
[04:14:20] DEA7TH: it was all working for many months, but yesterday I added this into a migration:
[04:14:30] DEA7TH: add_column :customers, :bookings_count, :integer
[04:14:44] DEA7TH: haven't touched the enum; but this broke my app
[04:14:48] DEA7TH: sounds like a Rails bug to me
[04:15:51] DEA7TH: it randomly disappears when I comment out either the validates or the enum declaration, but if I comment out the latter then some pages don't work because they reference the payment_scheme column
[04:16:41] Jeremy1023: has joined #RubyOnRails
[04:16:42] DEA7TH: any ideas how to print the existing enums at least? or anything else I might to do try to debug it
[04:16:53] goodcodeguy: has joined #RubyOnRails
[04:16:53] DoctorMonocular: has joined #RubyOnRails
[04:17:07] matthewd: DEA7TH: Try to repro in https://github.com/rails/rails/blob/master/guides/bug_report_templates/active_record_gem.rb
[04:17:43] DEA7TH: matthewd: I have no clue how to reproduce it, I don't know what triggered it, it appeared since I made a migration.
[04:17:50] DEA7TH: the migration is for an unrelated column
[04:18:10] sevenseacat: DEA7TH: !debug
[04:18:10] helpa: DEA7TH: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[04:18:33] cajone: has joined #RubyOnRails
[04:18:34] braincrash: has joined #RubyOnRails
[04:18:44] DEA7TH: sevenseacat: Not every problem is reproducible
[04:19:01] DEA7TH: I could post more code, like all code which makes use of that enum
[04:19:10] sevenseacat: DEA7TH: let's start with your model and the full error then.
[04:19:13] sevenseacat: like the gist asks.
[04:20:36] ppinkerton: has joined #RubyOnRails
[04:20:37] pawnbox: has joined #RubyOnRails
[04:20:52] DEA7TH: https://gist.github.com/VelizarHristov/47125c5185378a601070
[04:21:05] DEA7TH: Now it stopped appearing. But I've restarted the server multiple times previously.
[04:21:46] DEA7TH: It's back after I restarted the server
[04:21:48] LudicrousMango: has joined #RubyOnRails
[04:22:48] matthewd: Most likely variable in the described scenario is which page(s) you're requesting, in which order, after you restart
[04:23:02] sevenseacat: out of curiousity, whats on app/helpers/customers_helper.rb:4 ?
[04:23:24] DEA7TH: oh, I haven't noticed that line of error trace.....
[04:23:39] DEA7TH: it's require 'customer'
[04:23:48] sevenseacat: pls delete that.
[04:23:52] DEA7TH: because I'm monkeypatching Customer
[04:24:11] matthewd: which brings us to application_controller.rb:1
[04:24:13] sevenseacat: from a *view helper*?
[04:24:31] Radar: I am curious as to this monkey patching.
[04:24:35] DEA7TH: because I hate doing method(object) instead of object.method
[04:24:35] Radar: !popcorn5
[04:24:36] helpa: http://i.imgur.com/yc1b4Wa.gif
[04:24:53] Radar: DEA7TH: Please show us ApplicationController + CustomerHelper.
[04:24:54] DEA7TH: it's just this: addresses.map(&:display).join(' / ')
[04:25:05] Radar: Also I am really curious if https://gist.github.com/VelizarHristov/47125c5185378a601070#file-customer-rb-L20-L22 actually works or not.
[04:25:08] DEA7TH: I'll just remove the require and the bug will probably go away, but I'll paste it anyway
[04:25:27] sevenseacat: work, that is
[04:25:30] DEA7TH: Radar: that line works because I have Customer.create id: -1, .... ....
[04:25:45] Radar: DEA7TH: But that... is that even valid in DBs with autoincrement?
[04:25:48] DEA7TH: in the population
[04:25:51] Radar: ACTION is befuddled.
[04:25:52] DEA7TH: populate*
[04:26:11] DEA7TH: I think yes?
[04:26:17] sevenseacat: i would say that depends on the db, and good dbs shouldnt
[04:26:24] sevenseacat: let you do that
[04:26:34] DEA7TH: it never caused problems before (and there weren't problems with unknown causes, that's how I'm sure)
[04:26:36] Radar: Yes, yes it does work (in my MySQL database)
[04:26:39] matthewd: PG will: it's just an integer column with a default value
[04:26:50] Radar: Seems bad. I would set a flag on it rather than relying on a mysterious magic number.
[04:26:52] DEA7TH: works in PG, didn't know it doesn't on other DBs
[04:27:03] sevenseacat: agree at 'seems bad'
[04:27:08] Radar: I've just never seen that ... pattern ... before.
[04:27:21] DEA7TH: what is the best practice for having a system customer then?
[04:27:22] sevenseacat: but anyway, unrelated to this view helper monkeypatching model problem
[04:27:34] Radar: [15:26:49] <Radar> Seems bad. I would set a flag on it rather than relying on a mysterious magic number.
[04:27:38] sevenseacat: have a system flag on the model?
[04:27:47] DEA7TH: they just reuse a subset of the logic for a normal customer
[04:28:05] Radar: I'm mainly hanging about now because I want to see your monkeypatching still
[04:28:08] matthewd: DEA7TH: Do you have lots of requires?
[04:28:20] Radar: I do really have a lot of work to do today but I really want to see this monkey patching before I go do that.
[04:28:22] DEA7TH: hold on I'll post it
[04:28:25] Radar: Thank you.
[04:28:26] sevenseacat: I don't have enough Dare for this conversaion
[04:28:27] DEA7TH: it's just nothing new over what I posted
[04:28:44] DEA7TH: https://gist.github.com/VelizarHristov/88445faa464b9504cbd4
[04:28:51] brycesenz: has joined #RubyOnRails
[04:29:12] hahuang65: has joined #RubyOnRails
[04:29:22] DEA7TH: it's because I hate f(x) instead of x.f
[04:29:31] matthewd: Just like a decorator only... :|
[04:29:34] Radar: DEA7TH: You are going to cause a lot of headaches for other developers if you do that.
[04:29:49] sevenseacat: so instead you reload a model thats already loaded, which redefines the enum
[04:30:04] matthewd: DEA7TH: If you have Rails autoloading turned on, you shouldn't be requiring stuff in app/ at all
[04:30:06] sevenseacat: there is so much wrong with that small piece of code
[04:30:21] Radar: https://gist.github.com/radar/d772d95f69aebf76947d
[04:30:23] pawnbox: has joined #RubyOnRails
[04:30:26] DEA7TH: I was pretty sure it was safe. oh well
[04:31:21] matthewd: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[04:31:29] sevenseacat: DEA7TH: now you know :)
[04:31:34] matthewd: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-and-require
[04:31:39] matthewd: require 'user' # DO NOT DO THIS
[04:31:43] matthewd: ^^ not subtle
[04:32:11] Radar: matthewd: It is buried in a guide.
[04:32:16] DEA7TH: I'll probably use a decorator instead, because the function call syntax is awful and a tiny bit less safe
[04:32:22] Radar: DEA7TH: Please follow Rails conventions as much as possible.
[04:32:35] DEA7TH: I thought something said I can do it, not sure what lead me to it
[04:32:37] Radar: DEA7TH: It's called Rails because you should stay on the tracks rather than inventing your own ways of doing things.
[04:32:40] sevenseacat: function call syntax is awful...
[04:32:56] srinidhi: has joined #RubyOnRails
[04:33:01] matthewd: Radar: This is true... it's hard to more succinctly enumerate the "do not do this" list, though :/
[04:33:17] Radar: matthewd: I think it's on a case-by-case basis.
[04:33:38] Radar: matthewd: e.g. I knew not to do that _ever_, but now I have somewhere that I can link to that says why
[04:33:55] matthewd: (and I would argue one should have read that guide, or at least that relevantly-titled section, before claiming "I was pretty sure it was safe")
[04:34:02] DEA7TH: don't even remember what made me do it
[04:34:03] Pazician: has joined #RubyOnRails
[04:34:11] Radar: [15:29:22] <DEA7TH> it's because I hate f(x) instead of x.f
[04:34:20] matthewd: ((because that implies a claim of investigative effort))
[04:34:21] Radar: I have your answer.
[04:34:22] DEA7TH: I mean assume that it's safe to do
[04:34:42] DEA7TH: it was probably 1-2 years ago
[04:35:15] rakm: has joined #RubyOnRails
[04:35:17] matthewd: Okay, I have to admit the guide in question didn't exist then :|
[04:35:22] matthewd: (but it still wasn't safe)
[04:35:49] bricker: has joined #RubyOnRails
[04:36:16] sevenseacat: the one time I require stuff in `app` is when I want to monkey patch stuff in a gem, and I do that in an initializer. you do lose all reloading functionality though
[04:40:06] cajone: has joined #RubyOnRails
[04:40:40] techsethi: has joined #RubyOnRails
[04:43:14] sled: has joined #RubyOnRails
[04:43:20] chouhoul_: has joined #RubyOnRails
[04:44:42] chagel: has joined #RubyOnRails
[04:44:55] jeanlinux: has joined #RubyOnRails
[04:46:46] chouhoulis: has joined #RubyOnRails
[04:48:33] DmitryBochkarev: has joined #RubyOnRails
[04:49:16] blackmes1: has joined #RubyOnRails
[04:50:01] _Tariq: has joined #RubyOnRails
[04:52:12] pawnbox: has joined #RubyOnRails
[04:55:25] kpwarr: so, I am planning on starting a new rails project with react as a frontend. Is there a way that I can get server side rendering if I am using rails as a JSON API, and the frontend will be a standalone JS app?
[04:56:19] sevenseacat: ACTION blinks
[04:56:35] RTG`: has joined #RubyOnRails
[04:56:53] siaW: has joined #RubyOnRails
[04:58:18] sevenseacat: can you rephrase the question?
[05:01:12] chagel: has joined #RubyOnRails
[05:01:59] EXCHGR: has joined #RubyOnRails
[05:02:11] kpwarr: I would like to make a project with seperately encapsulated rails backend, and react frontend. I would like to know how I might go about retaining some of the advantages of a normal rails app with view templating such as server-side rendering, and maybe also turbolinks, etc.
[05:02:36] sevenseacat: so... not a json api?
[05:03:07] kpwarr: I'm thinking the rails backend will be a JSON API
[05:04:11] flashpoint9: has joined #RubyOnRails
[05:06:50] baweaver: has joined #RubyOnRails
[05:07:02] brendan-: has joined #RubyOnRails
[05:08:18] havenwood: kpwarr: A Content-Type header might be say application/json, text/html or text/plain but they should be what the content type the header says.
[05:09:35] havenwood: Please excuse the garbled end of the sentence. Race condition.
[05:09:44] IFrank00: has joined #RubyOnRails
[05:10:24] uglybandersnatch: has joined #RubyOnRails
[05:11:23] havenwood: kpwarr: Said another way, an HTML API would be HTML content and a JSON API would be JSON content.
[05:11:43] sevenseacat: turbolinks doesnt make much sense with a json api
[05:12:00] kpwarr: err, yea. scratch that
[05:12:10] moeabdol2: has joined #RubyOnRails
[05:12:37] pawnbox: has joined #RubyOnRails
[05:15:42] chagel: has joined #RubyOnRails
[05:17:56] Eswar1: has joined #RubyOnRails
[05:18:11] srinidhi1: has joined #RubyOnRails
[05:19:12] siaW: has joined #RubyOnRails
[05:20:50] chagel: has joined #RubyOnRails
[05:21:11] uglybandersnatch: has joined #RubyOnRails
[05:25:43] chagel: has joined #RubyOnRails
[05:27:05] arup_r: has joined #RubyOnRails
[05:27:18] p1k: has joined #RubyOnRails
[05:27:53] krzkrzkrz: has joined #RubyOnRails
[05:29:27] jeanre: has joined #RubyOnRails
[05:29:27] jeanre: has joined #RubyOnRails
[05:30:21] emachnic: has joined #RubyOnRails
[05:30:42] chagel: has joined #RubyOnRails
[05:33:43] alexhartley: has joined #RubyOnRails
[05:33:44] p1k_: has joined #RubyOnRails
[05:35:51] chagel: has joined #RubyOnRails
[05:37:52] uglybandersnatch: has joined #RubyOnRails
[05:40:42] chagel: has joined #RubyOnRails
[05:41:26] czerasz: has joined #RubyOnRails
[05:42:42] rubyonrailed: has joined #RubyOnRails
[05:43:07] techsethi: has joined #RubyOnRails
[05:44:01] sleungcy: has joined #RubyOnRails
[05:44:48] duncannz: has joined #RubyOnRails
[05:45:00] fnn: has joined #RubyOnRails
[05:46:19] djbkd: has joined #RubyOnRails
[05:48:01] chagel: has joined #RubyOnRails
[05:49:43] fnn: I've written the worst ruby code ever. could someone point me in the right direction in fixing this? http://pastebin.com/gs4DTwV9
[05:50:08] fnn: http://pastie.org/10736697
[05:51:37] baweaver: fnn: http://baweaver.com/blog/2015/05/04/sublime-scoping-with-rails/
[05:52:19] blackmes1: has joined #RubyOnRails
[05:53:02] chagel: has joined #RubyOnRails
[05:53:06] arup_r: opps. srry
[05:53:14] Radar: admin plz ban
[05:53:19] sevenseacat: ACTION bans
[05:53:28] fnn: I'm just trying to learn pls don't ban me
[05:53:37] ChanServ: +o baweaver
[05:53:40] sevenseacat: lol not you fnn, we're just mucking around
[05:53:59] sevenseacat: yes, we are :P
[05:54:05] baweaver: ACTION stares at arup_r menacingly
[05:54:13] ChanServ: -o baweaver
[05:54:35] baweaver: fnn: you're fine, we're poking fun at arup_r
[05:55:09] arup_r: baweaver: Nah, it was a mistake from my side. I messed with 2 black screens.. sorry for that.. ;/
[05:56:02] baweaver: I call shenanigans
[05:56:20] baweaver: fnn: Anyways, that article is what I tend to do with scoping
[05:56:28] fnn: I'm reading it now
[05:56:54] jeanlinux: has joined #RubyOnRails
[05:59:35] Guest34101: has joined #RubyOnRails
[06:01:27] chagel: has joined #RubyOnRails
[06:01:45] cajone: has joined #RubyOnRails
[06:01:48] bricker: has joined #RubyOnRails
[06:02:58] quazimodo: wow i feel dumb today
[06:03:06] quazimodo: absolutely can't do anything
[06:03:26] arup_r: quazimodo: ok, sleep more. :D
[06:04:54] AntiSpamMeta: has joined #RubyOnRails
[06:05:20] ppinkerton: has joined #RubyOnRails
[06:06:06] sevenseacat: episode 4 of quazimodo enters, says something random, then leaves
[06:06:26] Radar: sevenseacat: missing a few numbers htere
[06:06:32] iuuso_: has joined #RubyOnRails
[06:06:36] sevenseacat: Radar: thats only for today.
[06:07:43] arup_r: may I ask, who are they?
[06:07:49] Radar: a rando from Sydney
[06:09:22] arup_r: oh.. I thought in IRC.
[06:10:42] uglybandersnatch: fnn: something like this? https://gist.github.com/johngrimes/6df379aed4c0162d792b
[06:11:50] chagel: has joined #RubyOnRails
[06:12:00] cabargas: has joined #RubyOnRails
[06:16:50] chagel: has joined #RubyOnRails
[06:19:05] abhishekvasisht: has joined #RubyOnRails
[06:19:19] baweaver: ACTION isn't a fan
[06:20:24] baweaver: params.to_unsafe_h.slice(:bedrooms, :unit).reject(&:blank?)
[06:21:00] baweaver: ACTION is really not a fan of the person who decided to make params.to_h and params.slice "filter" things
[06:21:51] chagel: has joined #RubyOnRails
[06:22:02] ppinkerton: has joined #RubyOnRails
[06:22:33] sevenseacat: .to_h shouldnt...
[06:22:44] baweaver: it was painful
[06:22:57] baweaver: finally found that danged unsafe_h method...
[06:23:20] fnn: what's the issue?
[06:24:21] baweaver: Params in Ruby are a Hashlike object
[06:25:03] baweaver: and some Rails dev decided to be clever and protect us by filtering to_h and slice on some deranged form of strong params that are neigh uneditable without a bunch of random permitting.
[06:25:12] arup_r: baweaver: why are you calling `params.to_unsafe_h.`?
[06:25:17] baweaver: ACTION is salty
[06:26:16] arup_r: yeah.. ok never knew that. it is a TIL for me.
[06:26:21] arup_r: baweaver: thanks
[06:26:22] baweaver: http://apidock.com/rails/v4.2.1/ActionController/Parameters/to_unsafe_h
[06:26:38] baweaver: http://apidock.com/rails/v4.2.1/ActionController/Parameters/to_h
[06:26:45] baweaver: that.... oh man that thing
[06:27:06] baweaver: http://apidock.com/rails/v4.2.1/ActionController/Parameters/slice - and this is a straight lie
[06:27:09] baweaver: it filters too
[06:27:19] sevenseacat: oh that .to_h is insidious
[06:27:28] Radar: apidock needs to die
[06:27:43] Radar: it gives so many bad results on the googles that I've got it blocked
[06:27:57] baweaver: I can see that.
[06:28:09] nachoman: has joined #RubyOnRails
[06:28:14] RTG`: has joined #RubyOnRails
[06:28:47] fnn: uglybandersnatch I like the elegance of that code -- it isn't handling the where properly I think, but I'm working on it now
[06:28:50] fnn: it's doing the params just fine
[06:29:32] fnn: I'm still reading the other article which baweaver shared with me
[06:30:29] sandstrom: has joined #RubyOnRails
[06:32:16] chagel: has joined #RubyOnRails
[06:35:54] _bogus_: hey there.. i set a limit for most (text) fields of my model, is there any way to retrieve this max length information ?
[06:35:58] ur5us: has joined #RubyOnRails
[06:36:37] Eswar: has joined #RubyOnRails
[06:37:17] chagel: has joined #RubyOnRails
[06:38:16] arup_r: baweaver: I was excited and tried https://gist.github.com/aruprakshit/4e9c67a84de8c3ace85d .. where is the difference ?
[06:38:33] _bogus_: also, i set it in the migration, do I need to repeat myself setting those maxlength in the model ?
[06:38:37] arup_r: or am I missing.. doc says very little
[06:39:27] chouhoulis: has joined #RubyOnRails
[06:40:03] sevenseacat: the difference is when you call to_h and to_unsafe_h on params that havent been permitted
[06:40:24] _bogus_: or maybe i should remove the limit from migrations and let the model handle it
[06:40:40] tambet: has joined #RubyOnRails
[06:42:29] chagel: has joined #RubyOnRails
[06:44:59] fnn: I can't really figure out why the params.select isn't working
[06:45:07] fnn: I'm looking through the docs still
[06:46:44] rvanlieshout: has joined #RubyOnRails
[06:47:29] chagel: has joined #RubyOnRails
[06:47:47] baweaver: honestly I don't like that approach, but to each their own
[06:48:11] fnn: I'm just going through with it as a learning experience, I haven't decided to use it yet
[06:48:45] statelesscode: has joined #RubyOnRails
[06:48:46] kp666: has joined #RubyOnRails
[06:49:09] gambl0re: has joined #RubyOnRails
[06:50:36] yardenbar: has joined #RubyOnRails
[06:53:15] RTG`: has joined #RubyOnRails
[06:53:27] neanderslob: has joined #RubyOnRails
[06:53:54] neilfse: has joined #RubyOnRails
[06:54:23] _bogus_: please, is there a way to get the limit of a field in the model ?
[06:54:31] blackmes1: has joined #RubyOnRails
[06:55:53] solars: has joined #RubyOnRails
[06:58:54] chagel: has joined #RubyOnRails
[06:59:26] uglybandersnatc-: has joined #RubyOnRails
[07:00:24] Guest34101: has joined #RubyOnRails
[07:01:03] baweaver: Model.columns.select { |c| c.type == :string }.map { |c| [c.name, c.limit] }.to_h
[07:01:15] baweaver: probably some shorter way, but I don't remember
[07:01:23] fnn: baweaver: your blog post was quite informative, thanks for that
[07:01:25] baweaver: hunt around AR::Base and you'd probably find one.
[07:03:53] chagel: has joined #RubyOnRails
[07:05:59] _bogus_: baweaver, this is for getting the limit from the field in the db right? i'm actually thinking it's better to leave the fields in db limitless and set limits in the model (in case the client decides to change these limits later), but i would like to get those limits automatically in my view
[07:06:42] baweaver: don't limit anything unless you absolutely have to
[07:07:01] baweaver: if you did, use constants on the model with validations on the length
[07:07:23] baweaver: but you should avoid text fields unless you really do need them
[07:07:32] baweaver: VARCHAR(255) will cover most sane uses
[07:08:02] sevenseacat: still need validations for varchars
[07:09:12] chagel: has joined #RubyOnRails
[07:09:41] solars: has joined #RubyOnRails
[07:10:52] baweaver: The DB will prevent the save, but the error messages leave a lot to be desired.
[07:10:56] _bogus_: yeah the client specified some limits but he already changed it once, so I think it's better to keep those limits in the Model
[07:11:46] sevenseacat: sure, you'll get a 500 error from the db adapter.
[07:12:25] baweaver: I kinda wish that Rails was smarter on those types of things
[07:13:10] _bogus_: anyway there needs to be a counter in the textareas in the form, so I think it would be better to retrieve this info from the model instead of set it separatedly
[07:13:18] _bogus_: and duplicate... on the model and the view
[07:13:20] yfeldblum: has joined #RubyOnRails
[07:14:13] yfeldblum: has joined #RubyOnRails
[07:15:15] DEA7TH: If my code is generating 250KB of HTML (4k loc), would this be the reason why it spends 500-600ms in Views?
[07:16:02] sevenseacat: thats a large view.
[07:16:26] rvanlieshout: nobody is going to read 250KB of html
[07:16:36] sevenseacat: but it might not be the reason, you might be performing db queries in your view, who knows
[07:16:47] DEA7TH: no SQL executed in view
[07:16:48] ur5us: has joined #RubyOnRails
[07:16:54] baweaver: why in the world is it that large?
[07:16:59] sevenseacat: if you say so
[07:17:08] rvanlieshout: and you shouldn't be performing them in the controller :)
[07:17:28] gambl0re: i hope all my aussie brothers and sisters isn't drowning in all that tumbleweed..
[07:17:42] baweaver: did someone decide to go back to the 90s and make some table mess?
[07:18:00] DEA7TH: I haven't paginated it yet
[07:18:05] DEA7TH: but I'll fix that separately
[07:18:23] baweaver: what is it and why is it that large?
[07:18:28] DEA7TH: it looks smaller when you view it
[07:18:32] baweaver: If there's no SQL, there's no reason for it.
[07:18:37] sevenseacat: so yes, we have no way of knowing why your view takes so long.
[07:18:51] baweaver: unless you'd be so kind as to put it in a gist
[07:19:06] sevenseacat: do you really want to look through 4k loc?
[07:19:18] quazimodo: i'm not a rando
[07:19:19] baweaver: I can skim and tell where a mess is
[07:19:28] DEA7TH: I thought the size of the generated HTML would be indicative
[07:19:28] baweaver: quazimodo: not helping your case there
[07:19:33] DEA7TH: 4k loc is the generated HTML, not the irb
[07:19:38] DEA7TH: ok I'll gist
[07:19:40] sevenseacat: episode 5 was pretty underwhelming.
[07:20:21] DEA7TH: https://gist.github.com/VelizarHristov/8db6236ef0abe8142fc4
[07:20:52] DEA7TH: all querying is done before the view
[07:20:54] baweaver: yeah, page that.
[07:20:57] sevenseacat: so you *are* running queries in the view
[07:21:12] DEA7TH: no, they are already ran when the view is rendered
[07:21:15] sevenseacat: unless you're loading @customers in the controller earlier
[07:21:29] sevenseacat: and @addresses
[07:21:41] sevenseacat: i doubt it, unless you're doing something special
[07:21:43] baweaver: make sure you don't see a ton of SQL queries blow through after that
[07:21:45] DEA7TH: I'll include that too, although I suspect it won't help
[07:21:54] Eswar: has joined #RubyOnRails
[07:21:58] baweaver: if there are over 100 customers, get Kaminari and page that
[07:22:05] baweaver: otherwise you're going to have a mess.
[07:22:20] y2mq37: has joined #RubyOnRails
[07:22:28] DEA7TH: edited: https://gist.github.com/VelizarHristov/8db6236ef0abe8142fc4
[07:22:32] DEA7TH: now includes controller method
[07:22:46] sevenseacat: yeah youre running your queries from the view
[07:22:48] sevenseacat: which will add time
[07:22:55] DEA7TH: search does nothing in my case
[07:23:05] DEA7TH: I am sure I am not running queries from the view
[07:23:14] DEA7TH: it is really easy to check for that, I cannot get it wrong
[07:23:15] sevenseacat: suit yourself.
[07:23:30] DEA7TH: I tested it by including puts("end of controller") at the end of the controller and ran the page
[07:24:14] DEA7TH: (btw search is doing nothing in my case)
[07:24:22] DEA7TH: (or rather, returning Customer.all)
[07:24:33] uglybandersnatch: has joined #RubyOnRails
[07:25:46] chagel: has joined #RubyOnRails
[07:26:18] sevenseacat: also, what is your geocode method doing?
[07:26:39] hahuang65: has joined #RubyOnRails
[07:26:46] DEA7TH: it's an attribute
[07:27:10] Palsson: has joined #RubyOnRails
[07:27:13] sevenseacat: well, you've been given some tips - limit the data, fix your inefficient queries
[07:27:16] DEA7TH: .deletable? was bad, but now it's just reading a column
[07:28:50] yardenbar: has joined #RubyOnRails
[07:29:15] smolny: has joined #RubyOnRails
[07:31:51] tjbiddle: has joined #RubyOnRails
[07:32:17] moeabdol2: has joined #RubyOnRails
[07:33:51] tjbiddle: Hi all. Can someone come up with a reason why an object wouldn't be able to be destroyed? I'm writing tests and am attempting to check the sad path; the only reason it wouldn't be destroyed is if somehow there's a race condition and it already has been - it's a simple object. Or should I just leave that one line un-tested?
[07:35:11] chagel: has joined #RubyOnRails
[07:36:06] Palsson_: has joined #RubyOnRails
[07:36:09] sevenseacat: there are a lot of possible reasons why
[07:36:13] sevenseacat: seeing the test might help
[07:36:19] sevenseacat: (and the model being tested)
[07:36:24] defsdoor: has joined #RubyOnRails
[07:37:56] darutoko: has joined #RubyOnRails
[07:37:59] tjbiddle: sevenseacat: Well the test is what I'm trying to think of - so that doesn't exist yet; but here's the model and portion of the controller: https://gist.github.com/thomasbiddle/f1af14a5493e71bc053e
[07:38:04] mark1: has joined #RubyOnRails
[07:38:41] comrad: has joined #RubyOnRails
[07:38:43] sevenseacat: stub the destroy method on the object? :)
[07:38:57] tjbiddle: sevenseacat: Derp. Thanks :)
[07:39:23] trosborn: has joined #RubyOnRails
[07:40:44] chouhoulis: has joined #RubyOnRails
[07:41:41] nocontrol: has joined #RubyOnRails
[07:42:35] aganov: has joined #RubyOnRails
[07:45:38] DoubleMalt: has joined #RubyOnRails
[07:46:13] neanderslob: has left #RubyOnRails: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[07:46:18] neanderslob: has joined #RubyOnRails
[07:46:27] artto: has joined #RubyOnRails
[07:46:52] tetraktys: has joined #RubyOnRails
[07:48:36] chagel: has joined #RubyOnRails
[07:53:02] konsolebox: has joined #RubyOnRails
[07:53:36] chagel: has joined #RubyOnRails
[07:53:57] KensoDev: has joined #RubyOnRails
[07:54:10] solars: I'm getting expected: 2016-02-27T07:52:16Z got: 2016-02-27T07:52:16.546Z when testing with a timestamp, first part uses 2.days.from_now and second compares it with .to_s(:iso8601) - can anyone tell me h
[07:54:18] solars: ow to get this in the same format?
[07:55:23] baweaver: for your sanity, test using within
[07:55:55] blackmes1: has joined #RubyOnRails
[07:56:03] pyemkey: has joined #RubyOnRails
[07:56:44] baweaver: expect(result).to be_within(1.second).of(expected_time)
[07:57:02] solars: hm yes but I'd like to know how to get to the same format :)
[07:57:49] ferr: has joined #RubyOnRails
[07:58:39] pawnbox: has joined #RubyOnRails
[07:59:46] sled: has joined #RubyOnRails
[08:03:59] chagel: has joined #RubyOnRails
[08:05:25] Palsson: has joined #RubyOnRails
[08:07:56] jas02: has joined #RubyOnRails
[08:08:43] adac: has joined #RubyOnRails
[08:08:54] chagel: has joined #RubyOnRails
[08:10:44] rohit_: has joined #RubyOnRails
[08:13:52] chagel: has joined #RubyOnRails
[08:13:58] codesoda: has joined #RubyOnRails
[08:15:54] Pazician: has joined #RubyOnRails
[08:16:16] sandstrom: has joined #RubyOnRails
[08:18:09] Ergo: has joined #RubyOnRails
[08:19:03] chagel: has joined #RubyOnRails
[08:20:41] defsdoor: has joined #RubyOnRails
[08:21:55] agoldboi: has joined #RubyOnRails
[08:23:18] Guest34101: has joined #RubyOnRails
[08:24:21] pawnbox: has joined #RubyOnRails
[08:25:41] artto: has joined #RubyOnRails
[08:26:06] TDJACR: has joined #RubyOnRails
[08:26:46] Ropeney: has joined #RubyOnRails
[08:26:47] pawnbox: has joined #RubyOnRails
[08:27:44] rohit_: has joined #RubyOnRails
[08:28:19] PlasmaStar: has joined #RubyOnRails
[08:30:15] pawnbox: has joined #RubyOnRails
[08:30:17] hive-mind: has joined #RubyOnRails
[08:30:20] Chagel_: has joined #RubyOnRails
[08:32:46] Pumukel: has joined #RubyOnRails
[08:32:48] techsethi: has joined #RubyOnRails
[08:34:55] chagel: has joined #RubyOnRails
[08:36:13] sp1rs: has joined #RubyOnRails
[08:38:07] rohit_: has joined #RubyOnRails
[08:39:51] krzkrzkrz: has joined #RubyOnRails
[08:41:37] chagel: has joined #RubyOnRails
[08:43:47] stannard: has joined #RubyOnRails
[08:43:55] lubekpl: has joined #RubyOnRails
[08:44:56] mikecmpbll: has joined #RubyOnRails
[08:45:27] jenrzzz: has joined #RubyOnRails
[08:46:15] chagel: has joined #RubyOnRails
[08:47:18] uglybandersnatch: has joined #RubyOnRails
[08:47:22] Palsson_: has joined #RubyOnRails
[08:51:36] chagel: has joined #RubyOnRails
[08:54:10] Palsson: has joined #RubyOnRails
[08:56:28] Eswar: has joined #RubyOnRails
[08:56:36] chagel: has joined #RubyOnRails
[08:57:18] blackmes1: has joined #RubyOnRails
[08:58:57] baweaver: has joined #RubyOnRails
[09:01:37] chagel: has joined #RubyOnRails
[09:01:45] mikecmpbll: has joined #RubyOnRails
[09:03:21] smoitra: has joined #RubyOnRails
[09:03:28] apotry: has joined #RubyOnRails
[09:04:19] techsethi: has joined #RubyOnRails
[09:05:42] srinidhi: has joined #RubyOnRails
[09:07:01] chagel: has joined #RubyOnRails
[09:07:46] emachnic: has joined #RubyOnRails
[09:09:27] jsrn_: has joined #RubyOnRails
[09:11:59] chagel: has joined #RubyOnRails
[09:12:40] TDJACR: has joined #RubyOnRails
[09:16:37] DEA7TH: has joined #RubyOnRails
[09:16:44] blackmes1: has joined #RubyOnRails
[09:17:01] chagel: has joined #RubyOnRails
[09:19:21] emachnic: has joined #RubyOnRails
[09:20:52] laith: has joined #RubyOnRails
[09:22:01] chagel: has joined #RubyOnRails
[09:23:13] chubijs: has joined #RubyOnRails
[09:26:19] lipoqil: has joined #RubyOnRails
[09:26:31] sp1rs: has joined #RubyOnRails
[09:26:44] tambet: has joined #RubyOnRails
[09:26:51] chagel: has joined #RubyOnRails
[09:27:39] Macaveli: has joined #RubyOnRails
[09:28:55] AzaToth: has joined #RubyOnRails
[09:30:34] apeiros: sombody got general experiences to share with regards to ruby + mssql? (asking over in #ruby too)
[09:31:23] apeiros: context: there's a push from our parent company to move to mssql and we're trying to come up with pros&contras
[09:31:49] bronson: apeiros: I did it back in 2012, wasn't too bad
[09:32:16] bronson: ran into a few small issues because the mssql bindings aren't as mature but they were easy to debug.
[09:33:09] bronson: it ended up being a really good idea. Just access data directly (in a read-only view) rather than running nasty export/import steps.
[09:33:44] bronson: I left a few months after it was working, dunno its current status. But I'd do it again.
[09:34:15] djellemah_: has joined #RubyOnRails
[09:35:10] alexhartley: has joined #RubyOnRails
[09:37:15] chagel: has joined #RubyOnRails
[09:38:23] techsethi: has joined #RubyOnRails
[09:38:36] apeiros: bronson: thanks a lot for the feedback
[09:38:38] USvER: has joined #RubyOnRails
[09:38:59] apeiros: bronson: when you say "easy to debug" - did you have to dive into C/C++ source code in the driver? or what kinds of debugging did you have to perform?
[09:40:09] bronson: apeiros: most were pretty obvious, just changed the app to work around them.
[09:40:13] USvER: Hey, how one can create a localization with pluralization with converting integers to string? So instead of "1 apple" and "5 apples" i would get "One apple" "Five apples"
[09:40:19] bronson: one was interesting... I'll see if I can find it.
[09:40:35] arup_r: has joined #RubyOnRails
[09:40:48] FooMunki: has joined #RubyOnRails
[09:41:12] czerasz: has joined #RubyOnRails
[09:41:35] matthias_: has joined #RubyOnRails
[09:42:14] chagel: has joined #RubyOnRails
[09:43:30] bronson: apeiros: nope, can't find it. could swear I opened an issue and had a bunch of discussion but I guess it's lost to time.
[09:43:55] bronson: we never never needed to grub around in C++ anyway. all ruby.
[09:43:58] ewnd9_: has joined #RubyOnRails
[09:44:51] apeiros: ok. did you have interactions with the/an mssql community of some sorts?
[09:45:10] apeiros: because what I find seems to indicate a rather stale public community
[09:46:19] arBmind: has joined #RubyOnRails
[09:46:26] FooMunki: has joined #RubyOnRails
[09:47:26] pawnbox: has joined #RubyOnRails
[09:48:35] arBmind1: has joined #RubyOnRails
[09:50:06] bronson: yep, it's a quiet community. the author was helpful but not particularly quick turnaround.
[09:50:28] srinidhi: has joined #RubyOnRails
[09:50:34] bronson: which makes sense, we weren't paying him anything.
[09:50:37] bruce_lee: has joined #RubyOnRails
[09:52:54] ErhardtMundt: has joined #RubyOnRails
[09:53:37] kitsuneyo: has joined #RubyOnRails
[09:53:41] DEA7TH: has joined #RubyOnRails
[09:54:02] kitsuneyo: is it possible to 'include' a class only in specific controller actions?
[09:54:05] solars: hi, what's the best method to have catch-all responses for JSON requests e.g. for 500 internal errors as documented here http://guides.rubyonrails.org/action_controller_overview.html#rescue for html?
[09:54:11] kitsuneyo: instead of the whole controller?
[09:55:58] DEA7TH: has joined #RubyOnRails
[09:57:33] moeabdol: has joined #RubyOnRails
[09:57:36] chagel: has joined #RubyOnRails
[09:58:26] bruce_lee: has joined #RubyOnRails
[09:58:26] apeiros: bronson: ok, thank you very much for your insights!
[09:59:25] bronson: apeiros: you're welcome, hope it goes well
[09:59:48] whowantstolivefo: has joined #RubyOnRails
[10:00:00] techsethi_: has joined #RubyOnRails
[10:00:32] sp1rs: has joined #RubyOnRails
[10:00:37] bronson: solars: rescue_from ?
[10:00:48] nerium: has joined #RubyOnRails
[10:00:57] uglybandersnatch: has joined #RubyOnRails
[10:00:59] waseem_: solars: It is not a good idea to blanket catch all the exceptions in your application. You should individually catch the exceptions that you think will be raised and send proper response to the client.
[10:01:58] whowantstolivefo: has left #RubyOnRails: ()
[10:02:03] waseem_: solars: If you catch all the exceptions, you might be catching some exceptions that would potentially give you insights in the errors in your codebase. e.g. a syntax error.
[10:02:31] kitsuneyo: has joined #RubyOnRails
[10:03:32] waseem_: solars: However, to answer your question, you will use rescue_from. See the warning right below the section which you linked to in the guides.
[10:04:30] tbuehlmann: just a heads-up, SyntaxError won't be caught if just `rescue` is used, since it's not a descendant from StandardError
[10:05:04] waseem_: solars: For JSON request, you'll write a respond_to block with format.json in your exception handler that'll send the response that you want in case there is an exception.
[10:06:04] kitsuneyo: actually my question is - does a wicked form need to have its own controller?
[10:06:05] tambet: has joined #RubyOnRails
[10:06:40] waseem_: tbuehlmann: It does descend from Exception. I'd think twice before rescuing Exception in throughout my codebase.
[10:07:02] waseem_: kitsuneyo: What are you trying to do?
[10:07:13] tetraktys: has joined #RubyOnRails
[10:07:35] tbuehlmann: waseem_, I didn't read `rescue Exception`, all good then :)
[10:08:15] waseem_: tbuehlmann: That was a fine piece of information for me BTW. SyntaxError does not descend from StandardError. :)
[10:08:49] kitsuneyo: waseem_, i have a model Person and a controller people_controller. i want to use wicked. instead of making a new controller for the wicked form, i tried to include WickedWizard in people_controller. the problem is, include WickedWizard applies to the whole controller, so now index looks for Wicked steps and throws an error when it gets one
[10:09:49] kitsuneyo: i then used "steps :step_one, :step_two, only: [:show, :update]" but index still throws an error because it has no steps
[10:09:55] noodle: has joined #RubyOnRails
[10:10:18] kitsuneyo: i guess its not possible to put Wicked actions and non-Wicked actions in the same controller?
[10:12:06] chagel: has joined #RubyOnRails
[10:12:24] tbuehlmann: waseem_, maybe another fine piece of information: ruby checks the syntax of files, so it's likely you'll get an error on startup already. but this doesn't save you from invalid ruby strings that are evaluated by eval and friends
[10:13:02] waseem_: kitsuneyo: What is the error? You might want to ask it on stackoverflow. Or you can bug the creator of that gem on twitter with your question. :)
[10:13:21] Guest28: has joined #RubyOnRails
[10:13:46] kitsuneyo: waseem_, Wicked::Wizard::UndefinedStepsError in PeopleController#index
[10:14:14] kitsuneyo: i could do, i was hoping there'd be a wicked user on here
[10:14:46] solars: waseem_, of course, it's only a catch all entry until all the action get their own handler in a legacy app, I'm aware of the implications. I just thought there might be a way to specify these templates for different formats
[10:14:47] kitsuneyo: tbh i hate wicked
[10:17:23] chagel: has joined #RubyOnRails
[10:18:56] artto: has joined #RubyOnRails
[10:22:23] chagel: has joined #RubyOnRails
[10:22:27] workmad3: has joined #RubyOnRails
[10:22:31] kitsuneyo: has joined #RubyOnRails
[10:23:22] waseem_: solars: I'll advise you to log the exception somewhere like Airbrake or something or even the log file after you catch it.
[10:25:17] Guest34101: has joined #RubyOnRails
[10:25:53] tvw: has joined #RubyOnRails
[10:27:41] chagel: has joined #RubyOnRails
[10:27:59] solars: waseem_, I'm logging it in rollbar
[10:28:22] solars: so we get directly notified
[10:28:52] solars: this way we don't miss them
[10:29:54] dalpo: has joined #RubyOnRails
[10:33:18] msyvich: has joined #RubyOnRails
[10:33:27] Psy-Q: has joined #RubyOnRails
[10:34:01] Ropeney: has joined #RubyOnRails
[10:35:09] Detch: has joined #RubyOnRails
[10:35:34] Axy: has joined #RubyOnRails
[10:35:34] Axy: has joined #RubyOnRails
[10:36:36] msyvich: has joined #RubyOnRails
[10:38:12] chagel: has joined #RubyOnRails
[10:38:39] rubyonrails349: has joined #RubyOnRails
[10:38:40] p1k_: has joined #RubyOnRails
[10:41:12] arup_r: has joined #RubyOnRails
[10:42:04] Pazician: has joined #RubyOnRails
[10:43:06] chagel: has joined #RubyOnRails
[10:44:28] Psy-Q: has left #RubyOnRails: ()
[10:45:30] scope: has joined #RubyOnRails
[10:47:27] quazimodo: has joined #RubyOnRails
[10:49:08] IFrank00: has joined #RubyOnRails
[10:49:32] ziyadb: has joined #RubyOnRails
[10:49:51] rails598: has joined #RubyOnRails
[10:50:27] ppinkerton: has joined #RubyOnRails
[10:52:15] zworks: has joined #RubyOnRails
[10:53:32] tambet: has joined #RubyOnRails
[10:53:58] sp1rs: has joined #RubyOnRails
[10:55:06] zworks: I have rspec installed, along with all its dependencies, also i see that there are about 3 different versions of each gem installed including the latest version
[10:55:12] scope: has joined #RubyOnRails
[10:55:54] zworks: but when i run 'bundle show rspec-rails' it's not using the latest version (3.4), rather it shows 3.1.0
[10:57:01] rubyonrails349: has joined #RubyOnRails
[10:58:07] rails598: has left #RubyOnRails: ()
[10:58:50] abundantmind: has joined #RubyOnRails
[10:58:53] mhoungbo: has joined #RubyOnRails
[10:58:56] rubyonrails349: hello i have a little problem i know its me being stupid so i appologise in advanced
[10:59:16] snowy: has joined #RubyOnRails
[10:59:24] workmad3: zworks: that's because bundler uses the version specified in `Gemfile.lock`, which is recorded when installing/updating gems to ensure you always use the same versions of your dependencies across machines/installations
[10:59:57] rubyonrails349: ive been making a couple of rails apps and have done ok. but a friend sent me a distribution and the rails version wont change over from 4.2.4 to 4.2.0
[11:00:10] workmad3: zworks: if you want to update the gem, run `bundle update rspec-rails` and bundler will re-resolve your dependencies with that version 'free' to see if it's possible to update
[11:00:13] rubyonrails349: i used an rvm to install rails
[11:00:20] rodfersou: has joined #RubyOnRails
[11:01:36] msyvich: has joined #RubyOnRails
[11:01:42] bronson: rubyonrails349: you checked your gemfile.lock?
[11:01:44] trinaldi: has joined #RubyOnRails
[11:02:42] bronson: ACTION loves bundler... pre-bundler days were dark days indeed.
[11:02:43] rubyonrails349: nope but thats not my only problem i decided i would try to create a new app using rails_4.2.0_ new appname
[11:02:52] rubyonrails349: and it says failure
[11:03:37] pawnbox: has joined #RubyOnRails
[11:04:34] rubyonrails349: [!] There was an error parsing `Gemfile`: Illformed requirement ["4.2.0."]. Bundler cannot continue. # from /Users/osx/Desktop/rubyonrailstutorialpdf/sample_app/sample_app/Gemfile:5
[11:05:02] bronson: yep, that looks wrong. where did it come from?
[11:05:09] rubyonrails349: *bronson would i have to change the gemfile.lock to rails 4.2.0
[11:05:26] tris: has joined #RubyOnRails
[11:05:27] bronson: it's a bad idea to edit gemfile.lock directly
[11:05:31] rubyonrails349: that came from bundle install
[11:05:45] bronson: put your version requirements in the gemfile and let bundler figure it out
[11:05:46] siaW: has joined #RubyOnRails
[11:05:59] rubyonrails349: that error came from that
[11:06:07] rubyonrails349: and when i create a new app i get this error
[11:06:12] bronson: huh. well, gist your gemfile I suppose
[11:06:35] siaW: i have a created_at object that looks like this “2016-02-11T11:47:15.147Z” How can i convert to something like “February 11, 2016”?
[11:06:40] rubyonrails349: bash: rails_4.2.0_: command not found
[11:06:46] Eswar: has joined #RubyOnRails
[11:07:27] bronson: you want a space in front of that first _
[11:07:56] bronson: siaw: look up strftime
[11:08:15] rubyonrails349: Users/osx/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:318:in `to_specs': Could not find 'railties' (= 4.2.0) - did find: [railties-4.2.5.1] (Gem::LoadError) Checked in 'GEM_PATH=/Users/osx/.rvm/gems/ruby-2.1.5:/Users/osx/.rvm/gems/ruby-2.1.5@global', execute `gem env` for more information from /Users/osx/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:327:in `to_spec' f
[11:08:25] rubyonrails349: i get that error when i have the space
[11:08:35] adaedra: You may want to gist that.
[11:08:42] siaW: bronson: ok
[11:09:07] rubyonrails349: sorry i will be right back need to pick my mother in law up from work damn woman wont give me half hour hahahaha
[11:09:09] adaedra: ah, this doesn't work?
[11:09:15] Guest34101: has joined #RubyOnRails
[11:10:11] srinidhi: has joined #RubyOnRails
[11:11:16] bronson: adaedra: I think it only works for a few anointed Australians
[11:13:02] msyvich: has joined #RubyOnRails
[11:13:35] RTG`: rubyonrails349: That error is showing you there is a trailing dot
[11:18:21] arup_r: has joined #RubyOnRails
[11:19:13] Eswar1: has joined #RubyOnRails
[11:19:27] siaW: what would be the class for this: ["2016-02-11T11:47:15.147Z"]
[11:19:41] siaW: i see the letter Z at the end and i don’t know what to make of it
[11:20:07] tetraktys: has joined #RubyOnRails
[11:20:31] LudicrousMango: has joined #RubyOnRails
[11:20:49] msyvich: has joined #RubyOnRails
[11:21:01] bronson: Z = zulu, UTC time
[11:21:10] bronson: or GMT, I forget. they're close.
[11:21:42] bronson: and what do you mean class...? That looks like an array containing a single string?
[11:22:22] bronson: you can `raise "CLASS: #{myvar.class}"` to see what class something is
[11:30:29] GeorgesLeYeti: has joined #RubyOnRails
[11:30:34] nachoman: has joined #RubyOnRails
[11:30:35] hcnewsom: has joined #RubyOnRails
[11:31:30] puerile: has joined #RubyOnRails
[11:32:41] artto: has joined #RubyOnRails
[11:33:47] GeorgesLeYeti: I would like to remove all the tag call show <show ...> </show> for an HTML file
[11:34:45] Eswar: has joined #RubyOnRails
[11:35:02] arup_r: GeorgesLeYeti: show where is the issue ? :)
[11:35:19] GeorgesLeYeti: I try with regex but /<(\/)?show(.+)?>/ but it didn't stop at >
[11:35:28] blackmes1: has joined #RubyOnRails
[11:35:34] adaedra: HTML and regex don't go together.
[11:36:50] adaedra: Even if I guess using [^>] instead of . may solve your issue.
[11:37:27] arup_r: GeorgesLeYeti: use http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-sanitize
[11:38:54] GeorgesLeYeti: arup_r, My problem is that I have 1 html file (which contain all style like <strong>) and 1 xml wich contains information for each word
[11:39:32] arup_r: GeorgesLeYeti: The method, I linked with that you can go far
[11:39:33] GeorgesLeYeti: and i would like to merge these 2 files
[11:39:45] arup_r: merge HTML + XML ?
[11:40:04] banisterfiend: has joined #RubyOnRails
[11:40:05] wxdk: has joined #RubyOnRails
[11:40:06] arup_r: and result will be ?
[11:40:07] GeorgesLeYeti: Yes pretty complicate to explain completly.
[11:40:39] GeorgesLeYeti: I have an HTML file where each word as a timestamp.
[11:40:43] cac: has joined #RubyOnRails
[11:41:18] arup_r: GeorgesLeYeti: can you show both of the file as a sample using a gist ?
[11:42:12] rafaelfranca: has joined #RubyOnRails
[11:42:50] GeorgesLeYeti: arup_r, https://gist.github.com/anonymous/4b3f2b3e1f0f8178e5bd
[11:43:52] marr: has joined #RubyOnRails
[11:44:41] arup_r: ok. does <word> html tag? Anyway, you can use Nokogiri.
[11:46:05] jottr_: has joined #RubyOnRails
[11:46:12] laith: has joined #RubyOnRails
[11:47:30] ldnunes: has joined #RubyOnRails
[11:48:07] laith: has joined #RubyOnRails
[11:49:11] tetraktys: has joined #RubyOnRails
[11:49:11] Ergo^: has joined #RubyOnRails
[11:49:37] hcnewsom: has joined #RubyOnRails
[11:49:50] mdw: has joined #RubyOnRails
[11:52:47] DaniG2k: has joined #RubyOnRails
[11:53:13] DaniG2k: hello all, I'm having a small RSpec issue with the following code: https://gist.github.com/DaniG2k/78445f1b94d67d2129e1
[11:53:27] DaniG2k: my test fails on expect(page).to have_link(article.title)
[11:53:51] zcreative: has joined #RubyOnRails
[11:53:52] DaniG2k: the odd thing is that if I visit the page in a browser, I am able to see the article listing for contributors
[11:54:04] arup_r: DaniG2k: shouldn't it be have_content ?
[11:54:13] DaniG2k: arup_r: I also tried have_content and that failed too
[11:54:21] DaniG2k: basically I just want an article listing
[11:54:29] DaniG2k: and am testing for whether the articles displau
[11:54:58] arup_r: yes, have_link nopes. have_content needs to be used. But now need to see, what is wrong there.. wait :)
[11:55:02] DaniG2k: I used pry in the RSpec test and can confirm that the article is valid and persisted
[11:55:24] Eswar: has joined #RubyOnRails
[11:55:32] DaniG2k: and within the spec, doing user.articles.all returns the article
[11:55:41] DaniG2k: so it should be displaying :S
[11:56:41] gthank: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[11:56:49] _bogus_: has joined #RubyOnRails
[11:57:28] arup_r: DaniG2k: did you try to save screesnhot and confirm is the page is rendering or not ?
[11:57:38] arup_r: if not, try that first..
[11:57:49] DaniG2k: take a screenshot from the spec?
[11:57:55] DaniG2k: im not even sure how to do that really ... :/
[11:58:05] arup_r: yes.. it is capybara.. so you can
[11:58:09] arup_r: they have a method
[11:59:07] arup_r: DaniG2k: https://github.com/jnicklas/capybara#debugging
[11:59:36] arup_r: you use page.save_screenshot just before the failing expect and see the saved image..
[11:59:56] DaniG2k: briliant!!
[12:00:00] DaniG2k: thanks I'll try that now
[12:05:45] krzkrzkrz: has joined #RubyOnRails
[12:05:53] ElFerna: has joined #RubyOnRails
[12:10:44] JohnBat26: has joined #RubyOnRails
[12:10:57] _Tariq: has joined #RubyOnRails
[12:11:15] bePolite: has joined #RubyOnRails
[12:14:08] solars: can I somehow output the raw request (body) in a controller to see if the params could not be parsed?
[12:14:27] rvanlieshout: i actually still had a connection there
[12:14:43] jeanlinux: has joined #RubyOnRails
[12:15:06] bePolite: has joined #RubyOnRails
[12:16:32] DaniG2k: has joined #RubyOnRails
[12:17:02] Palsson: has joined #RubyOnRails
[12:18:12] dcope: why would assets precompile randomly fail when deploying with capistrano?
[12:18:25] dcope: it seems to work 90% of the time... but randomly i can't deploy because assets precompile fails
[12:18:31] mhoungbo: has joined #RubyOnRails
[12:18:33] p1k_: has joined #RubyOnRails
[12:20:38] RailsRookie: has joined #RubyOnRails
[12:22:02] rvanlieshout: fails with error?
[12:23:13] dcope: rvanlieshout: it doesn't give an error
[12:23:21] dcope: it just says rolling back because assets precompile failed :(
[12:23:33] dcope: when it happens i just keep deploying til it goes through :/
[12:24:34] Fly80: has joined #RubyOnRails
[12:24:46] rvanlieshout: dcope: couldn't it be just a ssh idle timeout thing?
[12:26:13] sp1rs: has joined #RubyOnRails
[12:28:19] msyvich: has joined #RubyOnRails
[12:33:26] artto: has joined #RubyOnRails
[12:34:05] kp666: has joined #RubyOnRails
[12:34:50] kp666: has joined #RubyOnRails
[12:35:50] openstruct: has joined #RubyOnRails
[12:36:02] Cervajz: has joined #RubyOnRails
[12:37:19] askhat: has joined #RubyOnRails
[12:37:54] tambet: has joined #RubyOnRails
[12:37:57] IFrank00: has joined #RubyOnRails
[12:37:58] sevenseacat: has joined #RubyOnRails
[12:38:01] askhat: has left #RubyOnRails: ()
[12:40:04] bahar: has joined #RubyOnRails
[12:40:41] sandstrom: has joined #RubyOnRails
[12:40:43] cac: has joined #RubyOnRails
[12:41:42] gthank: has joined #RubyOnRails
[12:41:59] OSIRIS_: has joined #RubyOnRails
[12:42:10] gthank: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[12:43:20] artto: has joined #RubyOnRails
[12:44:59] armyriad: has joined #RubyOnRails
[12:45:42] sohel: has joined #RubyOnRails
[12:46:36] frishi: has joined #RubyOnRails
[12:46:45] IFrank00: has joined #RubyOnRails
[12:49:26] wxdk: has joined #RubyOnRails
[12:50:41] bronson_: has joined #RubyOnRails
[12:52:04] dcope: rvanlieshout: perhaps, ill check into that
[12:53:13] rubyonrails349: has joined #RubyOnRails
[12:53:20] _Tariq: has joined #RubyOnRails
[12:53:40] bbrowning: has joined #RubyOnRails
[12:54:31] Sigfrid: has joined #RubyOnRails
[12:54:34] scope: has joined #RubyOnRails
[12:55:11] Axilla: has joined #RubyOnRails
[12:55:36] armyriad: has joined #RubyOnRails
[12:57:56] zworks: has joined #RubyOnRails
[13:00:52] zworks: I just installed guard-rspec to automatically run tests if files changed
[13:01:16] zworks: i didn't do anything else yet, how can i make it work ?
[13:01:47] chridal: Anyone know whether the Postgres/PostGIS driver in Rails is threadsafe?
[13:02:00] scope2229: has joined #RubyOnRails
[13:05:48] mikecmpbll: chridal: yes
[13:06:23] chridal: mikecmpbll: Do you know that it is the same for the PostGIS driver? I don't really know what is the difference there
[13:06:34] p7r_: has left #RubyOnRails: ()
[13:06:42] herpless: has joined #RubyOnRails
[13:06:43] mikecmpbll: chridal: depends at what level you mean, rails handles thread safety at the connection level
[13:06:45] chridal: Whether it's the same driver but with some sort of adapter
[13:06:46] scope: has joined #RubyOnRails
[13:07:11] mikecmpbll: by connection level, i mean rails's Connection classes
[13:07:25] chridal: Hm, I don't really know, because I don't really know how the implementation of the PostGIS adapter differs
[13:07:37] ddv: zworks: read the documentation
[13:08:12] mikecmpbll: chridal : i don't know anything about postgis, is there an issue or?
[13:09:16] Ergo: has joined #RubyOnRails
[13:09:57] bruce_lee: has joined #RubyOnRails
[13:09:57] bruce_lee: has joined #RubyOnRails
[13:09:59] rickmasta: has joined #RubyOnRails
[13:10:13] sudoubuntu: has joined #RubyOnRails
[13:10:23] sandstrom: has joined #RubyOnRails
[13:11:06] chridal: PostGIS is an extension to Postgres which adds geo types etc.
[13:11:18] chridal: No, not really an issue yet. Just doing some research and couldn't find the information
[13:11:47] zworks: ddv: I tried , but it says bundler: command not found: rspec
[13:12:05] scope: im having some trouble getting rails to use 4.2.0 instead of 4.2.5 the gem file has all the correct versions. but when bundle install is used i get an error
[13:12:18] scope: i cant start a new app under the 4.2.0 either
[13:12:42] scope: someone mention gist can anyone elaborate
[13:12:50] mikecmpbll: chridal: like i said though, rails handles the threads stuff in it's connectionhandlers
[13:13:10] mikecmpbll: it stores something like a hash which is keyed by thread id
[13:13:28] mikecmpbll: to a connectionhandler, so threads use their own separate connections unless you hack around it.
[13:14:23] wxdk: has joined #RubyOnRails
[13:15:12] tetraktys: has joined #RubyOnRails
[13:15:14] Guest34101: has joined #RubyOnRails
[13:16:00] Palsson: has joined #RubyOnRails
[13:17:36] unl0ckd: has joined #RubyOnRails
[13:17:50] _Tariq: has joined #RubyOnRails
[13:18:58] chagel: has joined #RubyOnRails
[13:21:51] tambet: has joined #RubyOnRails
[13:23:35] _Tariq: has joined #RubyOnRails
[13:24:47] ferr: How would I make a helper to render font awesome check and close icons if my object returns true or false
[13:25:31] rvanlieshout: fa_icon foo ? :check : :close
[13:27:08] silverdust: has joined #RubyOnRails
[13:27:38] silverdust: How can I get an array of column names from an AR object
[13:27:50] artto: has joined #RubyOnRails
[13:27:55] silverdust: t = Photo.last; t.members doesn't work
[13:28:05] silverdust: I'd assumed I could handle it like a struct
[13:28:23] havenwood: silverdust: Photo.column_names
[13:29:26] dstarh: has joined #RubyOnRails
[13:29:38] silverdust: I get NoMethodError
[13:29:51] arup_r: impossible
[13:30:13] silverdust: oh Photo.column_names . I did Photo.last.column_names
[13:30:38] silverdust: what if I had to do it on Photo.last ?
[13:31:09] workmad3: silverdust: Photo.last.class.column_names, or Photo.last.attributes.keys
[13:31:31] silverdust: exactly what I wanted. Thanks
[13:31:38] workmad3: silverdust: depending on if you wanted the columns that are cached from the schema or the 'columns' the object was initialised with
[13:35:00] silverdust: workmad3: what if I wanted associated models in the list like if Photo belongs_to Person I should see person among the keys like I can do Photo.last.person
[13:35:17] mostlybadfly: has joined #RubyOnRails
[13:35:31] workmad3: silverdust: that's got very little to do with columns
[13:35:45] DaniG2k: has joined #RubyOnRails
[13:36:30] laith: has joined #RubyOnRails
[13:36:32] workmad3: silverdust: you'd need to dig out how to grab the association reflections from rails docs to achieve that
[13:36:46] blackmes1: has joined #RubyOnRails
[13:36:50] alexhartley: has joined #RubyOnRails
[13:38:19] Ergo: has joined #RubyOnRails
[13:38:28] silverdust: TasksToDoLater += _
[13:41:06] Ropeney: has joined #RubyOnRails
[13:41:13] Jeremy1023: has joined #RubyOnRails
[13:44:01] mjfox: has joined #RubyOnRails
[13:45:00] steffes: has joined #RubyOnRails
[13:45:30] chridal: Is there a bug with the `.pluck` syntax? When doing a Table.joins(:other_table).where(x: y).pluck("table.id") it doesn't produce the proper query, but if I do pluck("\"table\".\"id\"") it works.
[13:46:10] htmldrum: has joined #RubyOnRails
[13:46:11] rvanlieshout: chridal: what db engine?
[13:46:25] rvanlieshout: pluck directly pushes that to the select part
[13:46:39] chridal: rvanlieshout: Using Postgres with the PostGIS adapter
[13:46:55] rvanlieshout: and what of you to_sql just before the pluck
[13:47:02] bb: has joined #RubyOnRails
[13:47:09] rvanlieshout: then copy that query, change the select and execute it in a 'rails dbconsole -p'
[13:48:09] djellemah_: has joined #RubyOnRails
[13:48:11] chridal: rvanlieshout: https://gist.github.com/christiandalsvaag/0a74c7172eda390370db
[13:48:23] snowy: has joined #RubyOnRails
[13:48:45] chridal: The issue though is seen in the beginning of the query, it does not include the " and " around `story` and `id`
[13:49:30] OSIRIS_: has joined #RubyOnRails
[13:49:38] rvanlieshout: that's engine specific though
[13:49:59] chridal: so basically it might be the PostGIS adapter messing it up?
[13:50:00] rvanlieshout: and this seems like something else
[13:50:07] rvanlieshout: what if you restart your console?
[13:50:25] nobitanobi: has joined #RubyOnRails
[13:50:29] rvanlieshout: also there seems to be no reason to join users
[13:50:38] goodcodeguy: has joined #RubyOnRails
[13:50:53] chridal: There is, I just haven't included it yet. It's the cause of me using " and " to pluck instead of symbols
[13:51:01] chridal: if not I could just pluck with (:column_name)
[13:51:06] chridal: but I need to pluck on both sides of the join
[13:51:15] nobitanobi: Hello, is there any way to prevent an AR object which belongs_to another object, to access a specific attribute of that associated object?
[13:51:16] rvanlieshout: the result would be the same
[13:51:21] rvanlieshout: but this doesn't raise a query error
[13:51:23] rvanlieshout: just a connection error
[13:51:30] chridal: what do you mean?
[13:51:41] rvanlieshout: nobitanobi: no
[13:51:51] rvanlieshout: chridal: that the error given does not indicate there is a problem with your query
[13:51:54] rvanlieshout: nobitanobi: and why?
[13:52:24] arup_r: has joined #RubyOnRails
[13:52:36] rvanlieshout: you should not place stuff in the view if you don't want it there
[13:52:38] msyvich: has joined #RubyOnRails
[13:52:45] rvanlieshout: execpt from that you're allowed to do anything in a console session
[13:52:53] chridal: rvanlieshout: Restarting the console actually fixed it..
[13:52:55] nobitanobi: rvanlieshout: just wondering
[13:53:04] chridal: what could have caused it?
[13:53:11] rvanlieshout: chridal: something that happened before
[13:53:13] chridal: That's a scary bug.
[13:53:18] rvanlieshout: that's not a bug
[13:53:36] IFrank00: has joined #RubyOnRails
[13:54:43] chridal: Still weird though
[13:54:48] chridal: And hard to catch
[13:54:49] mjfox: has joined #RubyOnRails
[13:54:57] chridal: might have had me spending hours trying to find it
[13:55:00] pawnbox: has joined #RubyOnRails
[13:55:22] rvanlieshout: consult the postgres documentation on why your connection to the db could be left in such state
[13:55:25] ddv: welcome in development
[13:55:26] rvanlieshout: aborted transaction
[13:55:54] nobitanobi: rvanlieshout: I want to avoid clients of my object accessing a particular attribute of the associated object
[13:56:00] rvanlieshout: nobitanobi: that's something else
[13:56:13] rvanlieshout: don't give them access.. you control that in your views and controllers
[13:56:25] rvanlieshout: that's not a part for the model domain
[13:56:46] nobitanobi: rvanlieshout: right. Issue is that there is already access, and I am trying to figure out a heuristic way to find the places where this is happening.
[13:57:04] bePolite: has joined #RubyOnRails
[13:57:06] rvanlieshout: consider using strong params
[13:57:11] pawnbox: has joined #RubyOnRails
[13:58:26] chaas: has joined #RubyOnRails
[13:59:06] Ropeney: has joined #RubyOnRails
[14:01:07] ramortegui: has joined #RubyOnRails
[14:02:31] griffindy: has joined #RubyOnRails
[14:02:43] artto: has joined #RubyOnRails
[14:02:48] IFrank00: Hi im starting on creating Test for my app. Whe I started this app with some scaffolding it generate somo test folders. I like to know if I can delete all that folders and files and just start from 0
[14:02:53] DaniG2k: has joined #RubyOnRails
[14:04:44] rvanlieshout: IFrank00: you can, but you don't want to just delete all files touched by scaffolding
[14:04:47] rvanlieshout: like routes.rb
[14:05:54] IFrank00: rvanlieshout, I just want to delete all in the test folder and write it my self has im learning and don't want magic code there
[14:06:02] jgpawletko: has joined #RubyOnRails
[14:06:23] mjfox: has joined #RubyOnRails
[14:06:23] bronson: has joined #RubyOnRails
[14:06:27] godzillaenlacasa: has joined #RubyOnRails
[14:06:41] rvanlieshout: IFrank00: that's ok. just review what you delete then
[14:07:20] IFrank00: rvanlieshout, or I can move it to another directory and work my way back on the app directory??
[14:07:47] rvanlieshout: those files don't contain that much
[14:07:51] stannard: has joined #RubyOnRails
[14:09:54] IFrank00: rvanlieshout, thank you . Im just a little concerned
[14:10:00] msyvich: has joined #RubyOnRails
[14:10:34] IFrank00: jejej this going to be a new chapter
[14:12:53] brycesenz: has joined #RubyOnRails
[14:13:20] chouhoulis: has joined #RubyOnRails
[14:14:42] arup_r: our internal rubygem server is soooo slowwww,,, :/
[14:14:50] rvanlieshout: then why are you using it?
[14:15:02] rvanlieshout: cause it's kinda strange to have it internal when it's slower then the normal one
[14:15:25] IFrank00: rvanlieshout, yeah Im using it. I should create a new branch for this ??
[14:15:36] goodcodeguy: has joined #RubyOnRails
[14:15:37] rvanlieshout: for testing stuff.. yes
[14:15:41] C0r3_: has joined #RubyOnRails
[14:16:37] banister: has joined #RubyOnRails
[14:17:03] IFrank00: rvanlieshout, thank you again
[14:17:26] arup_r: rvanlieshout: yeah, just joined this comp.. every where security.. :)
[14:17:41] silverdust: I have a helper that uses devise user_signed_in? to determine what value is returned but my helper spec can't find this
[14:17:48] arup_r: actually they have lot of internal gems, and that is slow basically
[14:17:51] silverdust: Here's the error I get undefined method `user_signed_in?' for #<RSpec::ExampleGroups::CartsHelper:0x007f891585b8f8>
[14:18:11] nogic: has joined #RubyOnRails
[14:18:45] segy: has joined #RubyOnRails
[14:18:46] arup_r: those devise helpers will not work inside the spec
[14:19:01] adavia: has joined #RubyOnRails
[14:19:04] DaniG2k_: has joined #RubyOnRails
[14:19:07] C0r3_: has left #RubyOnRails: ()
[14:19:10] qejk: has joined #RubyOnRails
[14:19:10] silverdust: I even did this https://github.com/plataformatec/devise#test-helpers in my rails helper
[14:19:17] flashpoint9: has joined #RubyOnRails
[14:19:18] arup_r: well, if you use it inside any _spec.rb files I meant
[14:19:20] silverdust: rails_helper.rb
[14:19:31] C0r3_: has joined #RubyOnRails
[14:19:46] silverdust: even with that? Then what's the point of that in their Readme
[14:20:14] arup_r: you have access only sign_in/out that's it
[14:20:20] Timberwo|f: has joined #RubyOnRails
[14:20:49] C0r3_: has joined #RubyOnRails
[14:20:56] arup_r: but why are you trying to call user_signed_in inside the spec ?
[14:21:59] lacrymology: has joined #RubyOnRails
[14:22:06] arup_r: devise gives signin and out helpers, so that you don't need to go through everytime via login page to test..
[14:22:06] MrDoctor: has joined #RubyOnRails
[14:22:13] MrDoctor: Hi guys, I am in fedora 23 and trying to set up postgresql for a rails application. I can connect to my created database using psql fine, but I am encountering problems from both my rails application and from pgadminIII. It's gives me an ident authentication failed arror.
[14:23:03] MrDoctor: I've added port 5432 to public interfaces too in firewalld.
[14:23:07] lacrymology: has joined #RubyOnRails
[14:23:45] codesoda_: has joined #RubyOnRails
[14:23:57] silverdust: arup_r: I'm not calling user_signed_in in rspec. I have it in my helper and I'm writing a test for that helper
[14:24:10] arup_r: show the code.. please.
[14:24:17] arup_r: what helpers you meant >
[14:24:30] C0r3_: has joined #RubyOnRails
[14:25:31] alexishuard: has joined #RubyOnRails
[14:25:41] silverdust: Here arup_r https://gist.github.com/bl4ckdu5t/bbc498fca67099e3dd48
[14:25:44] C0r3: has joined #RubyOnRails
[14:25:50] arup_r: MrDoctor: there is pg_hba.conf file to consult for that. I think you need to look at there..
[14:27:01] silverdust: because cart is an AR object with an association with product for signed in users but it's just a struct as you see in the spec for unsigned users
[14:27:24] C0r3: has joined #RubyOnRails
[14:28:01] arup_r: silverdust: ok, no idea.
[14:28:39] hamster88: has joined #RubyOnRails
[14:28:42] ppinkerton: has joined #RubyOnRails
[14:28:45] aegis3121: has joined #RubyOnRails
[14:28:52] hamster88: Hello everyone
[14:29:47] andyrs: has joined #RubyOnRails
[14:30:34] sankaber: has joined #RubyOnRails
[14:30:41] hamster88: I am bit stuck
[14:30:48] hamster88: pastebin is here > http://pastebin.com/KGG9dK74
[14:30:53] granden: has joined #RubyOnRails
[14:31:10] hamster88: eekz sorry.. let me put it on gist
[14:31:46] MrDoctor: All right arup_r da. Thank you.
[14:32:10] arup_r: MrDoctor: you are from India.. I get it. But who are you ? :D
[14:32:24] MrDoctor: I'm a bengali, so I know you're one from your nick.
[14:32:30] granden: Hi guys, been using PHP and Laravel for a long time, and before that I did som RoR, now as a freelancer I wanted to switch back to RoR and ditch PHP whenever I can. Anyone who have any experince wokring with CSV/Excel files? Lather large one with a few million of lines. And about 500-600MBs big?
[14:32:35] arup_r: ahh.. cool
[14:32:40] arup_r: vlo acho ???? :p
[14:33:11] MrDoctor: Mondo noyi. Dadar biye acche samne, seye niye uttejyoto sobai amra barite.
[14:34:01] MrDoctor: Apnar suggestion kaj korey gachey.
[14:34:24] jeanlinux: has joined #RubyOnRails
[14:34:37] MrDoctor: Apnar kamon acchen?
[14:34:39] arup_r: yeah, now back to english, otherwise we may get the punishment.. hehe
[14:34:55] silverdust: good decision granden
[14:35:44] sevenseacat: arup_r: i think its okay, as long as it doesn't totally take over the channel. no punishment, i know it's probably easier for you to communicate in your native language
[14:36:06] kerunaru: has joined #RubyOnRails
[14:36:12] dalpo: has joined #RubyOnRails
[14:36:15] ElFerna: has joined #RubyOnRails
[14:36:29] MrDoctor: Thank you for your consideration, sevenseacat.
[14:36:32] sevenseacat: ACTION gets out Google translate
[14:36:39] MrDoctor: But English is fine for the both of us too.
[14:36:44] arup_r: sevenseacat: yeah, he is my native .. so started to use.. but others might see it like a NOISE... :p
[14:36:58] granden: silverdust: Thanks ;) Got any input on the big file thingy?
[14:37:03] pwnd_nsfw: *mashes keyboard*
[14:37:20] arup_r: pwnd_nsfw: waiting when my bundle install will complete..
[14:37:28] arup_r: i am installinh byebug
[14:37:47] drbayer: has joined #RubyOnRails
[14:38:18] silverdust: main ek bevakooph kee tarah hindee bolate hain
[14:38:30] arup_r: silverdust: ^^ +1
[14:38:39] silverdust: no idea granden. But you should find a solution soon by googling
[14:38:42] arup_r: Google is awesome!
[14:39:01] SeanLazer: has joined #RubyOnRails
[14:40:08] IFrank00: rvanlieshout, I got another question. To start with testing should I start with TestUnit and then do SpecsTesting just to get the flow of testing ??
[14:40:52] uglybandersnatch: has joined #RubyOnRails
[14:41:33] silverdust: IFrank00: I think for that it's whatever scratch your balls. I couldn't figure minitest and it was frustrating but rspec was fun and now I want to give minitest a try again because I get the idea now
[14:41:59] jeanlinux: has joined #RubyOnRails
[14:42:23] IFrank00: silverdust, will I get the same results?
[14:43:13] pwnd_nsfw: IFrank00, basically. Different output, different syntax
[14:43:16] pwnd_nsfw: It reads different
[14:43:54] rvanlieshout: use whichever makes you feel happy
[14:44:13] silverdust: maybe. we're different. I just think rspec made me understand testing better
[14:44:45] silverdust: but now I have little idea of how fixtures work compare to factories and I'd have to use minitest to tell in another project
[14:45:00] solars: asking again: is there a free tool like sonarqube/codeclimate that I could use locally or integrate with a CI server, that provides an overall app maintainability/quality score?
[14:45:05] IFrank00: rvanlieshout, thank you has I don't want to start and then figure out that its more complex to read it
[14:45:20] solars: sonarqube dropped ruby support, codeclimate only works in their cloud
[14:45:24] yellow5: has joined #RubyOnRails
[14:48:43] njero: has joined #RubyOnRails
[14:50:26] sandstrom: has joined #RubyOnRails
[14:50:56] C0r3: has joined #RubyOnRails
[14:50:57] artto: has joined #RubyOnRails
[14:51:58] DmitryBochkarev: has joined #RubyOnRails
[14:53:56] chrisarcand: silverdust: Note that testing frameworks != test data paradigms. You could use fixtures with RSpec easily (you don't need to use factory girl...) just like you could use factory girl easily with minitest...
[14:54:26] IFrank00: rvanlieshout, https://gist.github.com/Frank004/464f66e134d294419733 if you can check my small test thank you. just testing it out
[14:54:28] steffes: has joined #RubyOnRails
[14:55:34] MrDoctor: has joined #RubyOnRails
[14:55:45] LudicrousMango: has joined #RubyOnRails
[14:58:33] silverdust: chrisarcand: My point being I'd understand things like these better when I use minitest. See I didn't even know this but using both of them often will help me learn what can work with either of them
[15:01:02] konsolebox: has joined #RubyOnRails
[15:01:28] wxdk2: has joined #RubyOnRails
[15:02:49] wxdk: has joined #RubyOnRails
[15:03:00] brycesenz: has joined #RubyOnRails
[15:05:50] hcnewsom: has joined #RubyOnRails
[15:06:09] chubijs: has joined #RubyOnRails
[15:06:10] ewnd9: has joined #RubyOnRails
[15:06:59] n1lo: has joined #RubyOnRails
[15:08:27] bronson: has joined #RubyOnRails
[15:08:28] jeanlinux: has joined #RubyOnRails
[15:09:53] sp1rs: has joined #RubyOnRails
[15:10:23] aegis3121: has joined #RubyOnRails
[15:11:11] defsdoor: has joined #RubyOnRails
[15:13:22] Deck`: has joined #RubyOnRails
[15:13:41] jottr: has joined #RubyOnRails
[15:15:47] jeanlinux: has joined #RubyOnRails
[15:17:02] emachnic: has joined #RubyOnRails
[15:19:19] dopamean_: has joined #RubyOnRails
[15:20:09] dopamean1: has joined #RubyOnRails
[15:22:02] htmldrum: has joined #RubyOnRails
[15:22:24] diegoviola: has joined #RubyOnRails
[15:25:57] \13k: has joined #RubyOnRails
[15:27:01] Helheim: has joined #RubyOnRails
[15:27:02] sankaber: has joined #RubyOnRails
[15:27:02] artto_: has joined #RubyOnRails
[15:27:03] pawnbox_: has joined #RubyOnRails
[15:27:04] ElFerna_: has joined #RubyOnRails
[15:27:04] johnflux_: has joined #RubyOnRails
[15:27:04] Helheim: has joined #RubyOnRails
[15:27:05] \13k: has joined #RubyOnRails
[15:27:22] funnel: has joined #RubyOnRails
[15:28:18] ruurd: has joined #RubyOnRails
[15:28:40] anagha_: has joined #RubyOnRails
[15:28:48] C0r3: has left #RubyOnRails: ()
[15:29:05] Helheim_: has joined #RubyOnRails
[15:29:12] C0r3: has joined #RubyOnRails
[15:30:18] goodcodeguy: has joined #RubyOnRails
[15:31:07] sharkman: has joined #RubyOnRails
[15:32:03] sharkman: can i ask a question
[15:33:03] tweeeaks: just ask...
[15:33:09] arup_r: sharkman: !no
[15:33:17] Helheim: has joined #RubyOnRails
[15:33:50] cabargas: has joined #RubyOnRails
[15:33:55] sharkman: games = Game.joins(:scores).where('scores.period = ?', 1)
[15:34:12] sharkman: then i do p games[0].scores, and it lists scores where period is not equal to 1...
[15:34:21] goodcodeguy: has joined #RubyOnRails
[15:34:22] sharkman: how did i mess this query up?
[15:37:22] flashpoint9: has joined #RubyOnRails
[15:38:03] Helheim: has joined #RubyOnRails
[15:38:40] kies^: has joined #RubyOnRails
[15:39:05] yellow5: has joined #RubyOnRails
[15:40:49] mary5030: has joined #RubyOnRails
[15:40:49] goodcodeguy: has joined #RubyOnRails
[15:41:20] Helheim: has joined #RubyOnRails
[15:41:30] mary5030: has joined #RubyOnRails
[15:41:39] htmldrum: has joined #RubyOnRails
[15:42:13] sharkman: oh i see, this will select all games that has a score where period=1
[15:42:40] brycesenz: has joined #RubyOnRails
[15:42:45] konsolebox: has joined #RubyOnRails
[15:44:05] Helheim: has joined #RubyOnRails
[15:45:19] sharkman: wow this is tough!
[15:45:43] sp1rs: has joined #RubyOnRails
[15:47:17] Helheim: has joined #RubyOnRails
[15:47:59] artto: has joined #RubyOnRails
[15:48:12] chouhoulis: has joined #RubyOnRails
[15:51:14] Helheim: has joined #RubyOnRails
[15:57:04] B1n4r10: has joined #RubyOnRails
[15:57:09] Helheim: has joined #RubyOnRails
[15:58:28] ss_much: has joined #RubyOnRails
[15:58:45] cac: has joined #RubyOnRails
[15:59:05] sangwoojoo: has joined #RubyOnRails
[16:00:10] Helheim: has joined #RubyOnRails
[16:00:45] sangwoojoo: How do I render a string '<%' in erb file?
[16:00:45] htmldrum: has joined #RubyOnRails
[16:00:53] codepete: has joined #RubyOnRails
[16:01:14] lacrymology: has joined #RubyOnRails
[16:02:27] flashpoint9: has joined #RubyOnRails
[16:02:28] matthewd: sangwoojoo: <%%
[16:02:40] sharkman: has joined #RubyOnRails
[16:03:30] jottr: has joined #RubyOnRails
[16:04:07] sangwoojoo: Great! It works thank you matthewd.
[16:04:13] Helheim: has joined #RubyOnRails
[16:06:33] bronson: has joined #RubyOnRails
[16:06:33] banister: has joined #RubyOnRails
[16:06:38] umdstu: has joined #RubyOnRails
[16:07:50] umdstu: i have an external request that is stubbed in test_helper. I added something to a controller test which calls that, and now the stub isn't being picked up/detected.
[16:08:29] umdstu: the 'suggested' stub to add in the test output is exactly what I have in test_helper
[16:09:07] Helheim: has joined #RubyOnRails
[16:10:10] polishdub: has joined #RubyOnRails
[16:10:15] rakm: has joined #RubyOnRails
[16:10:51] bricker: has joined #RubyOnRails
[16:10:53] Scient: internal redirects within a rails app are relatively cheap right?
[16:11:06] Jon30: has joined #RubyOnRails
[16:12:07] Helheim: has joined #RubyOnRails
[16:12:32] Cervajz_: has joined #RubyOnRails
[16:15:06] htmldrum: has joined #RubyOnRails
[16:16:11] Helheim: has joined #RubyOnRails
[16:19:01] aegis3121: has joined #RubyOnRails
[16:19:02] disgrntld: has joined #RubyOnRails
[16:19:14] Helheim: has joined #RubyOnRails
[16:19:40] melter: has joined #RubyOnRails
[16:19:44] treehug88: has joined #RubyOnRails
[16:19:53] aegis3121: has joined #RubyOnRails
[16:20:52] apeiros: Scient: what's an internal redirect?
[16:22:18] Helheim: has joined #RubyOnRails
[16:22:50] ElFerna_: has joined #RubyOnRails
[16:24:53] sangwoojoo: has left #RubyOnRails: ()
[16:27:01] Helheim: has joined #RubyOnRails
[16:27:37] banister: has joined #RubyOnRails
[16:27:50] arup_r: apeiros: he meant redirect_to some_app_local_path
[16:27:55] arup_r: i think so
[16:28:13] Voxxit: has joined #RubyOnRails
[16:29:13] TheShaun: has joined #RubyOnRails
[16:30:05] Helheim: has joined #RubyOnRails
[16:30:30] rubyonrailed: has joined #RubyOnRails
[16:33:10] Helheim: has joined #RubyOnRails
[16:33:46] MrDoctor: has joined #RubyOnRails
[16:34:33] msyvich: has joined #RubyOnRails
[16:39:09] Helheim: has joined #RubyOnRails
[16:39:20] wxdk2: has joined #RubyOnRails
[16:39:20] The_Phoenix: has joined #RubyOnRails
[16:41:26] adam_: has left #RubyOnRails: ()
[16:41:38] adam12: has joined #RubyOnRails
[16:42:22] granden: has joined #RubyOnRails
[16:43:01] htmldrum: has joined #RubyOnRails
[16:48:31] htmldrum: has joined #RubyOnRails
[16:50:32] rattatmatt: has joined #RubyOnRails
[16:51:09] umdstu: any reason a webmock stub_request configured in test_helper.rb would not be 'seen' when that url is called in a controller_test ?
[16:51:22] artto: has joined #RubyOnRails
[16:51:25] baweaver: has joined #RubyOnRails
[16:52:42] pipework: umdstu: Is webmock enabled?
[16:53:00] pipework: https://github.com/bblimke/webmock#disabling-and-enabling-webmock-or-only-some-http-client-adapters
[16:53:11] umdstu: pipework: yes, `require 'webmock/minitest'` is at the top of test_helper.rb
[16:54:32] rattatmatt: hey guys, I'm working on opening up parts of our rails api to 3rd party developers to create apps/plugins that a user could then authorize to access/modify their data. does anyone have any recommendations on the best way to go about this?
[16:54:44] pipework: rattatmatt: oauth2
[16:56:11] sandstrom: has joined #RubyOnRails
[16:57:02] rattatmatt: figured that would be the recommendation - I've been looking at using oauth2 but I got nervous when I stumbled across the original creator's blog where he explains that he left the team because they were making terrible security decisions
[16:57:16] umdstu: pipework: to be clear, webmock is picking up the network request
[16:57:25] umdstu: pipework: but its' not using the configured stub for that request
[16:58:17] gambl0re: has joined #RubyOnRails
[16:58:35] pipework: umdstu: Oh I see. Hm, does it list any stubs at all when it fails?
[17:01:23] umdstu: pipework: yes, it says 'hey try adding this stub to solve your problem...' but its the stub i already have, verbatim, except my expected body is not blank.
[17:01:38] umdstu: pipework: for giggles I pasted it over top the actual stub and it doesn't change anything
[17:01:40] NeoHamled: has joined #RubyOnRails
[17:02:09] Devalo: has joined #RubyOnRails
[17:02:09] djbkd: has joined #RubyOnRails
[17:02:16] pipework: umdstu: hm. I've had funny situations like that come up before, but it usually only takes me maybe 3-4 hours to find tops.
[17:02:37] pipework: I'd help, but I have some work I have to attend to.
[17:02:50] pipework: I can in a while though.
[17:03:04] umdstu: pipework: hah, awesome. if it helps narrow it down... i had it working yesterday. but it was called differently
[17:03:06] rickmasta: has joined #RubyOnRails
[17:03:06] chipotle: has joined #RubyOnRails
[17:03:24] goodcodeguy: has joined #RubyOnRails
[17:04:00] Devalo: If you were to start up a new project, would you go with 4.2.5 or the beta2? Maybe it would be best to wait for the official release of 5? I feel kind of hesitant being so close to the new release
[17:04:14] umdstu: pipework: if in my controller_test i call `post :create`, and inside of def create I call the method that triggers the external call, it works
[17:04:47] umdstu: but if I simply do ClassName.external_call inside of the setup for the test, it fails
[17:04:50] htmldrum: has joined #RubyOnRails
[17:04:55] emachnic_: has joined #RubyOnRails
[17:04:56] pipework: umdstu: Oh, I think that's why!
[17:05:21] pipework: You need a proper test case object that is set up for you and depends on you calling the helper methods not the class itself directly
[17:05:35] pipework: .That's where webmock is hooked up in webmock/minitest, iirc.
[17:05:40] rickmasta: has joined #RubyOnRails
[17:05:52] umdstu: let me take a peak
[17:06:28] rickmasta: has joined #RubyOnRails
[17:06:58] pipework: To summit all up, you/we/I might need to peruse the webmock source directly. Professional level documentation at its most robust.
[17:07:14] lolcodenewbie: has joined #RubyOnRails
[17:07:31] rickmasta: has joined #RubyOnRails
[17:07:39] umdstu: pipework: ill keep looking through it
[17:07:41] blackmes1: has joined #RubyOnRails
[17:07:55] codesoda: has joined #RubyOnRails
[17:08:10] kdough: has joined #RubyOnRails
[17:08:18] rickmasta: has joined #RubyOnRails
[17:09:37] uris: has joined #RubyOnRails
[17:11:39] EduardoBautista: has joined #RubyOnRails
[17:12:34] brycesenz: has joined #RubyOnRails
[17:15:37] mostlybadfly: has joined #RubyOnRails
[17:15:48] sled: has joined #RubyOnRails
[17:17:09] cajone: has left #RubyOnRails: ()
[17:17:12] kristoph: has joined #RubyOnRails
[17:18:08] marr: has joined #RubyOnRails
[17:18:11] goodcodeguy: has joined #RubyOnRails
[17:18:36] kristoph: has left #RubyOnRails: ()
[17:19:14] rakm: has joined #RubyOnRails
[17:19:19] kristoph: has joined #RubyOnRails
[17:19:42] a1fa: how can you check if Model.search returns 1 or many
[17:20:12] jscheel: has joined #RubyOnRails
[17:20:51] siaW: has joined #RubyOnRails
[17:21:31] kristoph: I'm using a Postgres JSONB field and need to map all entries to an object. My solution thus far is to create a ItemCollection class and use composed_of to map the JSONB field to that collection, which will instantiate classes on the items. It works for reading, but unfortunately I can't get the data written back ot the field. #as_json on the collection instance yields the JSON, but #as_json on the main object isn't converting the
[17:21:31] kristoph: collection to JSON
[17:22:09] a1fa: looks like this is homebrew search method
[17:23:30] matthewd: kristoph: You probably want serialize
[17:24:16] kristoph: matthewd: serialize doesn't work on JSON fields in Postgres because it's a native JSON field -- unless you're refering to the encoder option
[17:25:03] kristoph: matthewd: This would be much easier to just create a HMT association than doing this method, but we expect a metric crap ton of records and this is a far more efficient method, but definitely a pain
[17:26:09] Cervajz: has joined #RubyOnRails
[17:27:23] arup_r: has joined #RubyOnRails
[17:27:54] ankhers: has joined #RubyOnRails
[17:28:59] [Butch]: has joined #RubyOnRails
[17:29:00] edwinvdgraaf: has joined #RubyOnRails
[17:29:55] matthewd: kristoph: !xy detector is pinging
[17:29:55] helpa: kristoph: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[17:29:59] chipotle: has joined #RubyOnRails
[17:30:12] dalpo: has joined #RubyOnRails
[17:30:13] maxdoubt: has joined #RubyOnRails
[17:30:39] matthewd: kristoph: It sounds like you have an original problem, and you've chosen an unusual solution to that problem, and are now seeking help to make said solution work
[17:30:46] ElFerna_: has joined #RubyOnRails
[17:30:53] mag42c: has joined #RubyOnRails
[17:31:26] kristoph: matthewd: A simpler way of putting it -- I'm trying to implement embedded collections within Postgres JSON fields that save back to a JSON field -- regardless of my original problem, this is what I'm trying to do.
[17:31:57] maxdoubt: is there a way i can get attributes (column names) from an arel query, prior to executing it?
[17:32:44] underplank: has joined #RubyOnRails
[17:32:47] arup_r: maxdoubt: Using .select() /
[17:33:32] sleungcy: has joined #RubyOnRails
[17:33:41] manfrin: has joined #RubyOnRails
[17:34:26] underplank: Hi all. Im using sinatra with active record. I want to add credentials to the db connection in code, rather than the database.yml .. I know I can do this by calling ActiveRecord::Base.establish_connection with the new connection, but Im hoping there is somewhere central that I can do this once?
[17:34:49] kdough: has joined #RubyOnRails
[17:37:55] DoctorMonocular: has joined #RubyOnRails
[17:38:27] alexhartley: has joined #RubyOnRails
[17:39:00] blackmesa: has joined #RubyOnRails
[17:39:58] goodcodeguy: has joined #RubyOnRails
[17:40:35] Frem: has joined #RubyOnRails
[17:41:41] Maletor: has joined #RubyOnRails
[17:43:10] mhoungbo: has joined #RubyOnRails
[17:44:31] yfeldblum: has joined #RubyOnRails
[17:47:46] fryguy: underplank: before you go too far in a potentially weird direction, i have to ask.. why?
[17:48:20] nzst: has joined #RubyOnRails
[17:49:17] funnel: has joined #RubyOnRails
[17:49:32] underplank: Because we are using a thing called credstash to get our username and password in process for security reasons, but our url / port / database can be kept in the database.yml file.
[17:49:50] underplank: So at somepoint I need to merge those two maps together and recreate the active record db connection.
[17:50:08] underplank: I was hoping to be able to do this in one place before it was initially created.
[17:50:16] maxdoubt: arup_r: will that work for Arel::SelectManager ? - i’m getting this NoMethodError: private method `select' called for #<Arel::SelectManager:0x007ff50fac24c8>
[17:50:33] underplank: It seems like when I do a ‘require ‘sinatra/activerecord’ it automatically creates the connection.
[17:50:34] borodin: has joined #RubyOnRails
[17:50:35] fryguy: underplank: typically you put your credentials into environment variables, and then reference those in database.yml
[17:55:02] B1n4r10: has joined #RubyOnRails
[17:55:06] humbledaisy: has joined #RubyOnRails
[17:55:17] Coldblackice_: has joined #RubyOnRails
[17:55:31] underplank: right. For us environment variables arent appropriate. Hence my question.
[17:55:33] rubyonrailed: has joined #RubyOnRails
[17:55:47] pawnbox: has joined #RubyOnRails
[17:55:54] nickjj: has joined #RubyOnRails
[17:55:59] weaksauce: has joined #RubyOnRails
[17:56:16] EduardoBautista: has left #RubyOnRails: ()
[17:56:50] VeryBewitching: has joined #RubyOnRails
[17:57:04] wldcordeiro: has joined #RubyOnRails
[17:57:15] sp1rs: has joined #RubyOnRails
[17:57:17] snarkfest: has joined #RubyOnRails
[17:57:53] akshat: has joined #RubyOnRails
[17:58:32] styx: has joined #RubyOnRails
[18:00:15] sp1rs: has joined #RubyOnRails
[18:01:10] arup_r: has joined #RubyOnRails
[18:01:24] arup_r: maxdoubt: not possible it seems..
[18:02:47] arup_r: Arel seems a tree, so it builds query tree for us as I asked it. It has no knowledge.. I think so, I can be 200% wrong
[18:04:09] arup_r: so if you write Arel::Table.new(:foo_bar_baz) , it don't complain. Because it don't check the existence when we are building it..
[18:05:55] fedorov5432: has joined #RubyOnRails
[18:06:31] HiddenSnake: has joined #RubyOnRails
[18:07:59] mikecmpbll: has joined #RubyOnRails
[18:08:15] bronson: has joined #RubyOnRails
[18:09:24] lubekpl: has joined #RubyOnRails
[18:10:03] chouhoulis: has joined #RubyOnRails
[18:10:08] fryguy: underplank: so whatever is appropriate, add that to database.yml
[18:10:43] chouhoulis: has joined #RubyOnRails
[18:11:27] kerunaru: has joined #RubyOnRails
[18:11:32] _djbkd: has joined #RubyOnRails
[18:11:56] goodcodeguy: has joined #RubyOnRails
[18:14:23] flashpoint9: has joined #RubyOnRails
[18:14:38] underplank: fryguy: sorry I didnt tag you in my response. For us environment variables arent appropriate. But I think I found another way to go about it using database initializers. thanks for your help
[18:15:42] armyriad: has joined #RubyOnRails
[18:15:48] wxdk: has joined #RubyOnRails
[18:18:15] intrigueD: has joined #RubyOnRails
[18:18:20] workmad3: underplank: you could also take advantage of the ability to use arbitrary ERb in database.yml
[18:19:19] trosborn: has joined #RubyOnRails
[18:19:39] chipotle: has joined #RubyOnRails
[18:20:40] morfin60: has joined #RubyOnRails
[18:21:06] rubyonrailed: has joined #RubyOnRails
[18:21:20] maxdoubt: arup_r: figured it out - arel::selectmanager.map {|k| (defined? k.alias) ? k.alias.to_s : k.name.to_s }
[18:21:27] maxdoubt: arup_r: love arel!!!
[18:21:56] arup_r: maxdoubt: yay! that far.. cool
[18:22:03] underplank: workmad3: yeah, We would prefer not to write the credentials to the file system at all.
[18:22:15] workmad3: underplank: you wouldn't need to
[18:22:41] workmad3: underplank: erb in database.yml is evaluated in-memory by the startup process of activerecord, not written out
[18:23:02] underplank: ahh ok. that could work better. Do you have a link?
[18:23:12] underplank: nvm i’ll just google :)
[18:23:15] workmad3: underplank: not sure what link you need
[18:23:16] Spami: has joined #RubyOnRails
[18:23:30] workmad3: underplank: you can dump arbitrary erb into database.yml...
[18:23:49] underplank: where does it evaluate the variables from?
[18:24:30] Deck`: has joined #RubyOnRails
[18:24:50] workmad3: underplank: fresh binding, run inside the rails process prior to database initialization... so you don't have any magic locals or ivars available, but you have access to the environment, shell commands, etc.
[18:25:18] underplank: ahh ok. that might be an option. thanks i’ll look into it.
[18:25:21] dopamean_: has joined #RubyOnRails
[18:25:35] workmad3: underplank: basically, assume you need to grab anything you need rather than some bits being handed to you :)
[18:25:44] C0r3: has joined #RubyOnRails
[18:25:44] C0r3: has joined #RubyOnRails
[18:26:25] workmad3: underplank: on the flip side, you could have a startup script for your rails app that constructs a DATABASE_URL for your process prior to starting the app ;)
[18:27:01] workmad3: pretty much the same thing would happen then... some form of script pulls together the appropriate details and stamps it out into a form that rails understands
[18:27:27] underplank: yeah, I’ve done that. just put it in the config.ru (actually using sinatra rather than rails, but activerecord) and then I just reset the active record connection.
[18:27:49] drale2k: anyone using on of the auth gems with Rails5? I tried 'Clearance' because it is light weight (i would prefer that) but it doesn't work with Rails5 yet
[18:28:19] Sigfrid: has joined #RubyOnRails
[18:28:20] drale2k: i really don't wanna use Devise if possible, it's a beast that i don't need
[18:28:23] HiddenSnake: has left #RubyOnRails: ()
[18:28:29] HiddenSnake: has joined #RubyOnRails
[18:28:31] workmad3: drale2k: did you check the master branch on github? or if there's a prerelease of the gem available that you have to opt-in?
[18:28:54] drale2k: workmad3: yes they had a rail5 branch which worked but they deleted it and now the master is not working
[18:29:01] drale2k: i have no idea why they deleted it
[18:29:11] workmad3: drale2k: ah, that sucks... could be because the approach wasn't going to keep working
[18:29:12] drale2k: i thought they merged it but apparently they didn't
[18:29:18] drale2k: ye probably
[18:29:38] workmad3: drale2k: well, unfortunately the only auth gem I've actually tried with rails 5 is devise... that worked fine :P
[18:29:48] workmad3: at least, using their master branch did :D
[18:29:54] drale2k: heh ye, i also keep ending up fighting devise
[18:30:10] alexishuard: same.... it's not really lightweight is it ?
[18:30:18] Megamos: has joined #RubyOnRails
[18:31:03] RegulationD: has joined #RubyOnRails
[18:31:22] arup_r: many gems are not yet Rails 5 compatible.. better to wait.
[18:31:42] baweaver: has joined #RubyOnRails
[18:31:48] arup_r: Their turbolinks rewrite fu**** my one project.. and I am immediately degraded...
[18:31:52] workmad3: no, not lightweight... I rarely find myself fighting with it though, it does pretty much the right things out-the-box IME, and I've found their docs on how to customise it are pretty good nowadays (there was a phase around the release of rails 3 where that was definitely not the case)
[18:32:33] replay: has joined #RubyOnRails
[18:32:40] bronson: has joined #RubyOnRails
[18:33:16] workmad3: but yeah... if you're using the rails 5 beta, as arup_r said, most things won't be aiming for compatibility in released versions yet... only use the beta for stuff where you're willing to fight with gems :)
[18:33:17] replay: has joined #RubyOnRails
[18:33:30] n00bDev: has joined #RubyOnRails
[18:33:47] zenergi: has joined #RubyOnRails
[18:34:18] bronson: personally, other than needing to use Kaminari and RSpec master, I had no gem issues. Easiest upgrade yet.
[18:34:55] bronson: although... I did take the opportunity to remove 4 barely-used gems. No doubt that helped.
[18:35:14] Maletor: has joined #RubyOnRails
[18:36:06] workmad3: bronson: heh :) the point is more to exercise caution than that everything will automatically break
[18:36:07] stannard: has joined #RubyOnRails
[18:36:33] bronson: yep, always go in expecting the worst.
[18:37:07] alexishuard: Upgrading rails was a piece of cake for us too... Updating ruby was something else.
[18:37:08] DEA7TH: has joined #RubyOnRails
[18:37:11] alexishuard: Glad it's part of the past now.
[18:37:12] arup_r: bronson: I wanted to use Devise invitable gem, and it is complete NO NO.. and that feature is postponded now. After the gem upgrade, I will resume the feature..
[18:37:59] bronson: ah, yep. my app has no auth. makes things quite a bit simpler!
[18:38:26] workmad3: hmm... rails5 dropped another beta yesterday, but can't find any announcements of what changed in the latest beta :/
[18:38:43] jenrzzz: has joined #RubyOnRails
[18:39:03] bronson: no doubt it'll show up today and be essentially "zillions of tiny fixes all over the place"
[18:39:10] workmad3: probably :)
[18:39:48] HiddenSnake: has joined #RubyOnRails
[18:39:57] _bogus_: has joined #RubyOnRails
[18:40:36] workmad3: still... probably only another month or 2 before they finally release (I'm anticipating they'll drop a release by mid-april or beginning of may)
[18:41:47] bronson: agreed. I already tripped over new breakage in beta32
[18:42:02] wxdk2: has joined #RubyOnRails
[18:42:18] bronson: sub('2', '') # forgot where I was
[18:42:33] codepete: has joined #RubyOnRails
[18:42:45] adaedra: delete('2')
[18:42:50] uglybandersnatch: has joined #RubyOnRails
[18:42:50] sandstrom: has joined #RubyOnRails
[18:43:36] edwinvdgraaf: has joined #RubyOnRails
[18:44:07] workmad3: _[/2/] = ''
[18:44:40] workmad3: although I'm fine (and tend to use) s// :)
[18:45:35] wxdk: has joined #RubyOnRails
[18:45:44] bronson: tr 'c', ''
[18:45:47] bronson: ok back to work
[18:46:37] cajone: has joined #RubyOnRails
[18:47:36] bronson: workmad3: that's actually kinda cool, haven't used that before
[18:49:43] bbrowning: has joined #RubyOnRails
[18:51:03] safety_cut: has joined #RubyOnRails
[18:52:18] jenrzzz: has joined #RubyOnRails
[18:53:24] matthewd: workmad3: Yeah, mostly lots of little things, I think
[18:53:32] matthewd: workmad3: Feel free to check the changelogs :)
[18:53:50] baweaver: has joined #RubyOnRails
[18:53:50] nettoweb: has joined #RubyOnRails
[18:54:33] nozpheratu: has joined #RubyOnRails
[18:55:06] nettoweb: hello guys, Im using CKEditor with rails an every page I put this line in js file (//= require ckeditor-jquery) my page take about 2 minute to load. Im struggling with this and still cant find out why is it happening
[18:55:30] kirillzh: has joined #RubyOnRails
[18:55:49] Technodrome: has joined #RubyOnRails
[18:57:23] ur5us: has joined #RubyOnRails
[18:57:42] RegulationD: has joined #RubyOnRails
[18:57:47] bronson: nettoweb: I'd guess you're in dev mode and loading a zillion tiny js files?
[18:58:02] bronson: look at the network tab in developer tools?
[18:58:09] nettoweb: bronson yep, but it happens in prod too
[18:58:36] bronson: huh, if it's getting uglified correctly then no idea.
[18:58:36] nettoweb: it take so long to just compile articles.js for example, that thing I cant see in network
[18:58:57] bronson: are you hosting it in assets or public?
[18:59:04] alexishuard: nettoweb: as bronson suggested, make sure your file is uglified correctly.
[18:59:33] alexishuard: I had the same result and then used some precompiliation pipeline for all our JS files here and it loads much much much faster.
[18:59:55] jsrn_: has joined #RubyOnRails
[19:00:33] C0r3: has joined #RubyOnRails
[19:00:33] C0r3: has joined #RubyOnRails
[19:04:26] jhn: has joined #RubyOnRails
[19:07:56] xardion_: has joined #RubyOnRails
[19:08:19] sharkman: has joined #RubyOnRails
[19:08:38] yfeldblum: has joined #RubyOnRails
[19:09:15] nachoman: has joined #RubyOnRails
[19:10:20] uglybandersnatch: has joined #RubyOnRails
[19:10:55] manfrin: has joined #RubyOnRails
[19:10:57] baweaver: has joined #RubyOnRails
[19:11:17] lemur: has joined #RubyOnRails
[19:13:14] strongcode: Rails automatically loads everything from config/secrets.yml into the ENV hash, correct?
[19:13:35] strongcode: so if I start with the correct env, all values should be accessible through <%= ENV['key'] %> ?
[19:13:58] MrDoctor: has joined #RubyOnRails
[19:17:12] kirillzh: has joined #RubyOnRails
[19:18:17] MrDoctor: has joined #RubyOnRails
[19:18:23] EXCHGR: has joined #RubyOnRails
[19:18:57] arBmind: has joined #RubyOnRails
[19:20:28] kirillzh: has joined #RubyOnRails
[19:20:32] nettoweb: alexishuard I use rails asset pipeline
[19:20:43] nettoweb: bronson it's hosted in app/assets folder
[19:21:00] nettoweb: but in case of CKEditor it's a gem https://github.com/tsechingho/ckeditor-rails
[19:24:08] maxdoubt: has joined #RubyOnRails
[19:24:52] C0r3: has joined #RubyOnRails
[19:25:46] Jasaka: has joined #RubyOnRails
[19:28:24] sp1rs: has joined #RubyOnRails
[19:31:46] snowy: has joined #RubyOnRails
[19:32:50] adac: has joined #RubyOnRails
[19:34:11] mjfox: has joined #RubyOnRails
[19:35:11] bronson: whuf, the railties tests take forever to run
[19:37:21] lacrymology: has joined #RubyOnRails
[19:38:10] mag42c_: has joined #RubyOnRails
[19:41:07] mhoungbo: has joined #RubyOnRails
[19:41:08] emachnic: has joined #RubyOnRails
[19:42:11] ashishsingh173: has joined #RubyOnRails
[19:42:18] safety_cut: has joined #RubyOnRails
[19:42:18] srinidhi: has joined #RubyOnRails
[19:44:24] maxdoubt: has joined #RubyOnRails
[19:46:25] meoblast001: has joined #RubyOnRails
[19:46:26] rattatmatt: has joined #RubyOnRails
[19:46:55] nettoweb: bronson do you know how to improve this? just include //= require ckeditor-jquery and the page take so long to load
[19:48:38] codesoda: has joined #RubyOnRails
[19:49:09] codesoda: has joined #RubyOnRails
[19:49:12] tubbo: ckeditor sucks
[19:49:33] tubbo: nettoweb: it's probably doing shitty DOM manipulation that causes render to block
[19:49:45] tubbo: nettoweb: what do you need out of CK?
[19:50:13] blackmesa: has joined #RubyOnRails
[19:50:31] yellow5: has joined #RubyOnRails
[19:50:41] hugoangelo: has joined #RubyOnRails
[19:51:08] lubekpl: has joined #RubyOnRails
[19:51:10] sp1rs: has joined #RubyOnRails
[19:52:30] sleungcy: has joined #RubyOnRails
[19:52:45] pipework: tubbo: Just the Loius part. funny guy.
[19:52:53] tubbo: pipework: boom boom
[19:53:26] chipotle: has joined #RubyOnRails
[19:53:35] nettoweb: tubbo do you know a better one?
[19:54:10] bronson: haha, now that's a heavy question. there are zillions.
[19:54:25] tubbo: nettoweb: we use wysiwyg.js right now, but we're looking to implement https://github.com/basecamp/trix in the future. but yeah there are a bunch of wysiwyg editors since the introduction of ckeditor
[19:54:42] bronson: trix, quill, and scribe look interesting
[19:54:57] bronson: I agree, I'll never use ck again. heavy heavy heavy memories
[19:55:05] Deck`: has joined #RubyOnRails
[19:56:06] nettoweb: Im still using because my webste is for publishers, so in CK I can create some custom plugins
[19:56:14] godzillaenlacasa: has joined #RubyOnRails
[19:56:24] nettoweb: but it's too heavy to load
[19:57:25] kies^: has joined #RubyOnRails
[19:57:26] jgpawletko: has joined #RubyOnRails
[20:00:15] bronson: I'm getting some intermittent failures in railties master: https://gist.github.com/bronson/ca4a847dfa4c60221af4
[20:00:19] bronson: anyone else seeing this?
[20:01:50] lapide_viridi: has joined #RubyOnRails
[20:03:12] manfrin_: has joined #RubyOnRails
[20:03:27] bePolite: has joined #RubyOnRails
[20:03:42] bePolite: has joined #RubyOnRails
[20:05:58] matthewd: bronson: Not familiar... but I normally leave railties for travis, tbh
[20:06:20] tubbo: nettoweb: you can create custom "plugins" (like buttons or whatever) in wysiwyg.js and i'm pretty sure Trix as well
[20:06:28] tubbo: we do that for a number of clients
[20:07:11] trosborn: has joined #RubyOnRails
[20:08:34] mag42c: has joined #RubyOnRails
[20:11:33] nettoweb: tubbo Im taking a look, but in my case the publisers really love a feture plugin to resize images with dragging and with the option to insert legend as well. The page took long time just in the first request, so Im thinking in hit automatically this page after deploy finishes. I dont know if it'll work
[20:11:47] mag42c_: has joined #RubyOnRails
[20:12:05] emachnic: has joined #RubyOnRails
[20:12:19] baweaver: has joined #RubyOnRails
[20:15:08] sandstrom: has joined #RubyOnRails
[20:16:43] quazimodo: has joined #RubyOnRails
[20:17:12] tubbo: nettoweb: it takes a long time in the first request because your browser caches JS/CSS assets for every subsequent request.
[20:17:20] akshat: has joined #RubyOnRails
[20:17:42] halcyonicstorm1: has joined #RubyOnRails
[20:17:46] halcyonicstorm1: has left #RubyOnRails: ()
[20:17:48] codesoda: has joined #RubyOnRails
[20:18:02] pawnbox: has joined #RubyOnRails
[20:18:24] nettoweb: tubbo right. it's not because it compile on the fly the js and css files?
[20:18:25] goku`: has joined #RubyOnRails
[20:18:43] prgmmr: has joined #RubyOnRails
[20:20:10] tubbo: nettoweb: if that is happening in production, you have configured your rails app incorrectly.
[20:20:24] tubbo: because in production, assets are precompiled and served statically.
[20:20:24] bePolite: has joined #RubyOnRails
[20:21:04] nettoweb: tubbo it's happening in production as well. I'll check it out
[20:21:25] nettoweb: might be because another problem
[20:21:27] rattatmatt: has joined #RubyOnRails
[20:21:37] tubbo: nettoweb: no what i mean is, if your files are being compiled on-the-fly...in production, by default, it won't do that. you have to specifically configure it to do so.
[20:21:55] tubbo: nettoweb: OR...you forgot to set RAILS_ENV=production before running rails server.
[20:22:05] tubbo: on the prod server of course
[20:23:09] DoubleMalt: has joined #RubyOnRails
[20:24:01] aegis3121: has joined #RubyOnRails
[20:24:43] nettoweb: Im analysing because this happens in index page of articles, and I've noticed that this specific tables takes soo long to lead after I deploy my app.
[20:25:14] banister: has joined #RubyOnRails
[20:25:47] mdw: has joined #RubyOnRails
[20:25:56] blackmesa: has joined #RubyOnRails
[20:26:49] baweaver: has joined #RubyOnRails
[20:28:00] FernandoBasso: has joined #RubyOnRails
[20:29:44] snowy: has joined #RubyOnRails
[20:30:19] wxdk2: has joined #RubyOnRails
[20:37:03] pwnd_nsfw`: has joined #RubyOnRails
[20:40:48] drbayer: has joined #RubyOnRails
[20:41:50] tinto: has joined #RubyOnRails
[20:41:56] DefV: has joined #RubyOnRails
[20:42:58] moeabdol1: has joined #RubyOnRails
[20:43:36] emachnic: has joined #RubyOnRails
[20:43:37] IceBear: has joined #RubyOnRails
[20:45:53] wxdk: has joined #RubyOnRails
[20:46:11] nettoweb: tubbo I realized that the page in Network tab appear as pending the whole time it stay loading, take a look please: http://snag.gy/JuMHJ.jpg and after 1m of wait things just appear quackly
[20:46:42] MrDoctor: has joined #RubyOnRails
[20:47:43] Jon30: hey guys, having a major problem here. I am running Apache/2.2.31, Passenger 4 and RVM. I am running 10+ RoR websites, and they constantly keep writing into each other's tmp/cache folder. So /home/app1/website/current/tmp/cache/7CD would end up belonging to user app1 but group app2, and then app1 crashes because it can't access the tmp/cache/7CD directory until I do chown -R app1:app1
[20:47:43] Jon30: 7CD. Any ideas? Apache config: https://gist.github.com/anonymous/9295cadfd204f7b3664c
[20:49:18] Deck`: has joined #RubyOnRails
[20:49:25] defsdoor: has joined #RubyOnRails
[20:49:32] [Butch]: has joined #RubyOnRails
[20:50:08] sandstrom: has joined #RubyOnRails
[20:50:33] NeoHamled: has joined #RubyOnRails
[20:53:12] arthurl: has joined #RubyOnRails
[20:53:45] codepete: has joined #RubyOnRails
[20:54:04] tubbo: nettoweb: yup, that's render-blocking javascript. https://developers.google.com/speed/docs/insights/BlockingJS
[20:54:29] nettoweb: tubbo thanks... I'll take a look at it
[20:54:40] tubbo: nettoweb: that "make JS asynchronous" part is a little far-fetched, not all browsers support <script async> yet, but you can use JS libs that *don't* block render..
[20:55:11] nettoweb: hm, Im using jquery with ckeditor
[20:56:01] nettoweb: tubbo I just realized that every deploy the ckeditor js file changes timestamp file name. even if I havnt change it
[20:56:02] workmad3: has joined #RubyOnRails
[20:57:40] tubbo: nettoweb: what version of rails are you running?
[20:57:50] tubbo: nettoweb: the file name shouldn't be timestamped, it should be fingerprinted with an md5 hash
[20:57:55] tubbo: in modern versions of rails
[20:58:06] nettoweb: tubbo sorry... that's it
[20:58:24] nettoweb: ike this: articles-9806b5519ae2672c0fc51c7a879b5030.js
[20:58:44] tubbo: nettoweb: so if those numbers are changing, then they are probably being regenerated every time. are you sure your `rails server` is running in RAILS_ENV=production?
[20:59:14] nettoweb: Im even using this gem: https://github.com/ndbroadbent/turbo-sprockets-rails3
[20:59:57] tubbo: nettoweb: well if those fingerprints are changing every time you are doing something wrong, like not running in prod or potentially having sprockets configured to recompile assets on demand
[21:00:38] timdotrb: has joined #RubyOnRails
[21:00:51] flashpoint9: has joined #RubyOnRails
[21:01:07] timdotrb: afternoon, all
[21:01:10] rattatmatt: has joined #RubyOnRails
[21:01:33] safety_cut: has joined #RubyOnRails
[21:01:54] nettoweb: tubbo Im just using that gem because I red years ago this issue: https://gist.github.com/xdite/3072362
[21:01:55] TheSuper: has joined #RubyOnRails
[21:02:15] arthurl: hi guys- i have two different web servers, one apache/passenger/rails which is connected to database on local network and one nginx/passenger/rails which is connected to the same database but over a vpn with ~40ms latency- however i am seeing much slower app performance on the nginx box- taking a look at our apps production.log I'm seeing ActiveRecord: load time is much great on the nginx box- does this simply mean rails is taking longer to talk
[21:02:15] arthurl: to the database ?
[21:02:21] arthurl: https://gist.githubusercontent.com/alyssenko/1fdc3d8e98fc28e346eb/raw/00cf85422a8a673e7e8dd83b158e0091cd50ca19/gistfile1.txt
[21:02:26] arthurl: ^ log output
[21:02:38] shawnacscott: has joined #RubyOnRails
[21:02:39] pawnbox: has joined #RubyOnRails
[21:02:55] blackmesa: has joined #RubyOnRails
[21:03:21] pipework: arthurl: Hm are you just using the TCP host and port for both cases to connect to the database?
[21:03:55] arthurl: pipework using hostnames which are resolved locally (/etc/hosts) in both cases
[21:04:19] shawnacscott: has left #RubyOnRails: ()
[21:05:42] _bogus_: has joined #RubyOnRails
[21:06:33] matthewd: arthurl: Can you try moving a DB dump closer to the host as a test? Seems the simplest way to prove/confirm it's the latency.
[21:07:20] timdotrb: I’m having an issue with posting a file to my API through curb. I’m not entirely positive as to how I should be posting the file to the server, but the error is saying it can’t read the file that I’m providing
[21:07:25] timdotrb: Code and error: https://gist.github.com/willc0de4food/e946806ea2b7bf65bc23
[21:09:59] DoctorMonocular: has joined #RubyOnRails
[21:10:55] DoubleMalt: has joined #RubyOnRails
[21:11:55] TheSuper: has left #RubyOnRails: ()
[21:13:00] hugoangelo: has joined #RubyOnRails
[21:13:58] someguy: has joined #RubyOnRails
[21:14:53] TheSuper: has joined #RubyOnRails
[21:15:05] mdw: has joined #RubyOnRails
[21:15:43] TheSuper: The most recent commit to master fixed a validation issue in after_create callbacks. This issue was breaking a very significant part of our tests.
[21:16:15] TheSuper: Is it a good idea to try and push for the release of a Beta4 that includes those changes?
[21:16:49] TheSuper: I know Beta branches are unstable, and we can just point our Gemfile at master for now, but it seems like it might be a good idea.
[21:18:53] matthewd: TheSuper: No, we're not going to cut a new release just because it fixed a problem for you
[21:19:40] TheSuper: matthewd: That's what I suspected
[21:19:44] pipework: TheSuper: Do the branch first and report your findings and suggest others check too.
[21:19:56] intrigueD: has joined #RubyOnRails
[21:20:03] pipework: It may warrant another beta release if it affects enough people, maybe.
[21:20:16] TheSuper: Well, it was major enough that somebody already fixed it for me
[21:20:27] hahuang65: has joined #RubyOnRails
[21:20:30] TheSuper: In https://github.com/rails/rails/commit/fcec068bf913d74146703a02388608aa54d4f3a8 I believe
[21:20:39] pipework: Yes, it's fixed but I was saying to see if anyone else is broken and it if would be a good thing to add to the beta.
[21:21:06] pipework: But if you can wait until they do release it, then miaow orries.
[21:21:28] TheSuper: Well, there's me, and presumably there's also the guy who wrote that commit
[21:22:02] TheSuper: Considering the fact that it broke any kind of association of records in after_save, it stands to reason that it probably broke some other people's code as well
[21:22:46] arthurl: matthewd unfortunately i can't - it's a large dataset
[21:24:27] fox_mulder_cp: has joined #RubyOnRails
[21:24:30] jenrzzz: has joined #RubyOnRails
[21:24:39] pipework: TheSuper: That's why you should investigate and come up with a way to expose if people have been affected if you can (called reproduction steps) and ask if it's significant enough a problem to warrant a beta release.
[21:24:42] matthewd: arthurl: Next best option would be to check how many queries are being run, and thus determine the minimum number of round trips that would be required
[21:25:23] TheSuper: Should I just make an issue for that? Because it's pretty easy to reproduce, I think
[21:25:25] matthewd: We're not going to make a new beta release for that fix... a new release will come soon enough, but it won't be tomorrow.
[21:25:45] pipework: TheSuper: The issue is already solved, you need to convince the release manager to cut a beta release bump for it.
[21:25:51] pipework: If you want to use an issue to ask for it, go nuts.
[21:25:54] matthewd: (Speaking as someone who was indeed affected by it -- jrafanie works with me)
[21:26:08] bePolite: has joined #RubyOnRails
[21:26:08] bePolite: has joined #RubyOnRails
[21:26:17] bronson: Putting gem 'rails', github: 'rails/rails' in your Gemfile is so easy, another beta doesn't seem like a big deal.
[21:26:21] pipework: matthewd: Did you amke core team?
[21:26:30] TheSuper: Bronson: I did that already
[21:26:35] TheSuper: I was more concerned with other users
[21:26:44] bronson: I don't think I've stayed on any beta more than a day or two... always run into breakage.
[21:26:51] pipework: Whale, it is a big deal because then you've got to be careful about what you pull and if yo uwant a release that's got some stuff you want but some stuff you need isn't, you've got to make some decisions.
[21:26:52] bronson: TheSuper: they'll be OK, they're beta users too.
[21:27:06] pipework: I don't generally stay on rails/rails for more than the lifetime of a branch tracking the issue.
[21:27:09] TheSuper: It is pretty close to the last release, so yeah, you guys are right
[21:28:07] matthewd: Super thankful for people who do try the betas btw.. don't want any "no release for you" to imply otherwise <3 <3
[21:28:19] centrx: has joined #RubyOnRails
[21:28:57] matthewd: pipework: Yes, I'm on core
[21:29:10] pipework: matthewd: Oh neat, congratulations!
[21:29:20] TheSuper: Nah, I get it
[21:29:56] pipework: TheSuper: worst case scenario, build your rails yourself from the checkouts and merged branches you want and run tests then build the gem and vendor it temporarily.
[21:30:06] pipework: I've done similarly for smaller dependencies.
[21:30:20] matthewd: Once we hit rc1, there'll be a 5-0-stable branch, which should feel less adventurous than master
[21:30:24] TheSuper: This is in an experimental branch on my end, so it's not really a huge deal
[21:30:58] TheSuper: I'll just stay on master for nwo and move to the stable branch once it exists
[21:31:03] maletor_: has joined #RubyOnRails
[21:31:18] Cohedrin: has joined #RubyOnRails
[21:32:29] pawnbox: has joined #RubyOnRails
[21:33:44] snowy: has joined #RubyOnRails
[21:36:28] goodcodeguy: has joined #RubyOnRails
[21:38:22] kirillzh: has joined #RubyOnRails
[21:39:33] chipotle: has joined #RubyOnRails
[21:40:12] alexhartley: has joined #RubyOnRails
[21:40:19] _bogus_: hey there.. i have a has_many relation in a model, and I need to dynamically add more forms for this model in the same form as the user needs (using bootstrap tabs)... can i have any resources/links about this?
[21:40:41] _bogus_: more fields* for this object
[21:41:44] Pazician: has joined #RubyOnRails
[21:42:27] TheSuper: _bogus_: we wound up using React for a use case similar to this, but that's because we had to do a bunch of child validation
[21:42:40] TheSuper: Otherwise, you can just use `fields_for` and then clone those fields in Jquery or something
[21:42:42] TheSuper: see http://apidock.com/rails/ActionView/Helpers/FormHelper/fields_for
[21:43:02] rickmasta: has joined #RubyOnRails
[21:43:04] drbayer: has joined #RubyOnRails
[21:44:50] djbkd_: has joined #RubyOnRails
[21:46:57] DonOtreply: has joined #RubyOnRails
[21:47:39] flashpoint9: has joined #RubyOnRails
[21:47:56] drale2k: hm any idea how i would get the Devise current_user into a ActionCable connection? "Current_user" is not available there because there is no session
[21:49:01] _bogus_: TheSuper, thats what i'm planning to do, but I'm not very sure about how to load the whole partial through jquery and build this object , or destroy it if it's removed
[21:49:21] sled: has joined #RubyOnRails
[21:49:51] NeoHamled: has joined #RubyOnRails
[21:51:02] emachnic: has joined #RubyOnRails
[21:51:07] uglybandersnatch: has joined #RubyOnRails
[21:52:17] safety_cut: has joined #RubyOnRails
[21:52:45] wxdk2: has joined #RubyOnRails
[21:52:53] pawnbox: has joined #RubyOnRails
[21:53:04] kdough: has joined #RubyOnRails
[21:53:06] dalpo: has joined #RubyOnRails
[21:53:35] arthurl: matthewd thanks for that advice- trying to get the query info now to debug
[21:54:24] uglybandersnatc-: has joined #RubyOnRails
[21:54:27] matthewd: arthurl: Is it doing writes, or only selects, btw?
[21:54:38] arthurl: matthewd selects only
[21:55:58] quazimodo: has joined #RubyOnRails
[21:56:34] arthurl: @matthewd so doing a quick comparison on a single query i see a query that returns 1411 rows take .08 sec to run on the apache box and .22 sec on the nginx box
[21:57:06] arthurl: so 3x as long to return 1400 rows with 40 ms , not sure if that makes sense
[21:57:07] trinaldi: has joined #RubyOnRails
[21:59:54] corioliss: has joined #RubyOnRails
[22:01:20] RahulT: has joined #RubyOnRails
[22:01:28] pixelhandler: has joined #RubyOnRails
[22:03:13] moeabdol2: has joined #RubyOnRails
[22:08:58] wethu: has joined #RubyOnRails
[22:11:11] bronson: anyone who has a copy of Rails master checked out, can you `cd railties; rake test`?
[22:11:29] ElFerna_: has joined #RubyOnRails
[22:11:38] bronson: I don't understand why I'm seeing these intermittent errors (1 error every 3 or 4 runs) but CI isn't.
[22:11:39] bronson: https://gist.github.com/bronson/ca4a847dfa4c60221af4
[22:14:35] AugustoCesar: has joined #RubyOnRails
[22:15:20] htmldrum: has joined #RubyOnRails
[22:15:21] AugustoCesar: has left #RubyOnRails: ()
[22:15:25] ggnait: has joined #RubyOnRails
[22:15:26] drbayer: has joined #RubyOnRails
[22:16:54] Technodrome: has joined #RubyOnRails
[22:17:15] Devalo: has joined #RubyOnRails
[22:17:55] Maletor: has joined #RubyOnRails
[22:19:21] arthurl: matthewd so i did a load time comparison on the front page of the app which is more or less static content (no crazy database queries) and the nginx+passenger+rails box was faster- so it seems the VPN with 40ms is really the culprit here somehow...
[22:19:25] owenmax: has joined #RubyOnRails
[22:19:48] owenmax: has left #RubyOnRails: ()
[22:21:20] siaW: has joined #RubyOnRails
[22:21:23] sleungcy: has joined #RubyOnRails
[22:21:48] matthewd: arthurl: Random idea: Try turning off prepared statements?
[22:22:12] enitiz: has joined #RubyOnRails
[22:22:43] theunraveler: has joined #RubyOnRails
[22:23:08] nachoman: has joined #RubyOnRails
[22:24:42] arthurl: matthewd thanks- reading up on prepared statements now- not sure if we use them
[22:25:12] arthurl: but this is making more and more sense if our app is doing a bunch of queries each one of those round trips incurs the 40ms latency hit , that adds up i guess
[22:25:33] arthurl: i need to put our app into production debug mode so i can see all the sql that's being run
[22:25:40] alexishuard: has joined #RubyOnRails
[22:26:06] diego2: has joined #RubyOnRails
[22:26:30] kpwarr: Hello! I'm debugging an issue in an old code base. I have an action that passes in a parameter to a different method to do some computation. the parameter is an object. The existing code in the computation method trys to key it's parameter object using symbols but, for some reason the parameter object is keyed with strings. this seems smelly, any idea what could be happening?
[22:27:52] manfrin: has joined #RubyOnRails
[22:28:05] superlou: has joined #RubyOnRails
[22:28:05] lacrymology: has joined #RubyOnRails
[22:28:26] diego2: has joined #RubyOnRails
[22:30:28] nickjj: has joined #RubyOnRails
[22:30:54] Dreamer3_: has joined #RubyOnRails
[22:32:39] Radar: kpwarr: !rule0
[22:32:39] helpa: kpwarr: 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.
[22:34:39] sled: has joined #RubyOnRails
[22:37:10] ElFerna_: has joined #RubyOnRails
[22:40:37] malcolmva: has joined #RubyOnRails
[22:43:02] chipotle: has joined #RubyOnRails
[22:44:11] maxdoubt: has joined #RubyOnRails
[22:44:56] rakm: has joined #RubyOnRails
[22:46:41] mdw: has joined #RubyOnRails
[22:49:19] manfrin_: has joined #RubyOnRails
[22:51:04] blackmesa: has joined #RubyOnRails
[22:51:21] kpwarr: Radar: helpa: oh ok, thx =]
[22:51:41] kpwarr: I figured it out tho..
[22:52:12] Radar: kpwarr: glad to hear that :)
[22:52:25] pawnbox: has joined #RubyOnRails
[22:52:42] nettoweb: has joined #RubyOnRails
[22:54:41] Guest28: has joined #RubyOnRails
[22:54:56] Guest28: has left #RubyOnRails: ()
[22:55:12] fnn: has joined #RubyOnRails
[22:56:48] fnn: do I need to use to_h on whitelisted, here? http://pastie.org/private/icow94hsjonecu4aomrolw
[22:57:17] uglybandersnatch: has joined #RubyOnRails
[22:58:21] jgpawletko: has joined #RubyOnRails
[22:58:28] flashpoint9: has joined #RubyOnRails
[23:00:20] fnn: (line 3)
[23:02:14] jenrzzz_: has joined #RubyOnRails
[23:02:51] bronson: probably. the params object has a few helpers (not sort anymore apparently)
[23:03:02] bronson: if it isn't giving you what you want, to_h it.
[23:03:05] safety_cut: has joined #RubyOnRails
[23:03:21] fnn: well, it works without to_h, but from what I've read it seems like I should be using it
[23:03:30] matthewd: fnn: I think it depends on your Rails version, with newer versions tending towards yes
[23:03:59] matthewd: I believe that (without to_h) would be an error on 5.0, at least
[23:04:14] fnn: matthewd: ah okay, thanks! I'll keep it in then
[23:06:10] baweaver: has joined #RubyOnRails
[23:09:44] mostlybadfly: has joined #RubyOnRails
[23:10:02] quazimodo: has joined #RubyOnRails
[23:11:40] wxdk: has joined #RubyOnRails
[23:14:20] arthurl: matthewd so our issue is active record n+1
[23:14:38] uglybandersnatch: has joined #RubyOnRails
[23:14:46] arthurl: basically this section of the app is written poorly and it's doing a TON of queries against the db and each one of those is picking up that 40ms latency
[23:14:52] workmad3: has joined #RubyOnRails
[23:14:57] matthewd: arthurl: Ah, that sounds solvable, then
[23:16:01] arthurl: would require a code re-write and i'm not a dev :)
[23:17:09] y2mq37: has joined #RubyOnRails
[23:17:54] matthewd: In theory fixing n+1s is "just" a matter of calling .includes() in the right places.. if it's currently Quite Bad, you should be able to get at least a few substantial wins without needing any special effort/rearrangement
[23:18:49] Devalo: has joined #RubyOnRails
[23:20:25] underplank: has joined #RubyOnRails
[23:20:44] arthurl: i've been reading up on it- makes me want to dig into our code base but i'm sure that wouldn't be a productive use of my time
[23:21:18] arthurl: as that's currently outside of my technical ruby code writing ability based on what i see in the rb controller in question
[23:24:59] blackmesa: has joined #RubyOnRails
[23:27:26] intrigueD: has joined #RubyOnRails
[23:29:21] jottr: has joined #RubyOnRails
[23:32:18] fnn: hehe this is so bad re hash syntax searching "conditions[:rent] = -Float::INFINITY..(params[:rent].to_i)"
[23:32:27] pawnbox: has joined #RubyOnRails
[23:33:33] ppinkert_: has joined #RubyOnRails
[23:34:33] ur5us: has joined #RubyOnRails
[23:35:18] drale2k: Falcon 9 launch live - T - 12 mins https://www.youtube.com/watch?v=Ml1RO4IcOG0
[23:35:31] trosborn: has joined #RubyOnRails
[23:35:57] ppinkert_: has joined #RubyOnRails
[23:37:13] mary5030: has joined #RubyOnRails
[23:37:13] _djbkd: has joined #RubyOnRails
[23:37:18] johnflux_: has joined #RubyOnRails
[23:37:18] johnflux_: has joined #RubyOnRails
[23:37:51] ankhers: has joined #RubyOnRails
[23:41:40] codesoda: has joined #RubyOnRails
[23:42:07] bePolite: has joined #RubyOnRails
[23:42:22] bronson: has joined #RubyOnRails
[23:42:47] Pazician: has joined #RubyOnRails
[23:42:51] _Tariq: has joined #RubyOnRails
[23:45:09] IFrank00: has joined #RubyOnRails
[23:45:45] baweaver: has joined #RubyOnRails
[23:45:51] fnn: aborted
[23:46:20] blackmes1: has joined #RubyOnRails
[23:46:41] ElFerna_: has joined #RubyOnRails
[23:46:54] chipotle: has joined #RubyOnRails
[23:50:01] fnn: doesn't seem like a big failure, though
[23:50:03] bricker: has joined #RubyOnRails
[23:54:57] godzillaenlacasa: has joined #RubyOnRails
[23:57:11] Radar: at least it's in one big piece this time
[23:57:34] fnn: densified lox issues v0v
[23:57:55] maxdoubt: has joined #RubyOnRails
[23:59:29] jenrzzz: has joined #RubyOnRails