« Back to channel list

#RubyOnRails - 03 July 2019

« Back 1 day Forward 1 day »
[00:00:57] orbyt_: has joined #RubyOnRails
[00:09:12] emptyfl4sk: has joined #RubyOnRails
[00:32:37] AlHafoudh: has joined #RubyOnRails
[00:48:10] atrius: has joined #RubyOnRails
[00:57:11] Dr_MDMA_MD: has joined #RubyOnRails
[01:04:54] emptyfl4sk: has joined #RubyOnRails
[01:45:54] NeXTSUN: has joined #RubyOnRails
[01:46:51] _dbugger: has joined #RubyOnRails
[02:00:36] CrackPotBob: has joined #RubyOnRails
[02:07:09] Saukk: has joined #RubyOnRails
[02:23:09] duderonomy: has joined #RubyOnRails
[02:42:41] AlHafoudh: has joined #RubyOnRails
[02:56:47] Dr_MDMA_MD: has joined #RubyOnRails
[02:58:46] r0ph: has joined #RubyOnRails
[03:06:17] emptyfl4sk: has joined #RubyOnRails
[03:08:48] Technodrome: has joined #RubyOnRails
[03:09:54] braincrash: has joined #RubyOnRails
[03:18:19] tdy: has joined #RubyOnRails
[03:42:41] emptyfl4sk: has joined #RubyOnRails
[04:53:22] AlHafoudh: has joined #RubyOnRails
[04:54:41] Norrin: wow i remember when this channel averaged between 1000 and 2000 users
[04:59:38] havenwood: Norrin: These days, 2000 would be the largest channel on irc.
[05:00:08] havenwood: https://xkcd.com/1782/
[05:02:07] Norrin: geez even like dalnet / rizon.net?
[05:02:22] havenwood: ¯\_(ツ)_/¯
[05:02:26] Norrin: haven't been on those in like 1.5 decade....
[05:02:55] Norrin: i guess undernet was big for a while
[05:17:48] conta: has joined #RubyOnRails
[05:18:14] alxgsv: has joined #RubyOnRails
[05:44:10] emptyfl4sk: has joined #RubyOnRails
[05:55:19] sandstrom: has joined #RubyOnRails
[06:04:40] ariedler: has joined #RubyOnRails
[06:08:14] schne1der: has joined #RubyOnRails
[06:22:37] emptyfl4sk: has joined #RubyOnRails
[06:25:57] hellekin: has joined #RubyOnRails
[06:29:03] dionysus69: has joined #RubyOnRails
[06:30:09] shenghi: has joined #RubyOnRails
[06:52:00] hd1: has joined #RubyOnRails
[06:53:20] hd1: anyone able to build therubyracer under FreeBSD?
[06:54:14] AlHafoudh: has joined #RubyOnRails
[07:04:59] lxsameer: has joined #RubyOnRails
[07:05:14] srinidhi: has joined #RubyOnRails
[07:10:02] schne1der: has joined #RubyOnRails
[07:22:29] AlHafoudh: has joined #RubyOnRails
[07:32:06] dionysus69: has joined #RubyOnRails
[07:33:57] deepreds1: has joined #RubyOnRails
[07:45:09] NL3limin4t0r: has joined #RubyOnRails
[07:52:15] jacksop: has joined #RubyOnRails
[07:57:29] ZAJDAN: how to use CGI in Rails?...same as in Ruby?
[08:00:30] deepreds1: has joined #RubyOnRails
[08:05:23] ariedler: has joined #RubyOnRails
[08:06:18] deepreds1: has joined #RubyOnRails
[08:11:00] Ergo: has joined #RubyOnRails
[08:24:01] emptyfl4sk: has joined #RubyOnRails
[08:58:59] emptyfl4sk: has joined #RubyOnRails
[09:41:42] ZAJDAN: what is the right way to return html for AJAX request?
[09:52:11] lato_1: has joined #RubyOnRails
[09:53:49] Dbugger: has joined #RubyOnRails
[10:00:37] _dbugger: has joined #RubyOnRails
[10:00:52] mikecmpbll: has joined #RubyOnRails
[10:03:37] AlHafoudh: has joined #RubyOnRails
[10:06:16] ariedler: has joined #RubyOnRails
[10:13:42] AlHafoudh: has joined #RubyOnRails
[10:27:26] conta: has joined #RubyOnRails
[10:30:51] AlHafoudh: has joined #RubyOnRails
[10:43:01] AlHafoudh: has joined #RubyOnRails
[10:55:07] ariedler: has joined #RubyOnRails
[10:56:44] conta: has joined #RubyOnRails
[11:00:55] jarr0dsz: has joined #RubyOnRails
[11:00:57] emptyfl4sk: has joined #RubyOnRails
[11:01:15] jarr0dsz: hello everyone, is rails 6 rc1 stable enough to use in production or is this not advisable?
[11:01:28] lankanmon: has joined #RubyOnRails
[11:01:56] jarr0dsz: i have upgraded basically to 6 and want to have a Product model use another database ( not using read/write copies of db) is it possible to connect to just a product_development database from a model Product?
[11:02:30] jarr0dsz: I red the documentation on multiverse and migrated from that to rails 6 but i find it a bit unclear on how to proceed, everywhere the read/write database replication is used in examples And i only want to connect a different db
[11:10:21] ZAJDAN: Iam using still 5.2.3
[11:11:01] ZAJDAN: format.html { render html: "@diretcory @files" } ...I can not find a way how to render html content which is inside the variables
[11:11:41] jarr0dsz: so is there a writeup / documentation on connecting to single different databsae instead of replica? i cannot find anything so far
[11:11:48] jarr0dsz: only replicas is mentioned in every blog post
[11:24:46] ZAJDAN: I figured it out: format.html { render html: "#@startul #@directory #@files #@endtul".html_safe }
[11:32:12] madsj: has joined #RubyOnRails
[11:32:40] emptyfl4sk: has joined #RubyOnRails
[12:08:53] conta: has joined #RubyOnRails
[12:28:29] conta: has joined #RubyOnRails
[12:58:11] Vaevictus: jarr0dsz: ActiveResource might fit your needs
[13:15:26] NL3limin4t0r: jarr0dsz: You don't need the newest rails for that. Have a look at: https://stackoverflow.com/q/17311199/3982562
[13:15:31] dviola: has joined #RubyOnRails
[13:20:34] al-damiri: has joined #RubyOnRails
[13:34:08] emptyfl4sk: has joined #RubyOnRails
[13:53:48] srinidhi: has joined #RubyOnRails
[13:59:30] srinidhi: has joined #RubyOnRails
[14:10:12] emptyfl4sk: has joined #RubyOnRails
[14:10:26] jarr0dsz: thank you NL3limin4t0r its not easily possible with ralis 5
[14:10:39] jarr0dsz: rails 6 i mean anyway? instead of replicating just connect to single other db from model?
[14:21:42] brool: has joined #RubyOnRails
[14:21:54] Ryanar: has joined #RubyOnRails
[14:26:43] Inside: has joined #RubyOnRails
[14:26:56] conta: has joined #RubyOnRails
[14:49:09] ZAJDAN: when I render page/partials via AJAX....it brakes some JS function.....is somehow possible force reload JS ?
[14:54:43] NL3limin4t0r: ZAJDAN: You probably mean mean some "onclick" handlers. The reason that it breaks is because the events aren't set on the newly loaded HTML. You can solve this by using event delegation. Set the handler on something closer to the root (document) and let the events bubble up.
[14:55:22] NL3limin4t0r: https://api.jquery.com/on/#direct-and-delegated-events
[14:56:09] schne1der: has joined #RubyOnRails
[14:57:17] NL3limin4t0r: Alternatively you could have a success callback that sets the events for the newly loaded content.
[14:57:23] ZAJDAN: NL: exactlly...'onclick' it is in my case
[14:59:36] NL3limin4t0r: $("#remote-content").load("/remote/path", function () { $("remote-content li").on("click", do_something) })
[15:00:09] NL3limin4t0r: ^ Is an example of the latter.
[15:00:17] orbyt_: has joined #RubyOnRails
[15:01:41] srinidhi: has joined #RubyOnRails
[15:02:58] NL3limin4t0r: Event delegation would be something like: `$("remote-content").on("click", "li", do_something)`
[15:03:28] NL3limin4t0r: Even if you load new data into #remote-content it should still handle those events.
[15:04:15] NL3limin4t0r: $("remote-content") should be $("#remote-content") obviously (typo)
[15:06:17] ZAJDAN: okok...but probably is not possible delegete it on a class: `$("remote-content").on("click", ".someclass", do_something)`
[15:06:49] NL3limin4t0r: That is also possible.
[15:08:18] NL3limin4t0r: Keep in mind that this assumes that only the content of `$("#remote-content")` is loaded through AJAX. If `$("#remote-content")` itself is replaced this wouldn't work.
[15:08:47] ZAJDAN: this is my current version: $(".Commission.A").on("click", function() { ...
[15:12:36] NL3limin4t0r: Look at the parent elments that `.Commission.A` has and pick one that isn't loaded by AJAX. You could always set it on the document itself if you want to, but the closer you can get the better. `$(document).on("click", ".Commission.A", ...)`
[15:14:07] ZAJDAN: solved: $("#content-block1").on("click", ".Commission", function() {
[15:14:18] ZAJDAN: NL3: thank YOu
[15:16:11] NL3limin4t0r: The reason why setting it on `document` is a bad idea is because it then captures all the click elements in the entire document and needs to check if the target matches with the selector provided.
[15:16:24] NL3limin4t0r: click events*
[15:18:36] ZAJDAN: NL3: are YOu from Netherland?
[15:22:57] NL3limin4t0r: the Netherlands*
[15:27:16] Saukk: has joined #RubyOnRails
[15:29:08] ZAJDAN: as young boy I had favorite DJ from Your country 'miss DJAX' :_)
[15:29:19] NL3limin4t0r: I normally leave the NL out of my username, but IRC doesn't like usernames starting with a number.
[15:30:07] ZAJDAN: You live in very nice country..Iam from czech republic
[15:31:27] srinidhi: has joined #RubyOnRails
[15:33:43] Net: any idea why setting config.force_ssl = true would cause this error in url helpers?
[15:33:44] Net: ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
[15:37:13] NL3limin4t0r: I can't help you with the "why". At least the error is pretty explanitory in what you have to do. https://stackoverflow.com/q/7219732/3982562
[15:38:20] Net: NL3limin4t0r: yeah
[15:38:38] Net: the curious part is I don't seem to need to set host without config.force_ssl = true
[15:40:02] orbyt_: has joined #RubyOnRails
[15:40:42] NL3limin4t0r: ¯\_(ツ)_/¯ It might have something to do with signing the certificate.
[15:44:00] Net: is it okay to set Rails.application.routes.default_url_options[:host] = _ in config/environement/production.rb?
[15:47:33] Sylario: has joined #RubyOnRails
[15:49:37] NL3limin4t0r: Environment related settings should go in the config/environement/«environment».rb so depending on your needs it might or might not belong in production.rb
[15:54:00] Net: NL3limin4t0r: thanks, should I put it outside the Rails.application.config block?
[15:54:07] Net: er, Rails.application.configure
[15:55:05] srinidhi: has joined #RubyOnRails
[15:57:31] NL3limin4t0r: Net: That is just personal preference. I would personally put it in the #configure block.
[15:57:53] Net: even though it doesn't call #config?
[15:57:54] Net: thanks!
[15:59:39] NL3limin4t0r: Net: I thought we where talking about `config.action_mailer.default_url_options` setting. But Even if you want to set `Rails.application.routes.default_url_options` I would probably do it in the block.
[15:59:48] Net: cool, thanks
[16:04:33] duderonomy: has joined #RubyOnRails
[16:14:06] emptyfl4sk: has joined #RubyOnRails
[16:16:59] duderonomy: has joined #RubyOnRails
[16:17:49] gambl0r3: has joined #RubyOnRails
[16:18:38] snowy: has joined #RubyOnRails
[16:28:35] duderonomy: has joined #RubyOnRails
[16:30:49] catbusters: has joined #RubyOnRails
[16:46:26] orbyt_: has joined #RubyOnRails
[17:05:58] conta: has joined #RubyOnRails
[17:14:37] duderonomy: has joined #RubyOnRails
[17:18:12] sandstrom: has joined #RubyOnRails
[17:22:41] srinidhi: has joined #RubyOnRails
[17:28:32] uksio: has joined #RubyOnRails
[17:34:06] conta: has joined #RubyOnRails
[17:51:58] alxgsv: has joined #RubyOnRails
[18:24:40] MrCrackPotBuilde: has joined #RubyOnRails
[18:40:10] kurko_: has joined #RubyOnRails
[19:39:37] sandstrom: has joined #RubyOnRails
[19:51:04] jarr0dsz: has joined #RubyOnRails
[19:51:24] jarr0dsz: hello everyone im loading database seeds and end up non complete rows in my datavs=
[19:52:09] jarr0dsz: the issie is I have after_initialize :default_associations in my model that creates the associated models ,for example student and student_profile
[19:56:18] jarr0dsz: quick copy from my models to illustrate: https://gist.github.com/michaelsalexander83/fc905f6d74022bbc5960b215db80bda1
[19:56:41] jarr0dsz: how would one solve this problem? removing the method from my student model prevents the associated models created, and if i leave them in the seeds will create double entry in db :(
[20:04:54] jarr0dsz: no rails experts now a way around?
[20:09:13] LtHummus: has joined #RubyOnRails
[20:29:23] hive-mind: has joined #RubyOnRails
[20:36:39] gambl0r3: has joined #RubyOnRails
[20:38:37] deepreds1: has joined #RubyOnRails
[20:39:35] GodFather: has joined #RubyOnRails
[20:41:28] jarr0dsz: has joined #RubyOnRails
[20:41:49] jarr0dsz: quick copy from my models to illustrate: https://gist.github.com/michaelsalexander83/fc905f6d74022bbc5960b215db80bda1 has any ruby expert a suggestion how i could fix this?
[20:42:19] jarr0dsz: the problem is im not able to seed + have my model create association on initializing, i end up with incomplete rows in my db
[20:43:50] simonista: has joined #RubyOnRails
[21:00:41] jarr0dsz: anyone an idea how i could resolve the empty rows in db with seeds and associations?
[21:01:46] ur5us: has joined #RubyOnRails
[21:27:02] Fernando-Basso: has joined #RubyOnRails
[22:02:39] emptyfl4sk: has joined #RubyOnRails
[22:15:36] orbyt_: has joined #RubyOnRails
[22:22:26] blindMoe: has joined #RubyOnRails
[22:45:59] RiPuk: has joined #RubyOnRails
[23:36:16] dviola: has joined #RubyOnRails
[23:37:16] DTZUZO: has joined #RubyOnRails