« Back to channel list

#RubyOnRails - 20 June 2017

« Back 1 day
[00:03:35] Technodrome: has joined #RubyOnRails
[00:13:11] helpa-bot: has joined #RubyOnRails
[00:13:19] cjohnson_: has joined #RubyOnRails
[00:13:35] kanzure_: has joined #RubyOnRails
[00:13:44] sunya7a: has joined #RubyOnRails
[00:13:54] G: has joined #RubyOnRails
[00:13:57] linetrac1: has joined #RubyOnRails
[00:14:18] uxp_: has joined #RubyOnRails
[00:14:25] planigan_: has joined #RubyOnRails
[00:14:55] watersoul_: has joined #RubyOnRails
[00:15:19] sunrunner20: has joined #RubyOnRails
[00:15:34] havenn: has joined #RubyOnRails
[00:15:49] umaaji: has joined #RubyOnRails
[00:15:51] segy: has joined #RubyOnRails
[00:16:33] helpa: has joined #RubyOnRails
[00:22:33] nebiros: has joined #RubyOnRails
[00:22:33] tweaks: has joined #RubyOnRails
[00:22:33] unreal_: has joined #RubyOnRails
[00:22:33] hive-mind: has joined #RubyOnRails
[00:22:33] wopi: has joined #RubyOnRails
[00:22:34] ejnahc: has joined #RubyOnRails
[00:22:34] s00pcan: has joined #RubyOnRails
[00:22:34] duderonomy: has joined #RubyOnRails
[00:22:34] xiljin: has joined #RubyOnRails
[00:22:34] timdotrb: has joined #RubyOnRails
[00:22:34] tris: has joined #RubyOnRails
[00:22:34] thortron: has joined #RubyOnRails
[00:22:34] lupine: has joined #RubyOnRails
[00:22:34] segy: has joined #RubyOnRails
[00:22:34] umaaji: has joined #RubyOnRails
[00:22:34] havenwood: has joined #RubyOnRails
[00:22:34] sunrunner20: has joined #RubyOnRails
[00:22:34] watersoul_: has joined #RubyOnRails
[00:22:34] planigan_: has joined #RubyOnRails
[00:22:34] uxp_: has joined #RubyOnRails
[00:22:34] linetrac1: has joined #RubyOnRails
[00:22:34] G: has joined #RubyOnRails
[00:22:34] sunya7a: has joined #RubyOnRails
[00:22:34] kanzure_: has joined #RubyOnRails
[00:22:34] cjohnson_: has joined #RubyOnRails
[00:22:34] aeffle: has joined #RubyOnRails
[00:22:34] notem: has joined #RubyOnRails
[00:22:35] Technodrome: has joined #RubyOnRails
[00:22:35] cagmz: has joined #RubyOnRails
[00:22:35] dblessing: has joined #RubyOnRails
[00:22:35] leeky: has joined #RubyOnRails
[00:22:35] workmad3_: has joined #RubyOnRails
[00:22:35] aarwine: has joined #RubyOnRails
[00:22:35] ule: has joined #RubyOnRails
[00:22:35] no-dashes: has joined #RubyOnRails
[00:22:35] jphase: has joined #RubyOnRails
[00:22:35] aperkins81: has joined #RubyOnRails
[00:22:35] mikecmpbll: has joined #RubyOnRails
[00:22:35] deur-: has joined #RubyOnRails
[00:22:35] TinkerTyper: has joined #RubyOnRails
[00:22:35] g3funk: has joined #RubyOnRails
[00:22:35] drcapulet: has joined #RubyOnRails
[00:22:35] edgr: has joined #RubyOnRails
[00:22:35] gil_: has joined #RubyOnRails
[00:22:35] w0rd-driven: has joined #RubyOnRails
[00:22:35] webdestroya: has joined #RubyOnRails
[00:22:35] uks: has joined #RubyOnRails
[00:22:35] ur5us: has joined #RubyOnRails
[00:22:35] ahrs: has joined #RubyOnRails
[00:22:36] nickjj_: has joined #RubyOnRails
[00:22:36] kies: has joined #RubyOnRails
[00:22:36] lxsameer: has joined #RubyOnRails
[00:22:36] gambl0re: has joined #RubyOnRails
[00:22:36] hahuang65: has joined #RubyOnRails
[00:22:36] cam27: has joined #RubyOnRails
[00:22:36] BSaboia: has joined #RubyOnRails
[00:22:36] mtkd: has joined #RubyOnRails
[00:22:36] Vircung: has joined #RubyOnRails
[00:22:36] _moep_: has joined #RubyOnRails
[00:22:36] Majadon: has joined #RubyOnRails
[00:22:36] \13k: has joined #RubyOnRails
[00:22:36] omninonsense: has joined #RubyOnRails
[00:22:36] jottr_: has joined #RubyOnRails
[00:22:36] nickenchuggets: has joined #RubyOnRails
[00:22:36] wsmoak: has joined #RubyOnRails
[00:22:36] nOgAnOo: has joined #RubyOnRails
[00:22:36] DukeDave: has joined #RubyOnRails
[00:22:36] Aeyris: has joined #RubyOnRails
[00:22:36] dustinm`_: has joined #RubyOnRails
[00:22:36] LightStalker: has joined #RubyOnRails
[00:22:36] sondr3: has joined #RubyOnRails
[00:22:36] sonOfRa: has joined #RubyOnRails
[00:22:36] Fernando-Basso: has joined #RubyOnRails
[00:22:36] universa1: has joined #RubyOnRails
[00:22:36] wethu: has joined #RubyOnRails
[00:22:36] fschuindt2: has joined #RubyOnRails
[00:22:36] Radar: has joined #RubyOnRails
[00:22:36] [dmp]: has joined #RubyOnRails
[00:22:36] tanuki: has joined #RubyOnRails
[00:22:37] ProofTechnique: has joined #RubyOnRails
[00:22:37] Coldblackice_: has joined #RubyOnRails
[00:22:37] jtdowney: has joined #RubyOnRails
[00:22:37] scrooloose: has joined #RubyOnRails
[00:22:37] pwnd_nsfw: has joined #RubyOnRails
[00:22:37] Fridtjof: has joined #RubyOnRails
[00:22:37] treefrob: has joined #RubyOnRails
[00:22:37] weaksauce: has joined #RubyOnRails
[00:22:37] Paradox: has joined #RubyOnRails
[00:22:37] auv: has joined #RubyOnRails
[00:22:37] lipoqil: has joined #RubyOnRails
[00:22:37] Hates_: has joined #RubyOnRails
[00:22:37] machty: has joined #RubyOnRails
[00:22:37] johnkpaul: has joined #RubyOnRails
[00:22:37] callahanrts: has joined #RubyOnRails
[00:22:37] Lloyd: has joined #RubyOnRails
[00:22:37] DarkBushido: has joined #RubyOnRails
[00:22:37] iamdevnul: has joined #RubyOnRails
[00:22:37] shtirlic: has joined #RubyOnRails
[00:22:37] biox: has joined #RubyOnRails
[00:22:37] larissa: has joined #RubyOnRails
[00:22:37] S007: has joined #RubyOnRails
[00:22:37] D9: has joined #RubyOnRails
[00:22:37] Haydos: has joined #RubyOnRails
[00:22:38] TessaM: has joined #RubyOnRails
[00:22:38] bazzy: has joined #RubyOnRails
[00:22:38] tpendragon: has joined #RubyOnRails
[00:22:38] Tempesta: has joined #RubyOnRails
[00:22:38] tomwyatt: has joined #RubyOnRails
[00:22:38] xibalba: has joined #RubyOnRails
[00:22:38] Nuck: has joined #RubyOnRails
[00:22:38] Gizmokid2005: has joined #RubyOnRails
[00:22:38] maxmanders: has joined #RubyOnRails
[00:22:38] veloutin: has joined #RubyOnRails
[00:22:38] michael_mbp: has joined #RubyOnRails
[00:22:38] spion_: has joined #RubyOnRails
[00:22:38] beingjohnm_: has joined #RubyOnRails
[00:22:38] FCser: has joined #RubyOnRails
[00:22:38] LBRapid: has joined #RubyOnRails
[00:22:38] DrYockel: has joined #RubyOnRails
[00:22:38] alfie: has joined #RubyOnRails
[00:22:38] armyriad: has joined #RubyOnRails
[00:22:38] lxkm: has joined #RubyOnRails
[00:22:38] gdonald: has joined #RubyOnRails
[00:22:38] Takumo: has joined #RubyOnRails
[00:22:38] zacts: has joined #RubyOnRails
[00:22:38] Archrover: has joined #RubyOnRails
[00:22:39] davic: has joined #RubyOnRails
[00:22:39] ivanovyordan: has joined #RubyOnRails
[00:22:39] gregf_: has joined #RubyOnRails
[00:22:39] Sigyn: has joined #RubyOnRails
[00:22:39] Ferdroid: has joined #RubyOnRails
[00:22:39] Exagone313: has joined #RubyOnRails
[00:22:39] Voxxit: has joined #RubyOnRails
[00:22:39] xhoy: has joined #RubyOnRails
[00:22:39] tekk: has joined #RubyOnRails
[00:22:39] my123_: has joined #RubyOnRails
[00:22:39] hfp_work: has joined #RubyOnRails
[00:22:39] urkle: has joined #RubyOnRails
[00:22:39] wsandin: has joined #RubyOnRails
[00:22:39] Kilo`byte: has joined #RubyOnRails
[00:22:39] mcr-credil: has joined #RubyOnRails
[00:22:39] ghormoon: has joined #RubyOnRails
[00:22:39] Subfusc: has joined #RubyOnRails
[00:22:39] gremax: has joined #RubyOnRails
[00:22:39] jxf: has joined #RubyOnRails
[00:22:39] ome: has joined #RubyOnRails
[00:22:39] adgtl: has joined #RubyOnRails
[00:22:39] bphogan: has joined #RubyOnRails
[00:22:39] MalMen: has joined #RubyOnRails
[00:22:40] ephemer0l_: has joined #RubyOnRails
[00:22:40] jhass: has joined #RubyOnRails
[00:22:40] jrgifford: has joined #RubyOnRails
[00:22:40] Axsuul: has joined #RubyOnRails
[00:22:40] manveru: has joined #RubyOnRails
[00:22:40] dmarr: has joined #RubyOnRails
[00:22:40] djinni`: has joined #RubyOnRails
[00:22:40] robnester: has joined #RubyOnRails
[00:22:40] lord4163: has joined #RubyOnRails
[00:22:40] HalcyonicStorm: has joined #RubyOnRails
[00:22:40] daxroc: has joined #RubyOnRails
[00:22:40] jhill: has joined #RubyOnRails
[00:22:40] CustosLimen: has joined #RubyOnRails
[00:22:40] arthurnn: has joined #RubyOnRails
[00:22:40] russt: has joined #RubyOnRails
[00:22:40] Liothen: has joined #RubyOnRails
[00:22:40] Talltree_: has joined #RubyOnRails
[00:22:40] BBHoss: has joined #RubyOnRails
[00:22:40] craysiii: has joined #RubyOnRails
[00:22:40] willcodeforfoo: has joined #RubyOnRails
[00:22:40] Cork: has joined #RubyOnRails
[00:22:40] Sirecote: has joined #RubyOnRails
[00:22:40] kt: has joined #RubyOnRails
[00:22:40] mattwc: has joined #RubyOnRails
[00:22:40] matthewd: has joined #RubyOnRails
[00:22:40] spectra: has joined #RubyOnRails
[00:22:40] Psy-Q: has joined #RubyOnRails
[00:22:40] Kamuela: has joined #RubyOnRails
[00:22:40] Meow-J: has joined #RubyOnRails
[00:22:41] nekomune: has joined #RubyOnRails
[00:22:41] DylanJ: has joined #RubyOnRails
[00:22:41] djgraham: has joined #RubyOnRails
[00:22:41] blitz: has joined #RubyOnRails
[00:22:41] elomatreb: has joined #RubyOnRails
[00:22:41] daemonwrangler: has joined #RubyOnRails
[00:22:41] soahccc: has joined #RubyOnRails
[00:22:41] ErhardtMundt: has joined #RubyOnRails
[00:22:41] staticfox: has joined #RubyOnRails
[00:22:41] syndikate: has joined #RubyOnRails
[00:22:41] ecook: has joined #RubyOnRails
[00:22:41] mmun: has joined #RubyOnRails
[00:22:41] ankhers: has joined #RubyOnRails
[00:22:41] FooBarWidget: has joined #RubyOnRails
[00:22:41] am55: has joined #RubyOnRails
[00:22:41] clamstar: has joined #RubyOnRails
[00:22:41] bodie_: has joined #RubyOnRails
[00:22:41] jtperreault: has joined #RubyOnRails
[00:22:41] Travis-42: has joined #RubyOnRails
[00:22:41] swgillespie: has joined #RubyOnRails
[00:22:41] targaf: has joined #RubyOnRails
[00:22:41] sinduck: has joined #RubyOnRails
[00:22:41] maqr: has joined #RubyOnRails
[00:22:41] nikivi: has joined #RubyOnRails
[00:22:41] JoshL: has joined #RubyOnRails
[00:22:41] Scient: has joined #RubyOnRails
[00:22:41] apeiros: has joined #RubyOnRails
[00:22:42] qguv: has joined #RubyOnRails
[00:22:42] quiller: has joined #RubyOnRails
[00:22:42] fumk: has joined #RubyOnRails
[00:22:42] atrius: has joined #RubyOnRails
[00:22:42] Fire-Dragon-DoL: has joined #RubyOnRails
[00:22:42] Junaos: has joined #RubyOnRails
[00:22:42] tycoon177: has joined #RubyOnRails
[00:22:42] szulak: has joined #RubyOnRails
[00:22:42] tbuehlmann: has joined #RubyOnRails
[00:22:42] cjk101010: has joined #RubyOnRails
[00:22:42] vedu: has joined #RubyOnRails
[00:22:42] dminuoso: has joined #RubyOnRails
[00:22:42] cardoni: has joined #RubyOnRails
[00:22:42] fl4sh_: has joined #RubyOnRails
[00:22:42] qmr: has joined #RubyOnRails
[00:22:42] Diabolik: has joined #RubyOnRails
[00:22:42] LyndsySimon: has joined #RubyOnRails
[00:22:42] pfg: has joined #RubyOnRails
[00:22:42] barttenbrinke: has joined #RubyOnRails
[00:22:42] kumavis: has joined #RubyOnRails
[00:22:42] podman: has joined #RubyOnRails
[00:22:42] rjungemann: has joined #RubyOnRails
[00:22:43] jlpeters: has joined #RubyOnRails
[00:22:43] dmnd: has joined #RubyOnRails
[00:22:43] vayan: has joined #RubyOnRails
[00:22:43] Iacobus: has joined #RubyOnRails
[00:22:43] newton: has joined #RubyOnRails
[00:22:43] sent-hil: has joined #RubyOnRails
[00:22:43] loglaunch: has joined #RubyOnRails
[00:22:43] TheMoonMaster: has joined #RubyOnRails
[00:22:43] CornishPasty: has joined #RubyOnRails
[00:22:43] boshhead: has joined #RubyOnRails
[00:22:43] noodle: has joined #RubyOnRails
[00:22:43] wbnns: has joined #RubyOnRails
[00:22:43] dmcc: has joined #RubyOnRails
[00:22:43] Hosh: has joined #RubyOnRails
[00:22:43] digitalfiz: has joined #RubyOnRails
[00:22:43] poikon: has joined #RubyOnRails
[00:22:43] moogumbo: has joined #RubyOnRails
[00:22:43] funnel: has joined #RubyOnRails
[00:22:43] baweaver: has joined #RubyOnRails
[00:22:43] richardjohn: has joined #RubyOnRails
[00:22:43] arathald: has joined #RubyOnRails
[00:22:43] epochwolf: has joined #RubyOnRails
[00:22:43] coffeejunk: has joined #RubyOnRails
[00:22:43] zz_timnovinger: has joined #RubyOnRails
[00:22:43] swav: has joined #RubyOnRails
[00:22:43] shamanime: has joined #RubyOnRails
[00:22:43] IceBear: has joined #RubyOnRails
[00:23:25] helpa: has joined #RubyOnRails
[00:24:36] 7JTABFHXU: has joined #RubyOnRails
[00:24:36] harfangk: has joined #RubyOnRails
[00:24:36] xMopxShell: has joined #RubyOnRails
[00:25:06] tomaw: has joined #RubyOnRails
[00:28:32] mikecmpb_: has joined #RubyOnRails
[00:29:30] MissionCritical: has joined #RubyOnRails
[00:31:46] djinni`: has joined #RubyOnRails
[00:32:30] dustinm`: has joined #RubyOnRails
[00:35:13] cgfbee: has joined #RubyOnRails
[00:37:05] irishfromua: has joined #RubyOnRails
[00:39:26] S1kx: has joined #RubyOnRails
[00:40:32] ascarter: has joined #RubyOnRails
[00:42:37] AntiSpamMeta: has joined #RubyOnRails
[00:43:27] xco: has joined #RubyOnRails
[00:44:02] jphase: has joined #RubyOnRails
[00:44:20] irishfromua: has joined #RubyOnRails
[00:51:25] sunrunner20: has joined #RubyOnRails
[00:59:49] jphase: has joined #RubyOnRails
[01:08:54] ule: Hey guys.. Is there another way of doing this:
[01:09:21] ule: foo = my_instance.my_field || ''
[01:09:34] ule: so.. if my_field is nil, it fills with an empty string
[01:10:20] ule: the problem is that I have 10 of these inside a hash so my Rubocop is complaining about a Cyclomatic complexity for my_field is too high
[01:11:50] ule: * not my_field, to the method
[01:15:54] sevenseacat: has joined #RubyOnRails
[01:22:59] apparition: has joined #RubyOnRails
[01:23:38] xco: hello. any help on this? https://stackoverflow.com/questions/44620764/argumenterror-when-assigning-attributes-you-must-pass-a-hash-as-an-argument
[01:52:49] quazimodo: has joined #RubyOnRails
[01:56:41] Jameser: has joined #RubyOnRails
[02:08:11] xco: has left #RubyOnRails: ()
[02:12:29] creature: has joined #RubyOnRails
[02:19:47] gusrub: has joined #RubyOnRails
[02:41:54] quazimodo: has joined #RubyOnRails
[02:50:18] timdotrb: has joined #RubyOnRails
[03:04:26] Aeyris_: has joined #RubyOnRails
[03:13:16] kies: has joined #RubyOnRails
[03:27:11] patarr: has joined #RubyOnRails
[03:31:56] agent_white: has joined #RubyOnRails
[03:42:22] HashNuke: has joined #RubyOnRails
[04:50:25] xall: has joined #RubyOnRails
[05:04:05] ascarter: has joined #RubyOnRails
[05:06:43] fschuindt3: has joined #RubyOnRails
[05:14:03] fschuindt4: has joined #RubyOnRails
[05:17:28] oddie: has joined #RubyOnRails
[05:17:50] quirkycoders: has joined #RubyOnRails
[05:20:33] cgfbee: has joined #RubyOnRails
[05:20:49] ascarter: has joined #RubyOnRails
[05:21:03] skiz: has joined #RubyOnRails
[05:28:03] patarr: has joined #RubyOnRails
[05:28:59] ascarter: has joined #RubyOnRails
[05:41:34] nickjj: has joined #RubyOnRails
[05:45:37] gusrub: has joined #RubyOnRails
[05:58:55] quirkycoders: has joined #RubyOnRails
[06:00:07] adrianvalenz_: has joined #RubyOnRails
[06:01:14] adrianvalenz_: I'm running into this issue where I get an error with Stripe where a param is missing or the value is empty:charge ...here is a gist: https://gist.github.com/adrianvalenz/8c87552a10de51e3168a7700f9374e1e
[06:01:47] sevenseacat: look at the params being submitted to your controller, in your logs
[06:01:55] Trynemjoel: has joined #RubyOnRails
[06:02:15] Jameser: has joined #RubyOnRails
[06:04:20] adrianvalenz_: sevenseacat: I see them but what I am looking for, I have params for. Should I add it to the gist?
[06:04:41] sevenseacat: see that params[:charge] is indeed empty
[06:07:55] helpa-bot: has joined #RubyOnRails
[06:08:34] Andr3as: has joined #RubyOnRails
[06:09:30] adrianvalenz_: sevenseacat: It doesn't even show up, I think it is an object from the stripe api
[06:09:55] helpa: has joined #RubyOnRails
[06:09:57] sevenseacat: and you are not submitting a :charge parameter
[06:11:12] adrianvalenz_: I'm not following.. :O(
[06:13:09] adrianvalenz_: Oh wait, I re-read what you wrote...
[06:14:28] adrianvalenz_: yes, in the form there is no mention about a :charge parameter, the charge variable in the controller was taken from Stripe's docs, and the form is Stripes default.
[06:14:42] sevenseacat: link to the docs you're reading?
[06:14:50] adrianvalenz_: I'm not really sure how to add a charge parameter in the form. I'll get the link.
[06:15:00] sevenseacat: because i very much doubt stripe's docs tell you to use form_tag
[06:16:30] adrianvalenz_: sevenseacat: Here is it... https://stripe.com/docs/checkout/rails
[06:17:03] sevenseacat: ok, so your controller is different from theirs
[06:19:00] adrianvalenz_: Yea I modified it to also create a record in the Charge model I made. I want there to be a record of every transaction when they pay with the Stripe checkout
[06:19:11] roshanavand: has joined #RubyOnRails
[06:19:50] quirkycoders: has joined #RubyOnRails
[06:20:30] conta: has joined #RubyOnRails
[06:21:01] sevenseacat: so compare your controller to theirs - note the params that they expect to be submitted
[06:21:05] sevenseacat: by their form
[06:21:09] sevenseacat: adapt your controller accordingly
[06:23:39] ascarter: has joined #RubyOnRails
[06:31:12] Olipro: has joined #RubyOnRails
[06:31:57] adrianvalenz_: sevenseacat: I'm looking at it but I don't see anything wrong with it. I tried rearrangin my if charge true and if charge.save statements after the rescue but nothign..
[06:32:17] sevenseacat: the problem is the params being submitted to the controller - what does stripe's controller use, compared to yours?
[06:36:05] S1kx: has joined #RubyOnRails
[06:40:24] quirkycoders: has joined #RubyOnRails
[06:42:07] adrianvalenz_: sevenseacat: Forgive me for I'm still learning rails but...I see the params for stripeToken and stripeEmail
[06:42:27] sevenseacat: right, and not for charge
[06:42:38] sevenseacat: so your controller shouldnt be trying to access params[:charge]
[06:43:26] dionysus69: has joined #RubyOnRails
[06:47:15] adrianvalenz_: So it is confusing the instance variable @charge which is related to my Charge model, with the charge from stripe? :/
[06:48:07] sevenseacat: you've written code to access params[:charge] (params.require(:charge)) which does not exist.
[06:48:32] sevenseacat: you should change that code to match the params you actually have.
[06:50:20] ascarter: has joined #RubyOnRails
[06:55:30] adrianvalenz_: soo instead of params.require(:charge)...it should be params.require(:item_id)
[06:56:25] bpmedley: has joined #RubyOnRails
[06:57:33] adrianvalenz_: sevenseacat: ^^
[07:00:54] quirkycoders: has joined #RubyOnRails
[07:05:53] srinidhi: has joined #RubyOnRails
[07:07:51] adrianvalenz_: sevenseacat: No that didn't work, I got another error for changing it with :item_id instead of :charge...plus I would think that :charge is associated with my model and not with anything to do with stripes... idk i'm so confused. dam headaches
[07:08:27] tenderlo_: has joined #RubyOnRails
[07:08:37] dminuoso: 87/me grabs the popcorn
[07:08:49] adrianvalenz_: and this was working before, it wasn't until I added the @charge instance variable to the new and create methods is when I started to get this issue.
[07:22:14] xiljin: has joined #RubyOnRails
[07:27:27] timdotrb: has joined #RubyOnRails
[07:28:56] patarr: has joined #RubyOnRails
[07:34:29] duderono_: has joined #RubyOnRails
[07:34:58] Pumukel: has joined #RubyOnRails
[07:37:45] adrianvalenz_: do i just remove `.require(:charge)` then?
[07:41:34] adrianvalenz_: sevenseacat: I just removed `.require(:charge)` and it worked...
[07:41:56] quirkycoders: has joined #RubyOnRails
[07:45:32] adrianvalenz_: sevenseacat: thank you for your help and patience. I understand why you don't tell me outright what it is but guide. You retain the info you learn when you try to solve the problem with critical thinking
[07:49:28] Paradox: has joined #RubyOnRails
[07:50:37] tenderlove: has joined #RubyOnRails
[08:01:19] Jameser: has joined #RubyOnRails
[08:07:22] webdestroya: has joined #RubyOnRails
[08:07:48] no-dashes: This is for the 5.1.1 experts: Is there already a 'best practice' for bundling webpacker-aware javascript code and dependencies in a gem?
[08:07:52] edgr: has joined #RubyOnRails
[08:18:55] marr: has joined #RubyOnRails
[08:19:22] xall: has joined #RubyOnRails
[08:19:46] drptbl: has joined #RubyOnRails
[08:20:34] arBmind: has joined #RubyOnRails
[08:24:44] ferr: has joined #RubyOnRails
[08:42:56] Pumukel: has joined #RubyOnRails
[09:07:24] lxsameer: has joined #RubyOnRails
[09:29:49] patarr: has joined #RubyOnRails
[09:31:33] shotbug: has joined #RubyOnRails
[09:42:49] desnudopenguino: has joined #RubyOnRails
[09:46:21] arBmind: has joined #RubyOnRails
[09:50:41] arBmind: has joined #RubyOnRails
[10:03:09] GeorgesLeYeti: has joined #RubyOnRails
[10:05:14] GeorgesLeYeti: I wanna use a DBaaS. But I cannot install any extension because i'm not a superusers. But I can add (thourg an admin dashboard) a list of extension. But I don't know wich one is used by my rails application.
[10:10:14] desnudopenguino: hmm, that's beyond me friend. I haven't played with DBaaS stuff before
[10:11:07] roshanavand: has joined #RubyOnRails
[10:14:44] futilegames: has joined #RubyOnRails
[10:15:04] futilegames: has left #RubyOnRails: ()
[10:16:44] sonOfRa: has joined #RubyOnRails
[10:27:35] patarr: has joined #RubyOnRails
[10:29:58] Pumukel: has joined #RubyOnRails
[10:41:20] Technodrome: has joined #RubyOnRails
[10:55:14] r3zn0v: has joined #RubyOnRails
[10:57:09] sondr3_: has joined #RubyOnRails
[11:00:43] roshanavand: has joined #RubyOnRails
[11:01:37] sondr3: has joined #RubyOnRails
[11:02:26] ur5us: has joined #RubyOnRails
[11:06:01] boxmein: has joined #RubyOnRails
[11:06:29] Pumukel: has joined #RubyOnRails
[11:10:31] mikecmpbll: has joined #RubyOnRails
[11:15:26] sondr3_: has joined #RubyOnRails
[11:23:46] alfie: has joined #RubyOnRails
[11:26:06] charlielor: has joined #RubyOnRails
[11:28:16] Fernando-Basso: has joined #RubyOnRails
[11:31:09] waseem_: has joined #RubyOnRails
[11:49:36] roshanavand: has joined #RubyOnRails
[11:52:14] dionysus69: I have 1 update action but 2 new actions. can I set strong parameters in the new actions separately ? if yes what scope array do I need to use? after the new action controller instance is discarded as I know so I ll be forced to use class variable right?
[11:53:40] dminuoso: dionysus69: What do you mean "set strong parameters separately"
[11:53:53] dminuoso: You do not _set_ strong parameters.
[11:54:10] dminuoso: dionysus69: The word "params" is a method, that accesses the current request and transforms it into a strong params hash.
[11:54:14] dionysus69: https://gist.github.com/fc4ee82e5851d7a5bbcdd95a2629a226
[11:54:25] dminuoso: dionysus69: Use different methods.
[11:54:48] dminuoso: dionysus69: dont push into params.
[11:54:55] dminuoso: dionysus69: do you know what a[b] does?
[11:55:10] dionysus69: well ye of course :D
[11:55:23] dionysus69: that's basic programming in any language x))
[11:57:04] dionysus69: btw I get weird error when I try to use params[:physical_entity], it is supposed to be boolean and i get no implicit conversion of symbol into integer :S
[11:58:21] tbuehlmann: how do you distinguish between `params` the local variable and `params` the controller method?
[11:59:48] dionysus69: omg I didnt realize I created a name collision
[12:00:34] shotbug: has joined #RubyOnRails
[12:04:47] dionysus69: thanks tbuehlmann :D
[12:08:09] dionysus69: you were right dminuoso about merging arrays with << createed a 2d array forgot about that :S
[12:08:43] dminuoso: dionysus69: So tell me, what does a[b] do?
[12:09:01] dionysus69: return value of a array of b index
[12:09:15] dionysus69: of b index of a array I guess xD
[12:09:24] dminuoso: dionysus69: But params is not an array.
[12:09:57] dionysus69: yep it is a hash, so I am plugin in array of hashes into permit method
[12:10:03] dminuoso: dionysus69: It is not a hash either.
[12:10:14] dionysus69: ok it is a params object :D
[12:10:16] dminuoso: dionysus69: My point is, [] is just a plain method like any other.
[12:10:27] dminuoso: dionysus69: you could also just write a.[](b)
[12:10:30] fxa90id: has joined #RubyOnRails
[12:10:36] dminuoso: which looks a lot like a.foo(b), doesn't it?
[12:10:50] dionysus69: hmm yep :) I get it
[12:11:03] dionysus69: I am trying to do what this guy is doing https://stackoverflow.com/questions/26306693/strong-parameters-how-to-permit-parameters-using-conditions
[12:11:23] dionysus69: i am just appending multiple keys instead of just one
[12:12:07] dminuoso: dionysus69: Use :+ rather than :<<
[12:12:43] dminuoso: dionysus69: If you do ary + another_ary you get a union of both.
[12:12:54] dminuoso: (Or a straight ary += another_ary)
[12:14:25] Pumukel: has joined #RubyOnRails
[12:15:15] Pumukel: has joined #RubyOnRails
[12:16:00] Pumukel: has joined #RubyOnRails
[12:16:47] dionysus69: in terms of array + would do same thing as += right?
[12:16:49] Pumukel: has joined #RubyOnRails
[12:17:26] dminuoso: dionysus69: Not the same thing.
[12:17:34] Pumukel: has joined #RubyOnRails
[12:17:43] dminuoso: += re-assigns the resulting value to the left hand side. + does not.
[12:18:11] dminuoso: dionysus69: a += b is just syntax shorthand for a = a + b
[12:18:14] dminuoso: It is not overloadable.
[12:18:24] Pumukel: has joined #RubyOnRails
[12:18:28] dminuoso: Same thing goes for /=, *=, etc
[12:18:57] tbuehlmann: you can also just use #concat and you won't get a new but the same object
[12:19:41] dminuoso: ACTION beats tbuehlmann with the immutable club
[12:20:01] tbuehlmann: or a.push(*b) :D
[12:20:15] dminuoso: tbuehlmann: That looks really silly.
[12:21:00] xall: has joined #RubyOnRails
[12:27:07] jottr_: has joined #RubyOnRails
[12:30:12] defswork: has joined #RubyOnRails
[12:32:27] ascarter: has joined #RubyOnRails
[12:32:31] dionysus69: when I do array + array I get + operator used in void context from rubocop
[12:33:21] dionysus69: https://gist.github.com/31a9e76c7b2d91ece247aaa2245f9b66
[12:33:38] dionysus69: + doesnt actually add those two arrays together, in either if or else case
[12:45:14] dionysus69: ok I finally ended up using push with *
[12:45:21] ascarter_: has joined #RubyOnRails
[12:59:02] mtkd: has joined #RubyOnRails
[13:03:08] ur5us: has joined #RubyOnRails
[13:04:06] jphase: has joined #RubyOnRails
[13:07:32] schuylr: has joined #RubyOnRails
[13:14:28] jphase: has joined #RubyOnRails
[13:34:20] Cork: has joined #RubyOnRails
[13:40:43] Pumukel: has joined #RubyOnRails
[13:40:46] no-dashes: This is for the 5.1.1 experts: Is there already a 'best practice' for bundling webpacker-aware javascript code and dependencies in a gem?
[13:50:33] srinidhi: has joined #RubyOnRails
[13:59:59] dblessing: has joined #RubyOnRails
[14:00:07] firel246: has joined #RubyOnRails
[14:01:55] firel246: I am a newbie when it comes to Ruby on Rails.
[14:03:41] firel246: There are two ActiveRecord models. Person and Email. Person :has_many emails.
[14:03:49] charlielor: has joined #RubyOnRails
[14:04:01] firel246: I have an array of emails, and would like to get collection of all the emails and people that have these emails belong to. Is there a smart way to achieve such result?
[14:04:29] firel246: All that I thought of was to search People.where(email: email_array[index])
[14:04:36] firel246: And Add them seperately
[14:04:43] firel246: But there must be a better way.
[14:04:56] firel246: I would be happy to hearing from you
[14:07:58] tbuehlmann: firel246: not entirely sure I understand correctly, but might this work for you? Person.where(id: email_array.map(&:person_id)
[14:08:46] firel246: That would return an array of people?
[14:08:56] firel246: Or just a single person
[14:09:23] firel246: I'm sorry I am relatively new to this technology
[14:13:13] andywww: has joined #RubyOnRails
[14:13:55] andywww: is there a way of finding out where a class is defined?
[14:14:33] andywww: i’m 90% sure its being defined in a gem somewhere but its a very large project and i can’t find a definition in the source
[14:17:39] no-dashes: andywww - try to raise an error in an overridden method – and have a look in the stacktrace ;)
[14:20:50] NoGodDamnIdea: has joined #RubyOnRails
[14:21:05] andywww: it was a module, sorry
[14:21:10] andywww: i found it with $LOADED_FEATURES.select { |file| File.read(file).include?('module Whois') rescue false }
[14:21:11] mauro1254: has joined #RubyOnRails
[14:21:20] andywww: thanks for the input though
[14:23:37] jphase2: has left #RubyOnRails: ()
[14:24:03] andywww: has left #RubyOnRails: ()
[14:25:42] irishfromua: has joined #RubyOnRails
[14:26:09] hobodave: has joined #RubyOnRails
[14:28:09] fryguy: has joined #RubyOnRails
[14:28:11] patarr: has joined #RubyOnRails
[14:30:24] Exagone313: has joined #RubyOnRails
[14:34:14] Pumukel: has joined #RubyOnRails
[14:35:07] mikecmpb_: has joined #RubyOnRails
[14:39:42] SteenJobs: has joined #RubyOnRails
[14:45:36] cam27: has joined #RubyOnRails
[14:47:44] ResidentBiscuit: has joined #RubyOnRails
[14:48:09] ResidentBiscuit: has joined #RubyOnRails
[14:53:14] patarr: has joined #RubyOnRails
[14:58:46] FCser: has joined #RubyOnRails
[15:04:01] ur5us: has joined #RubyOnRails
[15:09:30] mikecmpbll: has joined #RubyOnRails
[15:13:17] cschneid_: has joined #RubyOnRails
[15:23:10] cam27: has joined #RubyOnRails
[15:36:27] ResidentBiscuit: has joined #RubyOnRails
[15:36:52] ResidentBiscuit: has joined #RubyOnRails
[15:37:19] ResidentBiscuit: has joined #RubyOnRails
[15:37:46] ResidentBiscuit: has joined #RubyOnRails
[15:38:37] ResidentBiscuit: has joined #RubyOnRails
[15:39:07] ResidentBiscuit: has joined #RubyOnRails
[15:39:19] mostlybadfly: has joined #RubyOnRails
[15:39:36] ResidentBiscuit: has joined #RubyOnRails
[15:40:02] ResidentBiscuit: has joined #RubyOnRails
[15:40:27] alexday: has joined #RubyOnRails
[15:46:37] dblessing: has joined #RubyOnRails
[15:46:42] alexday: hi.. I had a question. requirement is if the first login attempt fails, then show a call me button. Now this state is handled at backend, and is dependent on the number of retries. say that I have a code which says, num_of_retries= login_requests.number_of_retries; <some if else logic> login_requests.update(retries: num_of_retries + 1). now the problem is. we have jruby to support thread. and when I am
[15:46:45] alexday: running a spec that says: prev_num = login_requests.number_of_retries. post :create, bla: bla; login_requests.reload . expect(login_requests.number_of_retries).to eq(prev+1). This test passes locally, but when run in gitlab this fails. either saying exepected 1 got 2 or expected 1 got 3.
[15:46:47] alexday: why is this?
[15:47:13] alexday: is it because of some thread. like say two it blocks run parallely?
[15:47:52] alexday: and then before this post request another post request gets executed? and if so, how do I write the code or test properly
[15:48:03] Pumukel: has joined #RubyOnRails
[15:50:27] patarr: has joined #RubyOnRails
[15:51:23] dionysus69: has joined #RubyOnRails
[15:52:12] kies: has joined #RubyOnRails
[15:54:29] Saukk: has joined #RubyOnRails
[15:57:01] elsurudo: has joined #RubyOnRails
[15:57:50] pLaTo0n: has joined #RubyOnRails
[16:00:23] Saukk: has joined #RubyOnRails
[16:04:15] roshanavand: has joined #RubyOnRails
[16:07:06] toydestroyer: has joined #RubyOnRails
[16:07:44] cagmz: has joined #RubyOnRails
[16:07:55] dionysus69: has joined #RubyOnRails
[16:15:02] defsdoor: has joined #RubyOnRails
[16:19:55] tanuki: has joined #RubyOnRails
[16:22:57] gusrub: has joined #RubyOnRails
[16:33:24] milesmatthias: has joined #RubyOnRails
[16:33:28] tanuki: has joined #RubyOnRails
[16:35:57] marr: has joined #RubyOnRails
[16:39:26] mtkd: has joined #RubyOnRails
[16:41:40] zautomata: has joined #RubyOnRails
[16:48:36] bob_f: has joined #RubyOnRails
[16:49:51] bob_f: Hi. I'm trying to create an AR object with Factory Girl, passing a parameter to set something which is defined as a custom attr_accessor on my model (i.e. does not map to a DB column). I'm trying to do `create(:user, attribute: 'value')` but `attribute=` does not get called on my model.
[16:49:58] NoGodDamnIdea: has joined #RubyOnRails
[16:50:16] bob_f: However if I just do `User.create(attribute: 'value')` then it works as expected.
[16:50:22] bob_f: Am I misunderstanding Factory Girl ?
[16:59:41] bob_f: Ugh. I see why it's not working - Factory Girl is being completely correct; I am not.
[17:00:37] dionysus69: I usually try to setup controller actions in a way that if not current_user on own resources, can't do much. I am basically using authentication in authorization context. is it a good practice to double protect actions with pundit for example too, or is it just duplicating work and is a waste?
[17:04:57] ur5us: has joined #RubyOnRails
[17:15:07] cam27: has joined #RubyOnRails
[17:15:22] hobodave: has joined #RubyOnRails
[17:16:33] kies: has joined #RubyOnRails
[17:19:18] theunraveler: has joined #RubyOnRails
[17:27:17] zautomata: has joined #RubyOnRails
[17:34:28] hahuang65: has joined #RubyOnRails
[17:39:57] yebyen: has joined #RubyOnRails
[17:47:38] irishfromua: has joined #RubyOnRails
[17:51:50] sofubi: has joined #RubyOnRails
[17:54:45] duderonomy: has joined #RubyOnRails
[17:59:33] sofubi: has left #RubyOnRails: ()
[18:02:58] ascarter: has joined #RubyOnRails
[18:17:37] ascarter: has joined #RubyOnRails
[18:20:03] mrbubbles: has joined #RubyOnRails
[18:20:17] mrbubbles: You know how you can have namespaced engines - like main_app, then spree.products_path etc
[18:20:28] mrbubbles: Is there a way to check whether you're in one of those namespaces?
[18:22:11] zautomata: has joined #RubyOnRails
[18:26:32] yebyen: mrbubbles: i can tell you how to escape out of it, if you are...
[18:26:44] yebyen: Start your expression with ::
[18:26:56] tercenya: has joined #RubyOnRails
[18:27:06] centrx: has joined #RubyOnRails
[18:28:09] yebyen: mrbubbles: Looks like you can test for that :: in your class's name attribute to see if you are in a namespace
[18:28:27] yebyen: mrbubbles: https://stackoverflow.com/a/11489062
[18:28:47] yebyen: if self.name.include? "::"
[18:29:50] zautomata1: has joined #RubyOnRails
[18:30:16] ruby635: has joined #RubyOnRails
[18:30:24] ruby635: hey hey awesome people
[18:30:37] yebyen: good morning!
[18:30:49] mikecmpbll: has joined #RubyOnRails
[18:31:10] ruby635: I was looking for some carrierwave help i was pointed in the direction of this irc
[18:31:22] yebyen: it's always morning on the internet
[18:31:35] ruby635: and no one knows your a dog on the internet
[18:31:43] yebyen: i've been found out!
[18:31:51] yebyen: i'm using carrierwave, and i've used refile
[18:32:21] ruby635: Mind helping a newb out?
[18:32:39] yebyen: i wouldn't be here if i did!
[18:33:56] ruby635: so i created a form to upload files. everything works well with the uploader, it is connected to a google bucket. The problem i am running into is i need to create a link to download the file for users.
[18:37:37] yebyen: aha and you're using remote object storage
[18:38:37] yebyen: so, is the url attribute not getting you there?
[18:39:05] ruby635: i tried using this <%= link_to File.basename(file.attachment_url), "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" %> but i get an error when i put that in my code
[18:40:21] yebyen: what kind of error
[18:40:23] ruby635: I mean i dont get an error the application stops working
[18:40:42] watersoul: has joined #RubyOnRails
[18:40:50] yebyen: so with link_to, i think the first argument is the link text and the second arg is the link url
[18:40:56] ruby635: maybe a link to my github project would help you out
[18:41:17] ruby635: https://github.com/RCydefe/hack-the-arch
[18:41:32] yebyen: what are file and model
[18:41:44] yebyen: and where is mounted_as meant to come from
[18:41:47] yebyen: yeah i'll look at your code!
[18:42:31] gusrub: has joined #RubyOnRails
[18:42:41] ruby635: brb need to marinate my chicken on the grill
[18:43:04] elsurudo: has joined #RubyOnRails
[18:44:50] yebyen: yeah so, attachment_url is supposed to be the url of your attachment
[18:45:03] yebyen: mounted_as is somewhat confusing
[18:46:24] yebyen: ruby635: so, picture is your mounted attachment model
[18:47:36] yebyen: what kind of value does picture.url contain? that should be the image href if i have it right
[18:47:47] cam27: has joined #RubyOnRails
[18:47:55] yebyen: i'm not using s3 (or google buckets) right now, but carrierwave and refile are both very similar
[18:48:02] yebyen: and i have used refile with s3
[18:48:14] yebyen: in theory you should be able to just
[18:48:52] yebyen: link_to File.basename(picture.url), picture.url
[18:50:26] yebyen: I think you copied this line of code from somewhere and forgot that "file" and "model" are not valid references in your scope :)
[18:51:40] Eindoofus: has joined #RubyOnRails
[18:51:59] gusrub: has joined #RubyOnRails
[18:53:02] ruby635: <%= link_to File.basename(picture.url), picture.url %>
[18:53:10] ruby635: ill try addding that and see what happens
[18:54:49] woods: has joined #RubyOnRails
[18:55:11] woods: good morning
[18:58:47] ruby635: so i changed <p><%= image_tag @problem.picture.url if @problem.picture? %></p> to <p><%= link_to @problem.picture.url if @problem.picture? %></p>
[18:59:20] ruby635: it creates a link on the page but for some reason when the link is clicked it wont download.
[19:00:15] gusrub: has joined #RubyOnRails
[19:01:06] yebyen: won't download, as in won't do anything?
[19:01:12] yebyen: or comes up in a window instead
[19:01:19] ruby635: doesnt do anything
[19:01:32] yebyen: there's a more elegant way to do problem.picture.url if problem.picture? by the way
[19:01:43] yebyen: problem.picture.try(&:url)
[19:01:55] yebyen: just problem.picture.try(:url)
[19:02:21] yebyen: that's as long as you're sure that problem exists
[19:02:33] yebyen: and has a picture method (even if it might return nil)
[19:02:34] ur5us: has joined #RubyOnRails
[19:02:45] yebyen: if try is called on a nil, it just returns nil
[19:02:52] ruby635: ill give t a shot
[19:03:03] yebyen: that's probably not going to solve your problem though
[19:03:33] ruby635: so make it <p><%= link_to problem.picture.try(&:url)%></p>
[19:03:41] yebyen: no ampersand &
[19:03:50] yebyen: that was a mistake, i was thinking of map
[19:04:02] ruby635: ok trying it now
[19:04:16] yebyen: my_list.map(&:something) is a handy shorthand for my_list.map{|x| x.something}
[19:04:23] yebyen: that's what I was thinking of when I said &
[19:04:33] ruby635: it will take a sec to take effect. Its being hosted on heroku
[19:04:36] yebyen: what kind of link does it create? is it linking to somewhere?
[19:04:45] yebyen: that's cool, I use heroku for some things too
[19:04:59] yebyen: i'm starting to look at draft instead
[19:05:23] yebyen: solution based on kubernetes and helm instead of heroku
[19:05:52] yebyen: it has the nice side-effect that when you save, it starts pushing your code immediately to the dev server, instead of waiting for a commit and a push
[19:06:22] yebyen: so you don't need to make a commit just to try out your change
[19:07:09] yebyen: you might be able to get away with calling picture_url too
[19:07:16] yebyen: instead of picture.try(:url)
[19:07:58] ruby635: hmmmmm so if i right click and try to download the file it trys to download problems.htm
[19:08:54] ruby635: ahhh i see what is happening
[19:09:08] yebyen: you do! good
[19:09:17] yebyen: oh you wanted @problem, right
[19:09:31] ascarter: has joined #RubyOnRails
[19:09:32] yebyen: not just problem
[19:09:35] ruby635: it is creating a link with the text of the file but the actual link goes to https://labs.cydefe.com/problems
[19:09:54] mtkd: has joined #RubyOnRails
[19:10:01] yebyen: because it's getting a blank as the link target
[19:10:04] yebyen: so it's just linking to self
[19:10:17] ruby635: so would i have to make it <p><%= link_to @problem.picture.try(:url)%></p>
[19:10:27] ruby635: yeah it is linking to the problem page
[19:11:52] yebyen: if that works, try @problem.picture_url
[19:12:24] ForeignBiscuit: has joined #RubyOnRails
[19:12:39] Eindoofus: hi, i was just wondering what is a good resource for learning rails for the sole purpose of building APIs? need someone that brings all of this rails voodoo to light (i'm coming from the world of Java)
[19:12:40] yebyen: i don't know what happens when picture is nil, but
[19:13:11] hobodave: has joined #RubyOnRails
[19:13:30] yebyen: eindoofus: what are you trying to do with your API?
[19:13:53] yebyen: like, there is this tutorial with good google-juice:
[19:13:54] yebyen: https://scotch.io/tutorials/build-a-restful-json-api-with-rails-5-part-one
[19:14:14] Eindoofus: handle json data and do crud operations. using mongo for the database
[19:14:16] yebyen: but if you have SQL tables that you want to expose via API, there is probably a shorter path you can take that will result in better code
[19:14:42] yebyen: yeah this tutorial looks good
[19:15:00] yebyen: you'll need to configure the database for mongo
[19:15:26] yebyen: build tests with rspec, use factorygirl in your tests, use generators for your models
[19:15:50] Eindoofus: thanks. not bad but i hoping for something with more of an explanation of what's happening behind the senses. seems like rails is doing a lot in the middle
[19:15:50] yebyen: https://gorails.com/guides/setting-up-rails-4-with-mongodb-and-mongoid
[19:16:05] yebyen: there is a lot of stuff that happens on your behalf yeah
[19:16:08] joeyk: has joined #RubyOnRails
[19:16:16] yebyen: that second link looks like a good start at hooking up mongo
[19:16:33] yebyen: i am afraid that if you want to start by understanding rails inside and out, you're going to have a bad time
[19:16:50] yebyen: there are so many "interesting" things that are done behind the scenes
[19:16:55] joeyk: Would it be a sin to do something like: def my_date_field= date; date = Date.strptime(date, "%m/%d/%Y") if date ; super date ; end
[19:17:14] Eindoofus: think i need to have a bad time but not even sure how to do that
[19:17:31] yebyen: eindoofus: is there something in particular that you want to understand better?
[19:17:39] Eindoofus: seems like there is some secret sauce that may or may not bite a person in the arse
[19:17:55] yebyen: the secret is not in the sauce
[19:17:55] cam27: has joined #RubyOnRails
[19:18:04] joeyk: If it's not a sin, would there be an easy way to overload all setters on data types of 'DATE' to use such a setter?
[19:18:07] yebyen: the secret is, in my opinion, keeping your code covered and tested
[19:18:21] yebyen: so when you make a change that does trigger something unexpected
[19:18:25] yebyen: you notice it
[19:18:52] yebyen: like for example, there's such a thing as an after_save hook
[19:19:00] alexday: has left #RubyOnRails: ("WeeChat 1.8")
[19:19:13] yebyen: you can specify a method to run after your object's save method is called, persisting it to the database
[19:19:35] yebyen: depending on what that method does, you might really need after_commit instead of after_save
[19:19:46] yebyen: how would you know that you need this?
[19:19:48] Eindoofus: find it things like that that aren't easy to find and usually come up with a bunch of googling
[19:20:11] dionysus69: whats the best library for notification errors? I found toastr to be buggy and last commit was over year ago
[19:20:32] yebyen: the only way i figured this out is that I had a strange behavior, and enough rspec tests to uncover the cases when my after_save hook was not behaving as expected
[19:20:53] yebyen: i was finding users in production that didn't have their permissions records populated correctly
[19:21:34] yebyen: turns out that a User record does not get an ID assigned until the database commit. Trying to find the User object by its ID after it is saved but before it is committed, results in unexpected behavior.
[19:21:43] yebyen: there's no guide that will teach you this though
[19:22:34] Eindoofus: but why? this is turning out to be the most irritating part
[19:23:17] yebyen: the fact is that in Rails, everything is obvious
[19:23:24] yebyen: until you find something that is patently non-obvious
[19:23:28] yebyen: then it's arcane and obscure
[19:23:52] yebyen: and might never affect you, so it's not worth learning
[19:23:59] yebyen: (until it does)
[19:24:19] yebyen: people who are successful at writing tutorials and documentation tend to be very good at understanding this
[19:25:20] yebyen: it's a feature of the language, "convention over configuration"
[19:25:53] yebyen: if something is used everywhere, it is considered a convention, and then you're new and you've never seen it before, and unfortunately this is inevitable too
[19:26:09] yebyen: you'll pick it up! don't be discouraged eindoofus
[19:26:33] Eindoofus: thanks :). i'll keep at it
[19:29:05] hobodave: has joined #RubyOnRails
[19:30:27] dionysus70: has joined #RubyOnRails
[19:35:44] ur5us: has joined #RubyOnRails
[19:39:52] gusrub: has joined #RubyOnRails
[19:43:08] hxegon: has joined #RubyOnRails
[19:44:35] Papierkorb: has joined #RubyOnRails
[19:50:21] ruby635: YAY I SOLVED IT!!!!!!!!!!
[19:50:24] ruby635: <p><%= link_to "file", @problem.picture.url if @problem.picture? %></p>
[20:00:48] mustmodify: has joined #RubyOnRails
[20:02:20] mustmodify: So I'm having a weird issue in my staging environment so I'm having to question my assumptions.
[20:02:29] mustmodify: When you precompile assets, where should they be put?
[20:05:00] adrianvalenz_: has joined #RubyOnRails
[20:05:28] adrianvalenz_: sevenseacat: I figured it out last night, don't know if you saw the last messages
[20:07:44] mustmodify: Ah ha! Stupd rake assets:precompile is failing and cap isn't showing it.
[20:12:37] Uranio: has joined #RubyOnRails
[20:13:11] marr: has joined #RubyOnRails
[20:17:04] Uranio: has left #RubyOnRails: ()
[20:19:07] cam27: has joined #RubyOnRails
[20:19:59] srinidhi: has joined #RubyOnRails
[20:21:32] xall: has joined #RubyOnRails
[20:26:52] lxsameer: has joined #RubyOnRails
[20:31:09] gusrub: has joined #RubyOnRails
[20:32:09] gusrub: has joined #RubyOnRails
[20:36:38] mustmodify: has left #RubyOnRails: ()
[20:46:04] timdotrb: has joined #RubyOnRails
[20:47:24] ResidentBiscuit: has joined #RubyOnRails
[20:49:11] timdotrb: has joined #RubyOnRails
[20:53:11] dionysus69: why is node_modules by default in gitignore?
[20:53:57] dionysus69: during deployment, I would be forced to manually yarn install on server
[20:54:09] dionysus69: i doubt capistrano has added support for yarn yet
[20:54:14] lupine: deployment is separate from development
[20:54:44] lupine: consider that artifacts compiled at developnment-time may well be incompatible with your production machines
[20:54:56] lupine: treat them as the separate stages that they are, build a nice pipeline, run with it
[20:56:02] dionysus69: ok I guess :D dont seem to have choice :)
[20:56:39] lupine: well, it's not like .gitignore is inviolate
[20:56:39] dionysus69: I wasn't going to remove node modules from gitignore as a note :P doesnt feel good x))
[20:56:50] lupine: but it's guiding you in the right direction this time
[20:59:10] S007: has joined #RubyOnRails
[21:08:27] ur5us: has joined #RubyOnRails
[21:10:28] AnotherOne: has joined #RubyOnRails
[21:17:51] uksio: has joined #RubyOnRails
[21:18:59] sonOfRa: has joined #RubyOnRails
[21:19:43] dionysus69: is it legit to use form for remote like this ? https://gist.github.com/anonymous/22bb44de7f59915c341abdee11536a1b for simple ajax request. I am not even sending any data to server, I just want to trigger send sms for example.
[21:20:19] dionysus69: hidden field a contains nothing, it just for the sake of satisfying required param in strong params
[21:23:43] gusrub: has joined #RubyOnRails
[21:37:42] kitsuneyo: has joined #RubyOnRails
[21:38:40] kitsuneyo: hi, i have another noob ruby question
[21:40:51] kitsuneyo: founded_place belongs to my Article model, and it has a column called formatted. how can i rewrite this code to make it simpler? - `founded_place.formatted if founded_place`
[21:48:26] quirkycoders: has joined #RubyOnRails
[21:49:17] cam27: has joined #RubyOnRails
[21:49:53] gambl0re: has joined #RubyOnRails
[22:02:12] woods: has left #RubyOnRails: ()
[22:07:38] nahtnam: has joined #RubyOnRails
[22:16:10] helpa: has joined #RubyOnRails
[22:16:45] cgfbee: has joined #RubyOnRails
[22:17:55] harfangk: has joined #RubyOnRails