« Back to channel list

#RubyOnRails - 27 December 2017

« Back 1 day Forward 1 day »
[00:04:44] alfiemax: has joined #RubyOnRails
[00:07:10] wethu: has joined #RubyOnRails
[00:10:23] my123: has joined #RubyOnRails
[00:25:52] mtkd: has joined #RubyOnRails
[00:32:41] amperry: I have a controller, traffics_controller.rb, that needs to build a few associations before it builds its model. I have some fields in a new traffic form that pertain to those associations, but I was wondering you namespace the fields. This gist might explain what I mean: https://gist.github.com/amp108/444605bf7dd4d90867f2c88f58642f0c
[00:33:01] amperry: "wondering you" = "wondering how you"
[00:39:33] one_zero: has joined #RubyOnRails
[00:49:34] sevenseacat: has joined #RubyOnRails
[01:10:11] srruby: has joined #RubyOnRails
[01:14:42] wethu: has joined #RubyOnRails
[01:29:16] _ritchie__: has joined #RubyOnRails
[01:48:32] srruby: Any regex experts? I'm getting a warning on this code, which was written in 2005: warning: character class has duplicated range: /[\/\s\*\.\-,;\/\\]+/
[01:52:29] amperry: srruby: I'm no expert, but it looks like you've got '\/' in there twice. Do you know why all of those symbols are escaped with the '\'?
[01:53:48] srruby: thanks! nope I don't know. probably I went overboard when I wrote the regex!
[01:54:00] amperry: it looks like you have a range that includes: a literal slash, space, a literal *, a literal ., a literal -, a comma, a semicolon, another literal slash, and a literal backslash.
[01:54:11] amperry: hope that helps
[01:54:52] amperry: rather, not a range, but a character class. Derp.
[02:13:49] pwnd_nsfw: Gotta love when people don't document cryptic ass stuff
[02:13:51] pwnd_nsfw: such as regex
[02:13:53] pwnd_nsfw: or perl code
[02:14:21] pwnd_nsfw: srruby, do you know what kind of data the regex is trying to match at least?
[02:14:48] srruby: bacterial strain textual definitions
[02:15:06] pwnd_nsfw: do you have a sample of data you know may work?
[02:15:42] srruby: Thanks pwnd_nsfw. I'll look into it later... I'm afraid to be yak shaving here.
[02:15:59] pwnd_nsfw: yak shaving... That's a new one lmao
[02:16:14] pwnd_nsfw: Is that a metaphor for wasting time?
[02:19:17] srruby: formally known as going down rat holes. HAHAHAHAH
[02:19:49] pwnd_nsfw: Well, if you know the data it's trying to get, rewrite the regex, AND DOCUMENT IT
[02:30:25] mtkd: has joined #RubyOnRails
[02:45:41] alfiemax: has joined #RubyOnRails
[02:56:16] Saukk: has joined #RubyOnRails
[02:56:57] nso95: has joined #RubyOnRails
[03:45:03] AnotherOne: has joined #RubyOnRails
[03:49:56] Cache_Money: has joined #RubyOnRails
[04:17:34] KeyJoo: has joined #RubyOnRails
[04:48:13] MrCrackPotBuilde: has joined #RubyOnRails
[04:51:59] sevenseacat: has joined #RubyOnRails
[05:24:27] christiandsg: has joined #RubyOnRails
[05:42:47] iamarun: has joined #RubyOnRails
[05:43:06] kn-928: has joined #RubyOnRails
[05:52:44] wethu: has joined #RubyOnRails
[05:54:27] darkhanb: has joined #RubyOnRails
[05:56:00] nso95: has joined #RubyOnRails
[06:03:59] fschuindt: has joined #RubyOnRails
[06:06:51] Dimik: has joined #RubyOnRails
[06:12:25] ghormoon: has joined #RubyOnRails
[06:38:53] iamarun: has joined #RubyOnRails
[06:53:29] someuser: has joined #RubyOnRails
[07:07:20] psychoslave: has joined #RubyOnRails
[07:12:01] t0adst00l: has joined #RubyOnRails
[07:12:02] prometheus_falli: has joined #RubyOnRails
[07:32:06] apeiros: has joined #RubyOnRails
[07:34:00] _aeris_: has joined #RubyOnRails
[07:45:53] Puffball: has joined #RubyOnRails
[07:49:52] jnollette: has joined #RubyOnRails
[07:51:24] dionysus69: has joined #RubyOnRails
[08:01:48] t0adst00l: has joined #RubyOnRails
[08:06:05] ur5us: has joined #RubyOnRails
[08:19:05] ur5us: has joined #RubyOnRails
[08:19:18] christiandsg: has joined #RubyOnRails
[08:34:11] psychoslave: has joined #RubyOnRails
[08:43:16] marr: has joined #RubyOnRails
[08:51:19] jnollette: has joined #RubyOnRails
[08:51:36] s2013: has joined #RubyOnRails
[09:04:39] DrYockel: has joined #RubyOnRails
[09:04:40] darkhanb: has joined #RubyOnRails
[09:06:01] fcser__: has joined #RubyOnRails
[09:07:01] darkhanb_: has joined #RubyOnRails
[09:13:31] supergeek: has joined #RubyOnRails
[09:14:34] DoubleMalt: has joined #RubyOnRails
[09:19:47] supergeek: has joined #RubyOnRails
[09:21:24] christiandsg: has joined #RubyOnRails
[09:41:02] iamarun: has joined #RubyOnRails
[09:42:27] iamarun: has joined #RubyOnRails
[09:45:00] iamarun: has joined #RubyOnRails
[09:46:04] iamarun: has joined #RubyOnRails
[09:47:17] iamarun: has joined #RubyOnRails
[09:48:26] iamarun: has joined #RubyOnRails
[10:05:36] mtkd: has joined #RubyOnRails
[10:11:40] Barrt: has joined #RubyOnRails
[10:20:24] Puffball: has joined #RubyOnRails
[10:56:06] Barrt: has joined #RubyOnRails
[10:56:29] SteenJobs: has joined #RubyOnRails
[11:02:04] iamarun: has joined #RubyOnRails
[11:06:57] kk: has joined #RubyOnRails
[11:07:02] kk: Hey guys
[11:08:41] kk: I need help combining active record object. I currently create a new object copy the attribute from one of the active records objects and merge the attributes of the other to this one. But the scopes only work on the original value of the array. Is there a simple way to fix this ? I dont want to save the merged object to the database
[11:08:59] kk: Sorry for that attempt at english
[11:10:34] mikecmpbll: has joined #RubyOnRails
[11:19:08] s2013: has joined #RubyOnRails
[11:35:57] apeiros__: has joined #RubyOnRails
[11:57:54] mostlybadfly: has joined #RubyOnRails
[12:01:10] gambl0re: has joined #RubyOnRails
[12:02:14] apeiros: has joined #RubyOnRails
[12:04:13] apeiros__: has joined #RubyOnRails
[12:10:25] jottr: has joined #RubyOnRails
[12:18:34] jnollette: has joined #RubyOnRails
[12:20:19] jottr: has joined #RubyOnRails
[12:23:45] jottr: has joined #RubyOnRails
[12:41:06] _ritchie_: has joined #RubyOnRails
[12:41:59] koneko: has joined #RubyOnRails
[12:49:07] jottr_: has joined #RubyOnRails
[12:49:54] wethu: has joined #RubyOnRails
[12:54:57] alfiemax: has joined #RubyOnRails
[12:54:59] anotherone2: has joined #RubyOnRails
[13:02:23] KeyJoo: has joined #RubyOnRails
[13:10:43] IanMalcolm: has joined #RubyOnRails
[13:25:56] fschuindt: has joined #RubyOnRails
[13:31:11] s2013: has joined #RubyOnRails
[13:36:08] jottr_: has joined #RubyOnRails
[13:47:21] alfiemax: has joined #RubyOnRails
[13:56:01] desperek: has joined #RubyOnRails
[13:57:36] arBmind: has joined #RubyOnRails
[14:24:02] egray: has joined #RubyOnRails
[14:24:38] apeiros: has joined #RubyOnRails
[14:32:34] mtkd: has joined #RubyOnRails
[14:35:17] srinidhi: has joined #RubyOnRails
[14:38:05] za1b1tsu: has joined #RubyOnRails
[14:39:42] DrYockel: has joined #RubyOnRails
[14:51:45] alfiemax: has joined #RubyOnRails
[15:08:27] arBmind: has joined #RubyOnRails
[15:14:17] kn-928: has joined #RubyOnRails
[15:15:08] _ritchie_: has joined #RubyOnRails
[15:34:57] lxsameer: has joined #RubyOnRails
[15:37:39] alfiemax: has joined #RubyOnRails
[15:41:24] iamarun: has joined #RubyOnRails
[16:15:27] hahuang65: has joined #RubyOnRails
[16:23:41] bga57: has joined #RubyOnRails
[16:27:07] troys: has joined #RubyOnRails
[16:28:38] Barrt: has joined #RubyOnRails
[16:36:38] mtkd: has joined #RubyOnRails
[16:45:05] Saukk: has joined #RubyOnRails
[16:50:10] arBmind: has joined #RubyOnRails
[17:04:02] apeiros: has joined #RubyOnRails
[17:06:02] dviola: has joined #RubyOnRails
[17:07:50] mmoll: has joined #RubyOnRails
[17:08:13] mmoll: https://git.io/vbd6c is leading to "You tried to define a scope named "without" on the model "TaxableTaxonomy", but ActiveRecord::Relation already defined an instance method with the same name." with current rails master.
[17:08:16] mmoll: But I can't find a "without" method in the rails or arel sources, anybody got a hint on that?
[17:09:12] one_zero: has joined #RubyOnRails
[17:22:12] mr_foto: has joined #RubyOnRails
[17:25:44] one_zero: has joined #RubyOnRails
[17:27:12] apeiros: has joined #RubyOnRails
[17:27:53] apeiros: has joined #RubyOnRails
[17:32:01] apeiros: has joined #RubyOnRails
[17:37:08] J4ck_4l0n3: has joined #RubyOnRails
[17:37:25] J4ck_4l0n3: i have some problems installing rails gem
[17:37:57] J4ck_4l0n3: i also have downloaded ruby headers files, but nothing
[17:38:09] reber: has joined #RubyOnRails
[17:39:09] J4ck_4l0n3: says an extension failed to compile
[17:41:31] apeiros: "an extension" - you realize there's literally thousands? do you wish we just guess or that we provide information on *all* extensions on *all* platforms?
[17:41:48] apeiros: alternatively you could of course also just narrow things down for us :)
[17:42:08] apeiros: like: gist the exact error you get, tell us what platform, how you installed rails etc.
[17:42:55] J4ck_4l0n3: i installed rails by typing "gem install rails"
[17:43:31] J4ck_4l0n3: installed on termux emulator (android 5.0.1)
[17:50:08] amperry: has joined #RubyOnRails
[17:56:14] dionysus69: has joined #RubyOnRails
[18:13:36] Jayson_Virissimo: has joined #RubyOnRails
[18:13:43] Exagone313: has joined #RubyOnRails
[18:30:08] nogic: has joined #RubyOnRails
[18:30:57] zwliew: has joined #RubyOnRails
[18:41:46] mtkd: has joined #RubyOnRails
[18:59:46] Cache_Money: has joined #RubyOnRails
[19:03:57] tcopeland: mmoll: it’s in activesupport
[19:03:58] tcopeland: >> Book.send(:relation).method(:without).source_location
[19:03:59] tcopeland: => ["/Users/tomcopeland/github.com/rails/activesupport/lib/active_support/core_ext/enumerable.rb", 98]
[19:05:35] sameerynho: has joined #RubyOnRails
[19:18:00] w0rd-driven: has joined #RubyOnRails
[19:20:00] Exagone313: has joined #RubyOnRails
[19:21:57] LateralO1: has joined #RubyOnRails
[19:27:11] jottr_: has joined #RubyOnRails
[19:29:01] noocx: has joined #RubyOnRails
[19:30:46] noocx: do you know a form helper or something to easly combine a select tag with an input tag?
[19:31:08] noocx: using select for existing data and input field for new data
[19:31:43] _ritchie_: has joined #RubyOnRails
[19:32:08] mostlybadfly: has joined #RubyOnRails
[19:37:26] tycoon177: has joined #RubyOnRails
[19:37:28] jlpeters: has joined #RubyOnRails
[19:37:59] Dimik: has joined #RubyOnRails
[19:40:01] Lloyd: has joined #RubyOnRails
[19:40:23] iamdevnul: has joined #RubyOnRails
[19:41:08] Hosh: has joined #RubyOnRails
[19:41:25] doesntbyte: has joined #RubyOnRails
[19:41:38] dmcc: has joined #RubyOnRails
[19:41:51] dmnd: has joined #RubyOnRails
[19:42:14] newton: has joined #RubyOnRails
[19:42:23] nickenchuggets: has joined #RubyOnRails
[19:42:42] Travis-42: has joined #RubyOnRails
[19:42:49] amperry: noocx: if you find out, tell me. I basically had to create a radio button, a hidden div, and some js to show one or the other other depending on what button was clicked.
[19:43:03] jottr: has joined #RubyOnRails
[19:43:04] wsmoak: has joined #RubyOnRails
[19:43:12] justinweiss: has joined #RubyOnRails
[19:43:16] pro777: has joined #RubyOnRails
[19:43:30] ecook: has joined #RubyOnRails
[19:43:59] fearoffish: has joined #RubyOnRails
[19:44:24] auv: has joined #RubyOnRails
[19:44:33] dnyy: has joined #RubyOnRails
[19:44:36] r3my: has joined #RubyOnRails
[19:44:42] noocx: amperry: ok i will
[19:44:44] pfg: has joined #RubyOnRails
[19:45:01] joycepao: has joined #RubyOnRails
[19:45:25] nOgAnOo: has joined #RubyOnRails
[19:45:45] tejasmanohar: has joined #RubyOnRails
[19:46:25] cardoni: has joined #RubyOnRails
[19:46:32] micmus: has joined #RubyOnRails
[19:46:39] jxf: has joined #RubyOnRails
[19:47:07] Kamuela: has joined #RubyOnRails
[19:47:17] swgillespie: has joined #RubyOnRails
[19:49:15] lxkm: has joined #RubyOnRails
[19:49:35] DukeDave: has joined #RubyOnRails
[19:51:48] mattwc: has joined #RubyOnRails
[19:51:55] HalcyonicStorm: has joined #RubyOnRails
[19:53:20] lipoqil: has joined #RubyOnRails
[19:53:45] spastorino: has joined #RubyOnRails
[19:54:20] craysiii: has joined #RubyOnRails
[19:54:24] manveru: has joined #RubyOnRails
[19:55:25] mmun: has joined #RubyOnRails
[19:59:03] noocx: amperry: its maybe better, but still looking for a rails plugin or something:
[19:59:06] noocx: https://stackoverflow.com/questions/18309059/drop-down-menu-text-field-in-one
[20:00:00] amperry: cool, thanks
[20:00:11] zwliew: has joined #RubyOnRails
[20:04:03] jottr_: has joined #RubyOnRails
[20:06:48] mmoll: tcopeland: ah, there, thanks! :)
[20:07:57] mmoll: tcopeland++ for the PR ;)
[20:12:47] jottr: has joined #RubyOnRails
[20:22:21] talntid: has joined #RubyOnRails
[20:22:32] talntid: Any ruby people here from Austin, TX area? Hows the ruby market around there? Thinking of expanding my business in that area, because not enough Ruby devs in my area...
[20:22:36] talntid: might do Salt Lake City also, so same question there...
[20:26:01] reber: has joined #RubyOnRails
[20:26:05] kies: has joined #RubyOnRails
[20:27:03] jnollette: has joined #RubyOnRails
[20:29:58] NoGodDamnIdea: has joined #RubyOnRails
[20:30:09] ur5us: has joined #RubyOnRails
[20:33:33] koneko: has joined #RubyOnRails
[20:54:25] jottr_: has joined #RubyOnRails
[21:16:15] blindMoe: has joined #RubyOnRails
[21:16:58] blindMoe: Is there a way to get the hostname of the server that rails is running on? I would like to get what would normally be stored in request.host but since my app is proxied through another app it returns the host of the proxy app and not the server my app is running on
[21:22:13] fryguy: blindmoe: Socket.gethostname
[21:22:49] blindMoe: fryguy: thanks I will
[21:23:50] blindMoe: fryguy: kinda closer but it isn't 100% fool proof.. I think I need to work more with the request that is being sent from the proxy
[21:24:01] fryguy: work with what?
[21:24:10] fryguy: have the proxy add a request header then
[21:27:28] tfitts: has joined #RubyOnRails
[21:28:02] maciuszek: has joined #RubyOnRails
[21:28:03] HashNuke: has joined #RubyOnRails
[21:28:04] daxroc: has joined #RubyOnRails
[21:28:54] amperry: Anyone know how to get Google Explor... Chrome to respect the autocomplete="off" setting for a form input?
[21:29:37] blindMoe: amperry: I believe you have to put that attribute on the actual <form> tag instead of the input for some browsers to respect it. Chrome may be one of those browsers
[21:29:45] amperry: they basically ignore it if it's name, email, or phone field.
[21:30:17] amperry: blindmoe: I think I tried that before, but let me see if I can fiddle with it.
[21:30:44] amperry: I was actually hoping I could put it in the form tag so I *didn't* have to put it in every input.
[21:32:12] podman: has joined #RubyOnRails
[21:33:05] amperry: blindmoe: nope, no luck, unless this is somehow wrong: "nested_form_for(@traffic, html: {autocomplete: 'off'}) do |f|"
[21:34:03] amperry: Google recommends adding a "semantic" value to your autocomplete, because the semantics of the word "off" are apparently too hard to grasp.
[21:37:04] amperry: and if I have an entry that uses, e.g., a :first_name, chrome will ignore whatever "semantic" value I put because it will see the name, id, or label of "first_name"
[21:38:16] blindMoe: fryguy: looks like request.env['SERVER_NAME'] works in this case.. it returns the proper server hostname and not the proxy site's hostname like request.host does
[21:39:26] blindMoe: err sorry meant HTTP_HOST not SERVER_NAME .. although server name works in most instances as well
[21:43:11] tcopeland: mmoll: cool you bet!
[21:50:01] jottr: has joined #RubyOnRails
[21:50:52] arBmind: has joined #RubyOnRails
[21:52:20] orbyt_: has joined #RubyOnRails
[22:02:52] alfiemax: has joined #RubyOnRails
[22:03:27] jobewan: has joined #RubyOnRails
[22:05:30] jottr: has joined #RubyOnRails
[22:11:51] thedarkgriffen: has joined #RubyOnRails
[22:19:49] dviola: has joined #RubyOnRails
[22:25:26] DoubleMalt: has joined #RubyOnRails
[22:25:39] darkhanb: has joined #RubyOnRails
[22:32:26] thedarkgriffen: has joined #RubyOnRails
[22:34:26] thedarkgriffen: has joined #RubyOnRails
[22:37:02] jobewan: has joined #RubyOnRails
[22:43:13] alfiemax: has joined #RubyOnRails
[23:02:07] jobewan: has joined #RubyOnRails
[23:24:27] mtkd: has joined #RubyOnRails
[23:32:08] pavelz: hi. i have a q, in engine.rb part of gem there is config.paths['app/models'] << 'lib/models' / does this updates paths so BY-convention rails will search in gem/lib/models too for model descriptions or what is the meaning?
[23:32:35] pavelz: this is rails engines question / rails paths config i guess.
[23:33:08] AntiSpamMeta: has joined #RubyOnRails
[23:33:50] orbyt_: has joined #RubyOnRails
[23:36:18] jobewan: has joined #RubyOnRails
[23:41:23] JusticeFries: has joined #RubyOnRails
[23:43:00] gambl0re: has joined #RubyOnRails
[23:44:25] alfiemax: has joined #RubyOnRails
[23:52:10] fschuindt: has joined #RubyOnRails