« Back to channel list

#RubyOnRails - 05 July 2017

« Back 1 day Forward 1 day »
[00:03:37] nertzy: has joined #RubyOnRails
[00:07:55] jhfisc: has joined #RubyOnRails
[00:13:17] jhfisc: has joined #RubyOnRails
[00:15:15] xiljin: has joined #RubyOnRails
[00:15:46] umaaji: has joined #RubyOnRails
[00:18:11] jhfisc: has joined #RubyOnRails
[00:21:44] jhfisc: has joined #RubyOnRails
[00:30:53] wethu: has joined #RubyOnRails
[00:32:22] jhfisc: has joined #RubyOnRails
[00:44:41] jhfisc: has joined #RubyOnRails
[00:49:52] jhfisc: has joined #RubyOnRails
[00:55:22] sevenseacat: has joined #RubyOnRails
[01:05:54] jhfisc: has joined #RubyOnRails
[01:16:05] jhfisc: has joined #RubyOnRails
[01:20:42] jhfisc: has joined #RubyOnRails
[01:26:29] corro: has joined #RubyOnRails
[01:29:05] Rodya_: has joined #RubyOnRails
[01:29:57] jhfisc: has joined #RubyOnRails
[01:35:42] jhfisc: has joined #RubyOnRails
[01:40:31] jhfisc: has joined #RubyOnRails
[01:41:18] ascarter: has joined #RubyOnRails
[01:45:44] jhfisc: has joined #RubyOnRails
[01:50:52] jhfisc: has joined #RubyOnRails
[01:54:25] jhfisc: has joined #RubyOnRails
[02:01:22] Jameser: has joined #RubyOnRails
[02:02:51] irishfromua: has joined #RubyOnRails
[02:06:03] fschuindt: has joined #RubyOnRails
[02:09:26] jhfisc: has joined #RubyOnRails
[02:17:43] jhfisc: has joined #RubyOnRails
[02:18:28] quazimodo: has joined #RubyOnRails
[02:28:21] jhfisc: has joined #RubyOnRails
[02:29:15] unreal: has joined #RubyOnRails
[02:34:16] jhfisc: has joined #RubyOnRails
[02:42:39] ascarter: has joined #RubyOnRails
[02:46:50] jhfisc: has joined #RubyOnRails
[02:52:28] jhfisc: has joined #RubyOnRails
[02:57:47] Saukk: has joined #RubyOnRails
[03:00:10] Jameser: has joined #RubyOnRails
[03:02:40] knight33: has joined #RubyOnRails
[03:14:40] jhfisc: has joined #RubyOnRails
[03:17:08] tofutoon: has left #RubyOnRails: ()
[03:18:21] S1kx: has joined #RubyOnRails
[03:18:35] brent__: has joined #RubyOnRails
[03:23:06] jhfisc: has joined #RubyOnRails
[03:29:20] jhfisc: has joined #RubyOnRails
[03:32:19] Jameser: has joined #RubyOnRails
[03:43:40] ascarter: has joined #RubyOnRails
[03:59:48] jhfisc: has joined #RubyOnRails
[04:11:44] jhfisc: has joined #RubyOnRails
[04:19:07] umaaji: has joined #RubyOnRails
[04:23:45] jhfisc: has joined #RubyOnRails
[04:27:54] sevenseacat: has joined #RubyOnRails
[04:31:31] umaaji: has joined #RubyOnRails
[04:31:35] jhfisc: has joined #RubyOnRails
[04:32:03] quazimodo: has joined #RubyOnRails
[04:36:55] jhfisc: has joined #RubyOnRails
[04:41:18] Rodya_: has joined #RubyOnRails
[04:42:47] jhfisc: has joined #RubyOnRails
[04:44:52] ascarter: has joined #RubyOnRails
[05:31:56] ur5us: has joined #RubyOnRails
[05:33:36] yoongkang: has joined #RubyOnRails
[05:39:26] jhfisc: has joined #RubyOnRails
[05:42:13] fschuindt1: has joined #RubyOnRails
[05:44:35] fschuindt2: has joined #RubyOnRails
[05:48:35] jhfisc: has joined #RubyOnRails
[05:54:23] jhfisc: has joined #RubyOnRails
[06:03:58] xall: has joined #RubyOnRails
[06:08:08] Pumukel: has joined #RubyOnRails
[06:18:41] jhfisc: has joined #RubyOnRails
[06:24:43] srinidhi: has joined #RubyOnRails
[06:29:39] jhfisc: has joined #RubyOnRails
[06:41:00] Technodrome: has joined #RubyOnRails
[06:41:29] jhfisc: has joined #RubyOnRails
[06:47:03] jhfisc: has joined #RubyOnRails
[06:49:55] dionysus69: has joined #RubyOnRails
[06:58:05] jhfisc: has joined #RubyOnRails
[07:05:37] dionysus69: hey dminuoso :) so I am successfully utilizing the ajax request cycle you showed me, I just have one question about sending ready html with json versus sending just data and then using javascript to put the data where it is needed.
[07:07:45] dionysus69: the second method requires more work, that's why I wonder if it's theoretically justifiable to send html with json and then just append that json key to some dom element instead of getting data and then using lots of jquery to format it and render it at needed places.
[07:08:23] dminuoso: dionysus69: Sure.
[07:08:58] dionysus69: ok sounds good :D
[07:08:59] dminuoso: dionysus69: Ultimately there is no right and wrong. If you remember, matthewd himself considers the js.erb pattern quite valid.
[07:09:43] dionysus69: so far json ajax.done pattern seems neater
[07:09:46] sevenseacat: yeah well, matthewd is wrong <_<
[07:10:33] matthewd: It's not exactly the first thing I'd reach for... but valid, yes
[07:11:43] jhfisc: has joined #RubyOnRails
[07:12:20] dminuoso: dionysus69: The advantage of providing raw JSON is that allows other users to interact with the API directly more easily.
[07:12:58] dionysus69: not dealing with that kind of scenario but ye I agree, would be useful in that case of course
[07:12:59] dminuoso: dionysus69: If you don't want or need that for some or all endpoints, then it's fine to produce html partials. This could enable you to still make use of things like form helpers (e.g. simple_form)
[07:13:55] dionysus69: still sticking with the stock form helper :)
[07:14:36] dminuoso: dionysus69: Yeah, same story still. If you use html partials rather than pure json you can use those still. :)
[07:16:07] dionysus69: so I am sending options to select tag from another select tag, in this form
[07:16:19] dionysus69: option = "<option value='#{id}'>#{name}</option>"
[07:16:44] dionysus69: options += option for a loop and then passing options to json key
[07:16:56] dionysus69: then just appending that json key to select tag
[07:17:20] dionysus69: looks ugly but couldn't think of another way :D if there is let me know please :D :)
[07:17:38] dminuoso: dionysus69: Im also a bit biased, since I have a pure react frontend, so Im forced to use JSON. ;-)
[07:19:01] brent__: has joined #RubyOnRails
[07:20:37] dionysus69: I am for using pure json apis, it's cool for api to be client agnostic, but I guess that would be useful in case there is a use for it in a project :) right now I am working on project that company will use only on localhost :D but still good to know a proper structure, in case one builds a scalable project
[07:22:35] jhfisc: has joined #RubyOnRails
[07:28:52] jhfisc: has joined #RubyOnRails
[07:31:32] jhfisc: has joined #RubyOnRails
[07:44:37] jhfisc: has joined #RubyOnRails
[07:52:35] ych: has joined #RubyOnRails
[07:53:05] mikecmpbll: has joined #RubyOnRails
[07:54:12] srinidhi: has joined #RubyOnRails
[07:54:53] shotbug: has joined #RubyOnRails
[07:54:59] shotbug: has joined #RubyOnRails
[07:58:28] jhfisc: has joined #RubyOnRails
[08:00:34] Ergo: has joined #RubyOnRails
[08:02:52] srinidhi: has joined #RubyOnRails
[08:14:39] jhfisc: has joined #RubyOnRails
[08:16:59] srinidhi: has joined #RubyOnRails
[08:17:28] jhfisc: has joined #RubyOnRails
[08:27:53] jhfisc: has joined #RubyOnRails
[08:32:04] S1kx: has joined #RubyOnRails
[08:32:26] Sylario: has joined #RubyOnRails
[08:38:29] jhfisc: has joined #RubyOnRails
[08:41:26] lxsameer: has joined #RubyOnRails
[08:43:16] xall: has joined #RubyOnRails
[08:44:44] jhfisc: has joined #RubyOnRails
[08:52:28] jhfisc: has joined #RubyOnRails
[08:58:18] jhfisc: has joined #RubyOnRails
[09:07:57] ur5us: has joined #RubyOnRails
[09:11:12] workmad3: has joined #RubyOnRails
[09:14:09] jhfisc: has joined #RubyOnRails
[09:35:45] jhfisc: has joined #RubyOnRails
[09:36:32] waseem_: has joined #RubyOnRails
[09:41:29] jhfisc: has joined #RubyOnRails
[09:43:22] marr: has joined #RubyOnRails
[09:46:40] jhfisc: has joined #RubyOnRails
[09:50:06] mikecmpb_: has joined #RubyOnRails
[09:56:12] jhfisc: has joined #RubyOnRails
[10:00:24] ferr: has joined #RubyOnRails
[10:01:44] jhfisc: has joined #RubyOnRails
[10:06:42] jhfisc: has joined #RubyOnRails
[10:18:36] stamina: has joined #RubyOnRails
[10:18:48] brent__: has joined #RubyOnRails
[10:19:43] jhfisc: has joined #RubyOnRails
[10:26:37] srinidhi: has joined #RubyOnRails
[10:32:01] srinidhi: has joined #RubyOnRails
[10:40:06] srinidhi: has joined #RubyOnRails
[10:41:49] mikecmpbll: has joined #RubyOnRails
[10:45:44] AzaToth: has joined #RubyOnRails
[10:50:36] lexileo: has joined #RubyOnRails
[10:54:04] doublemalt_: has joined #RubyOnRails
[10:54:13] ur5us: has joined #RubyOnRails
[11:00:04] sevenseacat: has joined #RubyOnRails
[11:02:01] mitt3ns: has joined #RubyOnRails
[11:03:55] marahin: Hello! I am looking for the best way to copy a paperclip attachment (image, hosted on S3) to another record. Both records should then have the same attachment, but either one can be later on edited / changed (so it _shouldnt_ point to the same file, instead it should duplicate it). https://makandracards.com/makandra/6-copy-a-paperclip-attachment-to-another-record is this a good way?
[11:10:29] Tempesta: has joined #RubyOnRails
[11:12:53] arBmind: has joined #RubyOnRails
[11:38:00] arup_r: has joined #RubyOnRails
[11:41:28] ldnunes: has joined #RubyOnRails
[11:49:10] Abhijit: has joined #RubyOnRails
[11:49:33] Abhijit: shall I be using rails api only, if i am planning to use Angular ?
[11:50:19] dminuoso: Abhijit: Perhaps, yes.
[11:50:57] dminuoso: Abhijit: If you separate them completely, it also makes sense to keep the api project completely separate too.
[11:51:08] dminuoso: (And then serve your angular through webpack separately)
[11:51:36] arup_r: but with Rails 5.1 we can keep both of them in same place, no?
[11:51:47] Abhijit: yeah, i would also prefer one app
[11:51:52] arup_r: Is this a bad design?
[11:51:54] dminuoso: arup_r: You can, but there's very little point for client-side frontends.
[11:52:21] dminuoso: arup_r: Webpacker is mostly an attempt to preserve the traditional rails frontends, but give easier access to modern JavaScript libraries.
[11:54:04] dminuoso: arup_r: I mean I don't think there's any right or wrong answer. I keep them completely separate because I want my frontend to be completely agnostic of the API.
[11:54:13] dminuoso: (And vice-versa)
[11:54:22] dminuoso: There's 0 resource sharing between them
[11:54:52] arup_r: yeah API only app will not be getting the new webpack thing.. webpacker is for mvc with FE frameworks support
[11:55:23] arup_r: But it will be very much based on the project future scope :D I get your point dminuoso
[11:57:27] renegadeandy: has joined #RubyOnRails
[12:05:01] arup_r: Abhijit: Angular 4? :)
[12:12:42] crova: has joined #RubyOnRails
[12:13:12] Abhijit: there is Angular 4?
[12:13:15] Abhijit: i thought 2 is latest?
[12:16:07] marr: has joined #RubyOnRails
[12:19:54] delgiudices: has joined #RubyOnRails
[12:22:44] arup_r: Abhijit: :D :D
[12:26:52] dminuoso: Abhijit: Nah. They decided that the release of angular 2 demanded an immediate upgrade to a new major.
[12:27:12] xall: has joined #RubyOnRails
[12:28:37] truenito: has joined #RubyOnRails
[12:51:29] ascarter: has joined #RubyOnRails
[13:05:24] ElektroBug: has joined #RubyOnRails
[13:05:47] ElektroBug: How to make redcarpet parse markdown syntax in tables
[13:06:40] ElektroBug: can anyone guide me on this?
[13:14:49] knight33: has joined #RubyOnRails
[13:25:50] rgiscard: has joined #RubyOnRails
[13:26:47] jokke: has joined #RubyOnRails
[13:27:10] jokke: is there a easy way to proxy all requests to a route to another host?
[13:34:35] Papierkorb: jokke: Do that in your front-end proxy, will be much more efficient for production
[13:40:54] quirkycoders: has joined #RubyOnRails
[13:42:01] jokke: yeah i actually _only_ need this for development
[13:42:13] jokke: but i worked around it
[13:52:32] ascarter: has joined #RubyOnRails
[13:53:53] tanuki: has joined #RubyOnRails
[13:54:52] chouhoulis: has joined #RubyOnRails
[14:00:03] Technodrome: has joined #RubyOnRails
[14:01:53] ResidentBiscuit: has joined #RubyOnRails
[14:06:02] fryguy: has joined #RubyOnRails
[14:07:01] theunraveler: has joined #RubyOnRails
[14:10:16] patarr: has joined #RubyOnRails
[14:12:51] Technodrome: has joined #RubyOnRails
[14:14:27] bzf: Have strong parameters always returned string values?
[14:14:47] cam27: has joined #RubyOnRails
[14:17:21] doublemalt_: has joined #RubyOnRails
[14:20:10] Torrone: has joined #RubyOnRails
[14:20:14] SteenJobs: has joined #RubyOnRails
[14:22:25] Torrone: hello, I want to add a rating system to my rails 3 app, I need it to be applicable to two kinds of model, I already did the front-end stuff such as javascript and css, how ho I make it so that I can add it easily to my models? do I need to make a project of the db table?
[14:26:17] SteenJobs: has joined #RubyOnRails
[14:30:50] xall: has joined #RubyOnRails
[14:31:56] patarr: has joined #RubyOnRails
[14:39:20] arup_r: has joined #RubyOnRails
[14:39:28] arup_r: My program doing something wrong evenif I gave it correct value. It never fill the sign in form with my inputs correctly. Any one faced this error in selenium? https://gist.github.com/aruprakshit/9951358338c78fabc767ebf43fda331e
[14:40:00] pLaTo0n: has joined #RubyOnRails
[14:40:56] quirkycoders: has joined #RubyOnRails
[14:45:22] patarr: has joined #RubyOnRails
[14:46:11] chouhoulis: has joined #RubyOnRails
[14:48:57] arup_r: has joined #RubyOnRails
[14:53:07] ascarter: has joined #RubyOnRails
[15:05:47] lexileo: has joined #RubyOnRails
[15:12:31] shotbug: has joined #RubyOnRails
[15:13:22] [Butch]: has joined #RubyOnRails
[15:16:12] delgiudices: has joined #RubyOnRails
[15:19:12] roshanavand: has joined #RubyOnRails
[15:22:24] delgiudices: has joined #RubyOnRails
[15:26:43] delgiudices: has joined #RubyOnRails
[15:30:27] delgiudices: has joined #RubyOnRails
[15:38:10] brent__: has joined #RubyOnRails
[15:40:24] xall: has joined #RubyOnRails
[15:41:47] delgiudices: has joined #RubyOnRails
[15:44:47] delgiudices: has joined #RubyOnRails
[15:47:01] cagomez: has joined #RubyOnRails
[15:52:41] delgiudices: has joined #RubyOnRails
[15:55:18] mtkd: has joined #RubyOnRails
[15:56:05] shotbug: has joined #RubyOnRails
[16:07:00] cagomez: has joined #RubyOnRails
[16:07:40] cagomez: has joined #RubyOnRails
[16:10:36] pwnd_nsfw: Reasons why "current_user" wouldn't be automatically available in a pundit policy? (One moment, will provide some actual code)
[16:12:16] Technodrome: has joined #RubyOnRails
[16:21:31] pwnd_nsfw: https://gist.github.com/SirUncleCid/d7ef22d8cc4c0e88b29ea3da5df00685
[16:22:31] tbuehlmann: shouldn't it be just `user`?
[16:22:43] pwnd_nsfw: I have another policy that uses current_user
[16:23:13] tbuehlmann: https://github.com/elabs/pundit/blob/ac2a25d93ccd044ac3ea777a70ffd5e31db10d3a/lib/generators/pundit/install/templates/application_policy.rb#L2
[16:23:49] pwnd_nsfw: So, that user IS current_user?
[16:24:02] pwnd_nsfw: Annoying, lol. Thanks
[16:24:06] dionysus69: has joined #RubyOnRails
[16:24:22] tbuehlmann: it uses pundit_user which is current_user per default
[16:24:33] tbuehlmann: https://github.com/elabs/pundit/blob/ac2a25d93ccd044ac3ea777a70ffd5e31db10d3a/lib/pundit.rb#L269-L271
[16:24:34] pwnd_nsfw: And then ultimately user
[16:24:51] gusrub: has joined #RubyOnRails
[16:24:54] pwnd_nsfw: I did see that, but wasn't sure if that was what was passed to the policy itself
[16:25:14] pwnd_nsfw: Which brings me to that other policy that I am able to use current_user in. I'll have to check that out
[16:26:47] Pumukel: has joined #RubyOnRails
[16:26:59] pwnd_nsfw: Thanks for your help
[16:27:08] tbuehlmann: you're welcome
[16:30:57] DrYockel: has joined #RubyOnRails
[16:35:48] xall: has joined #RubyOnRails
[16:40:56] gusrub_: has joined #RubyOnRails
[16:43:17] quirkycoders: has joined #RubyOnRails
[16:53:51] armyriad: has joined #RubyOnRails
[16:55:29] tobh___: has joined #RubyOnRails
[17:05:20] shotbug: has joined #RubyOnRails
[17:05:40] shotbug: has joined #RubyOnRails
[17:08:27] delgiudices: has joined #RubyOnRails
[17:19:33] Technodrome: has joined #RubyOnRails
[17:22:26] dminuoso: Bikeshedding time!
[17:22:38] dminuoso: Assume a lead ticket (something along the lines of a "bug" or "issue" in a bug tracker), which can either be opened or closed.
[17:22:40] dminuoso: Should the respective column be called "open" or "closed" (having a boolean value of true or false)
[17:23:21] dminuoso: Any submissible opinion must come with an argument.
[17:23:25] arBmind: has joined #RubyOnRails
[17:24:50] agent_white: has joined #RubyOnRails
[17:27:19] dminuoso: The third option of having some generic "status" is a bit more annoying because Rails hates people trying to use string values as enums, and Im trying to get away from using too many integer enums.
[17:30:30] duderonomy: has joined #RubyOnRails
[17:31:26] knight33: has joined #RubyOnRails
[17:34:53] tbuehlmann: paint the bike shed red
[17:45:25] matthewd: http://www.dictionary.com/browse/open lists 42 definitions for the adjectival form; http://www.dictionary.com/browse/closed has 9
[17:49:48] lxsameer: has joined #RubyOnRails
[17:55:54] dminuoso: matthewd: Which would you chose?
[17:56:04] dminuoso: (Out of the 3 options)
[17:56:31] dminuoso: open also has the added advantage of saving a single character (thus reducing source size and saving some development time) whenever you have to type it
[17:56:36] dminuoso: 2 characters!
[17:56:58] dminuoso: It also improves the start up time of the rails app because it has to parse less.
[18:02:26] troys: has joined #RubyOnRails
[18:03:18] danguita: has joined #RubyOnRails
[18:04:13] netzfisch: has joined #RubyOnRails
[18:08:44] dionysus70: has joined #RubyOnRails
[18:09:05] matthewd: dminuoso: I think I'd use closed, because it feels narrower / more specific. (I already thought that; the dictionary check just supported it.)
[18:09:45] matthewd: dminuoso: Also avoids Kernel#open, I guess, though I'd be worried if you wanted to call that from your model anyway
[18:09:47] br0d1n: has joined #RubyOnRails
[18:10:16] dminuoso: matthewd: Interesting, I came to the same conclusion. For me the underlying meaning is "is it resolved?". And "open" is a negation of that "is it unresolved?"
[18:11:27] matthewd: And that may tie into my other thought, which is that I'd first try to find a more specific-sounding word/synonym. (Like "resolved".)
[18:17:06] danguita: has joined #RubyOnRails
[18:20:31] cagomez: has joined #RubyOnRails
[18:20:36] cseder: has joined #RubyOnRails
[18:21:52] truenito: has joined #RubyOnRails
[18:25:58] danguita: has joined #RubyOnRails
[18:28:45] jscheel: has joined #RubyOnRails
[18:30:02] danguita: has joined #RubyOnRails
[18:33:52] danguita: has joined #RubyOnRails
[18:47:25] mooser: has joined #RubyOnRails
[18:50:42] jscheel: has joined #RubyOnRails
[18:57:30] danguita: has joined #RubyOnRails
[19:06:56] danguita: has joined #RubyOnRails
[19:08:58] cagomez: has joined #RubyOnRails
[19:13:20] danguita: has joined #RubyOnRails
[19:13:35] truenito: has joined #RubyOnRails
[19:15:25] danguita: has joined #RubyOnRails
[19:16:10] Technodrome: has joined #RubyOnRails
[19:26:19] creature: has joined #RubyOnRails
[19:29:34] cagomez: has joined #RubyOnRails
[19:46:23] truenito: has joined #RubyOnRails
[19:46:40] ianfleeton: has joined #RubyOnRails
[19:47:35] quirkycoders: has joined #RubyOnRails
[19:50:53] truenito: has joined #RubyOnRails
[19:54:46] mtkd: has joined #RubyOnRails
[19:55:37] netzfisch: has joined #RubyOnRails
[19:59:39] cam27: has joined #RubyOnRails
[20:03:41] fryguy: anyone have any good examples for a devise auth strategy that takes some configuration? i'm looking at devise-jwt but I don't see how jwt_revocation_strategy works so i'm looking for some other examples
[20:05:26] srinidhi: has joined #RubyOnRails
[20:17:39] jscheel: has joined #RubyOnRails
[20:19:40] cagomez: has joined #RubyOnRails
[20:23:04] mooser: has joined #RubyOnRails
[20:23:37] truenito: has joined #RubyOnRails
[20:30:42] arBmind: has joined #RubyOnRails
[20:36:37] Technodrome: has joined #RubyOnRails
[20:42:09] Uranio: has joined #RubyOnRails
[20:43:15] Uranio: has left #RubyOnRails: ()
[20:54:44] workmad3: has joined #RubyOnRails
[20:56:04] ianfleeton: has joined #RubyOnRails
[20:59:53] truenito: has joined #RubyOnRails
[21:30:45] patarr1: has joined #RubyOnRails
[21:31:29] quazimodo: has joined #RubyOnRails
[21:36:25] rory096: has joined #RubyOnRails
[21:37:11] rory096: any idea why mysql2 would keep trying to connect on /tmp/mysql.sock no matter what socket: i specify in my database.yml?
[21:37:15] rory096: this is on macOS
[21:39:01] ur5us: has joined #RubyOnRails
[22:02:20] aperkins81: has joined #RubyOnRails
[22:13:36] Moeh: has joined #RubyOnRails
[22:30:56] Radar: rory096: you're specifying the socket in the wrong environment?
[22:32:04] Radar: GOOD MORNING
[22:35:29] freeatnet: has joined #RubyOnRails
[22:39:14] havenwood: aperkins81: Halloooooo
[22:42:47] ElektroBug: has joined #RubyOnRails
[22:43:17] ElektroBug: is there a way to make redcarpet parse markdown in tables?
[22:50:05] freeatnet: Hey everyone, need a little bit of help figuring out how to report a deadlock in Rails. Here's the gist of it: https://gist.github.com/freeatnet/d0501319936f567d7d855e200201bf2b
[22:51:49] weaksauce: has joined #RubyOnRails
[22:52:19] mokiwis: has joined #RubyOnRails
[22:58:25] duderonomy: has joined #RubyOnRails
[22:59:02] ascarter: has joined #RubyOnRails
[23:06:14] mokiwis: has joined #RubyOnRails