« Back to channel list

#RubyOnRails - 23 January 2018

« Back 1 day Forward 1 day »
[00:00:03] ivanskie: hahuang61 the job was executing fine, but now panic'ed saying can't find record with id. dont understand why lol
[00:01:34] mices: are any of the contributors of publify in here
[00:01:38] hahuang61: ivanskie: can you explain to me again what your goal was?
[00:02:01] Fridtjof: has joined #RubyOnRails
[00:02:18] ivanskie: to update the database essentially.
[00:02:59] hahuang61: ivanskie: I was a little confused by your previous description of what you wanted to do. Can you walk me thru it?
[00:03:14] ivanskie: i have an api that i call to get list of devices. i import these into my Devices model. in seeds.rb file.
[00:04:57] ivanskie: now i'd like to be able to run a script which will call the api and get the list, but this time with validation. but instead of skipping if already exists. update. so instead of running the Active Record Import (gem) method with validation. I check on each device from api request, and if exists in my model, i update it.
[00:05:11] ivanskie: otherwise proceed as before (create new)
[00:05:30] ivanskie: so in the gist i've updated.. i've created an activejob
[00:07:11] hahuang61: so what's the issue now?
[00:08:15] hahuang61: ivanskie: IMO your gist looks more complicated than necessary, but you know your models better than I do.
[00:08:53] ivanskie: you are probably right, tho I'm not sure how to improve it
[00:08:56] ivanskie: performing UpdateDevicesJob (Job ID: bf79ab54-2bb4-48a5-80fe-ecf39fe99769) from Async(default) in 68514.03ms: ActiveRecord::RecordNotFound
[00:09:48] ivanskie: how would it get through the 'if Device.find(id)' if it doesn't exist lol
[00:09:54] hahuang61: ivanskie: you're getting that error because `Model.find` throws ActiveRecord::RecordNotFound exception if the ID doesn't exist. You want to use `Model.find_by(id: id)`
[00:10:15] hahuang61: but you're actually describing a technique called "upsert", lemme see if I can whip up something for you
[00:10:25] ivanskie: cool thanks
[00:11:20] ivanskie: https://github.com/jesjos/active_record_upsert ?
[00:11:51] hahuang61: ivanskie: yeah feel free to use that. that makes it really easy, although I'm not sure how async-proof that is
[00:11:56] ivanskie: though i'm stuck with using mysql. wonder if its compatible
[00:12:11] hahuang61: ivanskie: no, that's a postgres only
[00:12:21] roshanavand: has joined #RubyOnRails
[00:12:57] hahuang61: ivanskie: I made a comment on your gist. it's pretty simplistic, but it might get you there
[00:13:36] mtkd: has joined #RubyOnRails
[00:14:07] ivanskie: you've basically asked the quesiton i asked at first. because I saw the find_or_initialize.. just didn't know how to use it in my case.
[00:14:20] bronson: has joined #RubyOnRails
[00:14:25] hahuang61: hope it helps
[00:14:43] ivanskie: next quesiton.. this bypasses the .import thing
[00:15:08] hahuang61: what's the question?
[00:15:39] ivanskie: nah nevermind.
[00:16:14] hahuang61: if you want to keep the logic where you don't validate, then you're better off using your original code
[00:16:22] hahuang61: just use `find_by` instead of `find`
[00:16:29] apeiros: has joined #RubyOnRails
[00:17:06] hahuang61: although honestly, depending on the external API and the amount of data, you might want to just write it SQL and do a single transaction instead of split it by device.
[00:17:13] hahuang61: but that's your decision
[00:18:20] ivanskie: looks like i have to use 'find_or_initialize_by_id'
[00:18:29] ivanskie: Error performing UpdateDevicesJob (Job ID: 49bafd8e-9c95-4c8c-87a4-b5b7f51a97d9) from Async(default) in 4630.21ms: NoMethodError (undefined method `find_or_initialize' for #<Class:0x00007fb7447601f8>
[00:18:29] ivanskie: Did you mean? find_or_initialize_by
[00:18:30] ivanskie: first_or_initialize):
[00:19:34] ivanskie: i mean: Device.find_or_initialize_by(:id => dev_id)
[00:19:42] ivanskie: yep this works
[00:20:31] ivanskie: thanks hahuang61
[00:21:20] ivanskie: i wonder if i can throw this into Device.transaction block
[00:21:30] ivanskie: or if it would even help at all
[00:21:57] hahuang61: whatever you put in the block would be a transaction
[00:22:06] hahuang61: so if anything fails, the whole thing is backed out
[00:22:25] hahuang61: but honestly, since you're doing this upsert method, it's pretty idempotent, so it doesn't matter if you run it multiple times
[00:23:00] hahuang61: i mean there are nuances that might change how you feel about it but this guarantees eventual consistency
[00:23:59] tcopeland: has joined #RubyOnRails
[00:26:02] Daemen: has joined #RubyOnRails
[00:30:24] ivanskie: meh it works fine
[00:34:18] apeiros__: has joined #RubyOnRails
[00:39:34] workmad3: has joined #RubyOnRails
[00:42:30] ivanskie: that job takes like 2 minutes to complete on my local.
[00:42:46] ivanskie: took 2 seconds to finish on my sandbox lol
[00:43:34] ivanskie: yeah not gonna bother with .transaction or .import
[00:43:40] ivanskie: its just ~300 records
[00:46:02] alfiemax: has joined #RubyOnRails
[00:49:36] alfiemax_: has joined #RubyOnRails
[01:15:05] bronson: has joined #RubyOnRails
[01:17:19] crankharder: has joined #RubyOnRails
[01:24:09] Fenhl: has joined #RubyOnRails
[01:26:59] jottr: has joined #RubyOnRails
[01:30:46] jottr_: has joined #RubyOnRails
[01:35:41] roshanavand: has left #RubyOnRails: ()
[01:43:42] alfiemax: has joined #RubyOnRails
[01:49:15] roshanavand: has joined #RubyOnRails
[02:08:56] camfowler: has joined #RubyOnRails
[02:18:10] mtkd: has joined #RubyOnRails
[02:25:11] xuyuheng: has joined #RubyOnRails
[02:39:03] camfowler: has joined #RubyOnRails
[02:40:24] workmad3: has joined #RubyOnRails
[02:41:34] orbyt_: has joined #RubyOnRails
[02:43:40] alfiemax: has joined #RubyOnRails
[03:01:03] quazimodo: has joined #RubyOnRails
[03:12:56] darkhanb: has joined #RubyOnRails
[03:14:23] cagomez: has joined #RubyOnRails
[03:16:26] bronson: has joined #RubyOnRails
[03:16:30] JusticeFries: has joined #RubyOnRails
[03:45:39] ur5us: has joined #RubyOnRails
[03:49:41] srinidhi: has joined #RubyOnRails
[03:53:42] LenPayne: has joined #RubyOnRails
[04:12:11] JusticeFries: has joined #RubyOnRails
[04:23:41] bga57: has joined #RubyOnRails
[04:27:43] bga57: has joined #RubyOnRails
[04:38:52] armyriad: has joined #RubyOnRails
[04:41:17] workmad3: has joined #RubyOnRails
[04:43:08] hutch8878: has joined #RubyOnRails
[04:46:41] xuyuheng: has joined #RubyOnRails
[04:50:45] hutch8878: Hi all, I am having the dreaded OpenSSL Veriify Failed Error
[04:51:08] hutch8878: I have tried the solution that most of the google articles seem to point to, downloading a ca bundle and telling my system about it, but i have had no luck
[04:51:16] hutch8878: Here is a gist to explain in a bit more detail:
[04:51:16] hutch8878: https://gist.github.com/hutch78/f9567906019163e66071f17f6227bade
[05:17:18] bronson: has joined #RubyOnRails
[05:32:16] xuyuheng: has joined #RubyOnRails
[05:37:13] xuyuheng: has joined #RubyOnRails
[05:37:25] sidx64: has joined #RubyOnRails
[05:40:30] sidx64: has joined #RubyOnRails
[05:41:52] crankharder: has joined #RubyOnRails
[05:46:23] ur5us: has joined #RubyOnRails
[05:50:27] alfiemax: has joined #RubyOnRails
[05:56:50] aguestuser: has joined #RubyOnRails
[06:16:50] srinidhi: has joined #RubyOnRails
[06:19:42] Dimik: has joined #RubyOnRails
[06:21:33] alfiemax: has joined #RubyOnRails
[06:24:08] crankharder: has joined #RubyOnRails
[06:28:18] noocx: has joined #RubyOnRails
[06:28:39] noocx: can you tell me what a strategy file is under models?
[06:29:00] quazimodo: has joined #RubyOnRails
[06:29:46] noocx: or if I've got something like this: class CustomValue::FormatStrategy, how should I know what is it?
[06:33:37] sidx64: has joined #RubyOnRails
[06:33:51] noocx: https://pasteboard.co/H4dpWTT.png
[06:41:33] darkhanb: has joined #RubyOnRails
[06:43:56] quazimodo: has joined #RubyOnRails
[06:53:44] nso95: has joined #RubyOnRails
[06:54:20] nso95: has joined #RubyOnRails
[06:54:37] sidx64: has joined #RubyOnRails
[07:01:41] trautwein: has joined #RubyOnRails
[07:02:03] crankharder: has joined #RubyOnRails
[07:03:34] sidx64: has joined #RubyOnRails
[07:05:17] KeyJoo: has joined #RubyOnRails
[07:06:34] darkhanb: has joined #RubyOnRails
[07:07:14] dionysus69: has joined #RubyOnRails
[07:07:27] sidx64: has joined #RubyOnRails
[07:12:10] conta: has joined #RubyOnRails
[07:12:24] sidx64_: has joined #RubyOnRails
[07:15:17] sidx64: has joined #RubyOnRails
[07:18:15] bronson: has joined #RubyOnRails
[07:18:43] AzaToth: has joined #RubyOnRails
[07:20:12] audy: has joined #RubyOnRails
[07:21:04] dionysus69: has joined #RubyOnRails
[07:22:10] dionysus69: has joined #RubyOnRails
[07:23:28] srinidhi: has joined #RubyOnRails
[07:31:49] kies: has joined #RubyOnRails
[07:48:02] za1b1tsu: has joined #RubyOnRails
[07:50:50] keyjoo_: has joined #RubyOnRails
[08:01:44] FooBarWidget: has joined #RubyOnRails
[08:10:55] KeyJoo: has joined #RubyOnRails
[08:18:00] dionysus69: has joined #RubyOnRails
[08:18:08] defsdoor: has joined #RubyOnRails
[08:21:59] crankharder: has joined #RubyOnRails
[08:24:21] conta: has joined #RubyOnRails
[08:24:32] Axsuul: has joined #RubyOnRails
[08:32:04] apeiros: has joined #RubyOnRails
[08:41:40] TvL2386: hey guys, whenever I create a scaffold in Rails the index (table) and edit (form-groups) views look great, but the show page always sucks
[08:42:09] TvL2386: frontend design is not really my expertise...
[08:42:54] workmad3: has joined #RubyOnRails
[08:42:54] TvL2386: What I would actually like, is for the "show" page to be the same as the edit page with regards to styling. Of course I don't need any <input> elements
[08:43:10] TvL2386: can anybody give me some tips?
[08:46:33] alfiemax: has joined #RubyOnRails
[08:51:59] TvL2386: using bootstrap here... form-groups are used for structuring data, but how would you have a similar view without form stuff
[08:53:35] morfin60: has joined #RubyOnRails
[08:58:48] mtkd: has joined #RubyOnRails
[09:04:56] thejamespinto: has joined #RubyOnRails
[09:07:41] za1b1tsu: has joined #RubyOnRails
[09:10:58] crankharder: has joined #RubyOnRails
[09:11:55] sidx64: has joined #RubyOnRails
[09:18:15] apeiros: has joined #RubyOnRails
[09:19:13] conta: has joined #RubyOnRails
[09:19:46] bronson: has joined #RubyOnRails
[09:20:43] helpa: has joined #RubyOnRails
[09:25:18] srinidhi: has joined #RubyOnRails
[09:49:23] solars: has joined #RubyOnRails
[09:50:23] arBmind: has joined #RubyOnRails
[09:50:57] solars: quick question: (rails 4 but maybe someone can help): I had to change from Cookie to AR Session store due to SSO. I noticed that the app generates "empty" (non logged in users) sessions everytime a livecheck hits a certain URL. Is this the case generally, and how do people handle it?
[09:55:28] tcopeland1: has joined #RubyOnRails
[09:57:50] crst: has joined #RubyOnRails
[10:00:26] Torrone: has joined #RubyOnRails
[10:02:26] Torrone: Hello, this spec is working https://gist.github.com/Torrone5000/7a90a905aa43d2cc9728ef54a86c22d6 . However, I'm struggling to find a way to make it DRY, I obviously don't want to repeat the user's declaration but if I call "it_behaves_like 'check delivery', :create, { :user => user }, user['email']" the variables don't get to the shred example. How do I crack this? Thanks a bunch
[10:12:32] DrYockel: has joined #RubyOnRails
[10:13:08] crankharder: has joined #RubyOnRails
[10:18:56] Cavallari: has joined #RubyOnRails
[10:19:56] marr: has joined #RubyOnRails
[10:32:40] Ergo: has joined #RubyOnRails
[10:35:16] xuyuheng: has joined #RubyOnRails
[10:43:45] workmad3: has joined #RubyOnRails
[10:45:33] arBmind: has joined #RubyOnRails
[10:48:18] srinidhi: has joined #RubyOnRails
[10:49:06] sidx64: has joined #RubyOnRails
[10:50:40] ur5us: has joined #RubyOnRails
[11:01:36] srinidhi: has joined #RubyOnRails
[11:03:58] mtkd: has joined #RubyOnRails
[11:04:36] roshanavand: has joined #RubyOnRails
[11:08:26] roshanavand: has joined #RubyOnRails
[11:13:38] crankharder: has joined #RubyOnRails
[11:17:02] arBmind: has left #RubyOnRails: ()
[11:19:41] lostapathy: has joined #RubyOnRails
[11:20:49] bronson: has joined #RubyOnRails
[11:40:09] srinidhi: has joined #RubyOnRails
[11:50:13] vyacheslav_: has joined #RubyOnRails
[11:50:14] srinidhi: has joined #RubyOnRails
[11:50:47] vyacheslav_: i need a little bit help with architecture of my project
[11:51:37] vyacheslav_: i think i wrong using STI pattern and modules in models and controllers
[11:51:55] vyacheslav_: can anybody tell me about this?
[12:01:38] vyacheslav_: so, i have a project which contains entity «Platform». There is 3 types of platform. Each of them have common fields, but in general each of them have different special fields and associations. In addition each of them have association with a model «Location» which also have 3 types for each of platform types.
[12:07:42] vyacheslav_: i did created model Platform with 3 subclasses and model Location with 3 subclasses and linked all of them. All platforms are contained in single table and all locations are contained in another single table. i don't like this because this tables have too much different fields which needed by some model and unnecessary for all other models.
[12:09:22] vyacheslav_: but, for example platforms: all of platform types remain platforms. i have page /platforms where i need show all platforms and i can't create unrelated models for platform types.
[12:10:59] vyacheslav_: is it right way?
[12:17:25] crankharder: has joined #RubyOnRails
[12:19:00] JusticeFries: has joined #RubyOnRails
[12:20:22] one_zero: has joined #RubyOnRails
[12:20:22] JusticeFries: has joined #RubyOnRails
[12:21:02] boshhead: has joined #RubyOnRails
[12:21:52] jottr_: has joined #RubyOnRails
[12:22:41] mtkd: has joined #RubyOnRails
[12:25:55] Psy-Q: has joined #RubyOnRails
[12:27:24] LateralOctober: has joined #RubyOnRails
[12:29:24] Avon: has joined #RubyOnRails
[12:32:02] vyacheslav_: has joined #RubyOnRails
[12:32:25] quazimodo: has joined #RubyOnRails
[12:32:43] segy: has joined #RubyOnRails
[12:48:45] apparition: has joined #RubyOnRails
[12:51:25] ur5us: has joined #RubyOnRails
[12:55:51] aiguuu: has joined #RubyOnRails
[12:58:39] sidx64: has joined #RubyOnRails
[12:59:17] crankharder: has joined #RubyOnRails
[13:16:27] IanMalcolm: has joined #RubyOnRails
[13:21:46] bronson: has joined #RubyOnRails
[13:21:55] sidx64: has joined #RubyOnRails
[13:30:40] jordansz: has joined #RubyOnRails
[13:32:40] jordansz: hello everyone i have very not dry code and wondered if any expert could give me some advice on how to best resolve it
[13:32:58] jordansz: basically its this code block https://gist.github.com/anonymous/515e76cdfa92ac53d848e939a228ecd3 the problem is i have a hash, and want to check if any of the values has .empty? value
[13:33:21] jordansz: so currently i have to replicate the code block first assign all the row values to the user_hash then validate them with .empty? is there a way to combine them?
[13:34:21] jordansz: or i could do it like user_hash['initials'] = row[0].to_s.strip; valid = false if user_hash['initials'].empty?
[13:34:46] Voxxit: has joined #RubyOnRails
[13:42:51] JusticeFries: has joined #RubyOnRails
[13:44:32] _aiguuu_: has joined #RubyOnRails
[13:50:50] sandstrom: has joined #RubyOnRails
[13:50:55] marr: has joined #RubyOnRails
[13:52:54] thejamespinto: has joined #RubyOnRails
[14:01:51] hive-mind: has joined #RubyOnRails
[14:02:50] IanMalcolm: has joined #RubyOnRails
[14:04:35] DrYockel: has joined #RubyOnRails
[14:29:07] trautwein: has joined #RubyOnRails
[14:34:58] sidx64: has joined #RubyOnRails
[14:45:26] workmad3: has joined #RubyOnRails
[14:48:27] xuyuheng: has joined #RubyOnRails
[14:51:54] ur5us: has joined #RubyOnRails
[15:00:17] tcopeland: has joined #RubyOnRails
[15:08:04] thejamespinto: has joined #RubyOnRails
[15:08:42] cagomez: has joined #RubyOnRails
[15:08:43] drale2k_: has joined #RubyOnRails
[15:10:01] drale2k_: How comes that if i have strong params, let's say "params.require(:agent).permit(:name, :age) " that when sending JSON to CREATE a new agent, i don't have to have the params inside a "agent" key? I can just send {"name": .. , "age":} instead of {"agent": {"name":.., "age":} } ?
[15:10:59] drale2k_: or is the key optional and it will look anyway for the permitted fields
[15:14:04] fryguy: drale2k_: that's not right, show a test case
[15:18:14] drale2k_: fryguy: https://gist.github.com/drale2k/1ca9e8bac50b914553df7e8ed0d187d3
[15:18:50] drale2k_: this has been reported by one of our App devs, who says he can just send it without the key
[15:19:02] drale2k_: using this code, it should not be possible
[15:19:04] kapil___: has joined #RubyOnRails
[15:20:04] fryguy: where's the test case
[15:22:20] moei: has joined #RubyOnRails
[15:22:55] bronson: has joined #RubyOnRails
[15:24:51] _ritchie_: has joined #RubyOnRails
[15:27:49] mtkd: has joined #RubyOnRails
[15:39:58] xuyuheng: has joined #RubyOnRails
[15:40:42] dviola: has joined #RubyOnRails
[15:45:36] tf2ftw: has joined #RubyOnRails
[15:45:44] tf2ftw: Anyone alive?
[15:46:31] tf2ftw: I'm using form_with and then submitting the form on blur of an input field. The problem is the page is reloading and not processing via ajax. Where should I start to look?
[15:58:25] drale2k_: fryguy: https://gist.github.dsirf.eu/dm/d4ac0c0808d8ab27579a4edb19d5dd3b
[15:58:29] drale2k_: oh shit mom
[15:58:53] drale2k_: https://gist.github.com/drale2k/f35d3367916991cd8650f13bc31ed197
[16:00:41] fryguy: drale2k_: dunno what to tell you, maybe you don't actually have strong parameters turned on
[16:01:20] Afro: has joined #RubyOnRails
[16:01:52] drale2k_: fryguy: i have them on 100%, this is the actual code on the backend https://gist.github.com/drale2k/1ca9e8bac50b914553df7e8ed0d187d3
[16:02:55] fryguy: there's more to the configuration than just using .require and .permit
[16:03:03] fryguy: depending on what version of rails you are running, etc.
[16:05:07] cagomez: has joined #RubyOnRails
[16:09:30] drale2k_: fryguy: i just tested by removing a param from the permitted list and it respected it, it did not write that fields to the db
[16:09:38] drale2k_: this is very strange
[16:10:43] drale2k_: i uses Strong Parameters (since it filters out non-permitted fields) but for some reason i don't have to wrap it in the key
[16:14:17] cagomez: has joined #RubyOnRails
[16:30:38] troys: has joined #RubyOnRails
[16:34:34] jottr_: has joined #RubyOnRails
[16:43:33] uksio: has joined #RubyOnRails
[16:44:25] mtkd: has joined #RubyOnRails
[16:45:35] dionysus69: has joined #RubyOnRails
[16:46:18] workmad3: has joined #RubyOnRails
[16:46:54] cagomez: has joined #RubyOnRails
[16:51:15] [Butch]: has joined #RubyOnRails
[16:52:35] ur5us: has joined #RubyOnRails
[17:01:52] [Butch]: has joined #RubyOnRails
[17:08:16] orbyt_: has joined #RubyOnRails
[17:10:19] cagomez: has joined #RubyOnRails
[17:12:58] npgm: has joined #RubyOnRails
[17:16:52] reber: has joined #RubyOnRails
[17:23:56] bronson: has joined #RubyOnRails
[17:32:42] nickjj_: has joined #RubyOnRails
[17:32:42] darkhanb: has joined #RubyOnRails
[17:36:56] alfiemax: has joined #RubyOnRails
[17:37:16] bga57: has joined #RubyOnRails
[17:37:40] choke: has joined #RubyOnRails
[17:38:29] drale2k_: fryguy: i found what's causing Strong Params to break. If i send the "Accept: application/json" header, it does not work. If i don't send it and only send the "Content-Type: application/json" header, it works (will let it through without the key)
[17:38:45] drale2k_: am i doing something wrong in my code or shouldi open an issue on Rails github ?
[17:39:27] xuyuheng: has joined #RubyOnRails
[17:39:40] nickjj__: has joined #RubyOnRails
[17:42:02] za1b1tsu: How to validate that nil is now allowed for attribute?
[17:42:23] drale2k_: ok guys i found what's going on. Rails automatically wraps the params in the root element http://edgeguides.rubyonrails.org/action_controller_overview.html#json-parameters
[17:42:25] nickjj: has joined #RubyOnRails
[17:42:26] drale2k_: i didn't know this
[17:44:04] choke: With devise, anyone know how to extend or overwrite DatabaseAuthenticatable ( https://github.com/plataformatec/devise/blob/master/lib/devise/models/database_authenticatable.rb ) to change the key for the password ( requirement for legacy app )
[17:47:36] alfiemax: has joined #RubyOnRails
[17:47:59] nickjj_: has joined #RubyOnRails
[17:59:05] za1b1tsu: this does not work validates :max, exclusion: { in: [nil] }
[17:59:31] xuyuheng: has joined #RubyOnRails
[17:59:35] za1b1tsu: nothing works, there is no way I can do this with standard validates?
[18:01:01] orbyt_: has joined #RubyOnRails
[18:08:57] kies: has joined #RubyOnRails
[18:12:32] GodFather: has joined #RubyOnRails
[18:14:44] dflomo: has joined #RubyOnRails
[18:15:08] dflomo: Yikes, it took me wayyy to long to figure out how to log onto this IRC!
[18:15:32] dflomo: So I recently picked up a RoR guide, and have been chugging away at it. Is this the place to ask questions?
[18:19:41] xuyuheng: has joined #RubyOnRails
[18:20:50] dflomo: Does anyone have any recommendation for testing suites for ruby web applications
[18:21:14] dflomo: I was checking out RSpec, as per a recommendation
[18:22:56] choke: dflomo that's what I use for all of my rails apps... It does a great job from unit testing, functional testing - plus being able to test my routing, and my views is a great thing... also does awesome for JSON api endpoint testing
[18:23:30] dflomo: O, ok awesome! That is helpful!
[18:23:54] dflomo: my biggest pet peave is investing a bunch of time in some irrelevant piece of code, or outdate framework!
[18:24:00] dflomo: Just to learn about a better one!
[18:25:59] choke: Yeah, I've never had a problem with rspec. And little tip: Be sure to use FactoryBot for your factories ( used to be FactoryGirl )... and IF you're doing a JSON Api I use https://github.com/ruby-json-schema/json-schema to define my valid result structure
[18:26:58] dflomo: Yes! That is perfect! I'll definitely check it out!
[18:37:49] hfp_work: has joined #RubyOnRails
[18:45:40] desperek: has joined #RubyOnRails
[18:47:08] workmad3: has joined #RubyOnRails
[18:49:47] mtkd: has joined #RubyOnRails
[18:50:50] dflomo: Another question: For the ruby error codes, is it just a matter of getting uses to/memorizing the more common errors? Or is there a way to get more concise error details?
[18:55:00] DrYockel: has joined #RubyOnRails
[18:55:59] srinidhi: has joined #RubyOnRails
[18:57:01] hahuang65: has joined #RubyOnRails
[19:03:30] choke: dflomo Some of them can be pretty gnarly to read, but you get used to it. The stack trace is where the magic is at... then of course, you can use byebug to do debugging as well
[19:10:48] sameerynho: has joined #RubyOnRails
[19:11:55] gambl0re: has joined #RubyOnRails
[19:12:03] tycoon177: is there a way to do an active record includes and use select at the same time? I want to limit the number of columns fetched as i have 5 tables in an includes() statement. Two of the joined tables are on the same table, however. The query looks like this currently `Closings.includes(:people, listing: [sellers: :client], buyers: :client)`, buyers and sellers link clients to home sales and listings respectively. This
[19:12:03] tycoon177: query, even being paginated with will_paginate takes far too long to run. Is there any way that I can pluck out certain information from all of this without just writing the query by hand?
[19:13:19] tycoon177: for example, i don't need all of the client information for either buyers or sellers. I just need the names, which is held in the client record. I only need the address information from the listing, etc.
[19:17:01] Dimik: has joined #RubyOnRails
[19:17:25] krawchyk: has joined #RubyOnRails
[19:17:37] desperek: has joined #RubyOnRails
[19:23:12] drale2k_: has joined #RubyOnRails
[19:24:45] bronson: has joined #RubyOnRails
[19:33:05] mices: has joined #RubyOnRails
[19:47:32] srinidhi: has joined #RubyOnRails
[19:55:46] guacamole: has joined #RubyOnRails
[20:05:28] ur5us: has joined #RubyOnRails
[20:05:51] elcontrastador: has joined #RubyOnRails
[20:06:55] defsdoor: has joined #RubyOnRails
[20:07:02] _ritchie_: has joined #RubyOnRails
[20:13:29] defsdoor: has joined #RubyOnRails
[20:25:53] bronson: has joined #RubyOnRails
[20:39:18] John_Titor: has joined #RubyOnRails
[20:39:21] John_Titor: has left #RubyOnRails: ("dis channel is shite")
[20:41:18] orbyt_: has joined #RubyOnRails
[20:48:01] workmad3: has joined #RubyOnRails
[20:54:08] jottr_: has joined #RubyOnRails
[21:05:12] sandstrom: has joined #RubyOnRails
[21:11:42] orbyt_: has joined #RubyOnRails
[21:15:14] LenPayne: has joined #RubyOnRails
[21:23:33] kurko_: has joined #RubyOnRails
[21:26:17] gambl0re: has joined #RubyOnRails
[21:26:44] bronson: has joined #RubyOnRails
[21:29:48] fugee: has joined #RubyOnRails
[21:30:29] mices: in a multi-tenant environment what can my tenants do for me as a web publisher trying to monetize
[21:30:50] mices: i'm gonna display my ads on their blogs?
[21:31:16] mices: i don't think a blogger would want my ads on his blog i dunno
[21:33:44] tycoon177: is there a way to do an active record includes and use select at the same time? I want to limit the number of columns fetched as i have 4 tables/5 joins in an includes() statement. some of these tables are massive and i only need ~20 of the columns total. currently, the query takes like 5.3 seconds, which is just ridiculous
[21:38:35] LenPayne: has joined #RubyOnRails
[21:50:17] mices: does mountable blog engine mean mountable by user or just by the parent app?
[21:54:56] defsdoor: has joined #RubyOnRails
[22:03:00] tipyn: has joined #RubyOnRails
[22:07:01] jottr_: has joined #RubyOnRails
[22:14:43] EXCHGR: has joined #RubyOnRails
[22:15:20] camfowler: has joined #RubyOnRails
[22:26:49] elcontrastador: has joined #RubyOnRails
[22:27:36] bronson: has joined #RubyOnRails
[22:44:45] orbyt_: has joined #RubyOnRails
[22:48:44] workmad3: has joined #RubyOnRails
[22:54:51] mtkd: has joined #RubyOnRails
[22:58:00] elcontrastador: has joined #RubyOnRails
[23:28:30] bronson: has joined #RubyOnRails
[23:31:28] commo: has joined #RubyOnRails
[23:36:37] alfiemax: has joined #RubyOnRails
[23:37:37] AntiSpamMeta: has joined #RubyOnRails
[23:47:47] orbyt_: has joined #RubyOnRails
[23:58:12] hahuang65: has joined #RubyOnRails