« Back to channel list

#RubyOnRails - 17 June 2017

« Back 1 day Forward 1 day »
[00:07:40] tercenya: has joined #RubyOnRails
[00:13:41] Jameser: has joined #RubyOnRails
[00:31:39] feralmosquito: has joined #RubyOnRails
[00:35:37] xx00__: has joined #RubyOnRails
[00:39:16] TinkerTyper: has joined #RubyOnRails
[00:39:50] ur5us: has joined #RubyOnRails
[00:46:13] brent__: has joined #RubyOnRails
[00:48:42] xco: has joined #RubyOnRails
[00:49:37] quazimodo: has joined #RubyOnRails
[00:54:40] quazimodo: has joined #RubyOnRails
[01:00:31] duderonomy: has joined #RubyOnRails
[01:17:35] mcr431: has joined #RubyOnRails
[01:17:46] xibalba: has joined #RubyOnRails
[01:20:47] mcr431: Hey all, this isn't really a rails specific question but just general security so not sure if this is the right place. When handling a login form, as long as I have SSL cert, I can directly post the password to the server and don't need to encrypt client side correct?
[01:23:49] matthewd: mcr431: As long as you trust whatever has the SSL certificate's private key, then yes -- it's already being encrypted
[01:25:45] mcr431: @matthewd: okay cool. And I don't have to do anything fancy shmancy? just make sure its absolutely posting to https and not http?
[01:27:19] matthewd: And make sure the form itself is delivered over https (so an attacker can't easily rewrite it to use http)
[01:29:57] mcr431: @matthewd: Sweet. That's a lot easier than I was expecting
[01:37:23] quazimodo: has joined #RubyOnRails
[02:40:39] ur5us: has joined #RubyOnRails
[02:46:16] quirkycoders: has joined #RubyOnRails
[02:50:36] jerryskye: has joined #RubyOnRails
[02:50:50] wethu: has joined #RubyOnRails
[03:00:29] sandstrom: has joined #RubyOnRails
[03:05:05] fschuindt1: has joined #RubyOnRails
[03:06:09] jerryskye: has left #RubyOnRails: ()
[03:11:09] aajjbb: has joined #RubyOnRails
[03:24:23] patarr: has joined #RubyOnRails
[03:30:22] tamouse__: has joined #RubyOnRails
[03:30:35] tamouse__: hello, rails folx
[03:59:58] segy: has joined #RubyOnRails
[04:19:03] quazimodo: has joined #RubyOnRails
[04:21:22] Saukk: has joined #RubyOnRails
[04:26:57] wethu: has joined #RubyOnRails
[04:32:58] wethu: has joined #RubyOnRails
[04:41:09] kies: has joined #RubyOnRails
[04:41:25] ur5us: has joined #RubyOnRails
[05:09:21] quirkycoders: has joined #RubyOnRails
[05:25:23] patarr: has joined #RubyOnRails
[06:08:11] brent__: has joined #RubyOnRails
[06:14:38] harfangk: has joined #RubyOnRails
[06:15:26] xco: hello. is there a tool that can draw the association/connects between models in rails?
[06:15:45] xco: connections**
[06:15:59] xco: models = tables
[06:24:54] username: has joined #RubyOnRails
[06:24:57] mtkd: has joined #RubyOnRails
[06:36:59] dionysus69: has joined #RubyOnRails
[06:40:02] ur5us: has joined #RubyOnRails
[06:41:53] dionysus69: has joined #RubyOnRails
[06:53:37] arup_r: has joined #RubyOnRails
[06:55:38] quirkycoders: has joined #RubyOnRails
[07:04:23] wethu: has joined #RubyOnRails
[07:11:06] drptbl: has joined #RubyOnRails
[07:13:32] arup_r: has joined #RubyOnRails
[07:16:36] nahtnam: has joined #RubyOnRails
[07:23:47] pLaTo0n: has joined #RubyOnRails
[07:26:07] patarr: has joined #RubyOnRails
[08:08:48] brent__: has joined #RubyOnRails
[08:50:40] lxsameer: has joined #RubyOnRails
[09:03:57] roshanavand: has joined #RubyOnRails
[09:05:40] arup_r: has joined #RubyOnRails
[09:17:36] no-dashes: has joined #RubyOnRails
[09:19:51] marr: has joined #RubyOnRails
[09:27:00] patarr: has joined #RubyOnRails
[09:49:33] tomwyatt: has joined #RubyOnRails
[09:50:04] roshanavand: has joined #RubyOnRails
[09:58:03] arBmind: has joined #RubyOnRails
[10:02:24] arup_r: has joined #RubyOnRails
[10:03:45] quazimodo: has joined #RubyOnRails
[10:11:13] ur5us: has joined #RubyOnRails
[10:20:38] Fernando-Basso: has joined #RubyOnRails
[10:24:18] brent__: has joined #RubyOnRails
[10:25:01] patarr: has joined #RubyOnRails
[10:42:04] arup_r: has joined #RubyOnRails
[10:42:17] Tempesta: has joined #RubyOnRails
[11:40:43] AzaToth: has joined #RubyOnRails
[11:55:23] srinidhi: has joined #RubyOnRails
[11:56:47] mahloun: has joined #RubyOnRails
[12:40:38] Technodrome: has joined #RubyOnRails
[12:51:47] sagax: has joined #RubyOnRails
[13:01:12] ejnahc: has joined #RubyOnRails
[13:21:44] GodFather: has joined #RubyOnRails
[13:23:40] centrx: has joined #RubyOnRails
[13:43:37] Aherin: has joined #RubyOnRails
[13:46:17] tpendragon: has joined #RubyOnRails
[13:48:34] dblessing: has joined #RubyOnRails
[13:49:36] xx00__: has joined #RubyOnRails
[14:02:52] reacquaint: has joined #RubyOnRails
[14:20:27] DLSteve: has joined #RubyOnRails
[14:23:07] xx00__: has joined #RubyOnRails
[14:38:11] Jameser: has joined #RubyOnRails
[14:41:42] yottanami: has joined #RubyOnRails
[14:42:30] yottanami: Hey all I have this route `get "saman/payment_report", to: 'saman#payment_report'` but where I try go to `http://127.0.0.1:3000/saman/payment_report` it open view without calling controller
[14:42:54] yottanami: I also tried `get "saman/payment_report"` How should I fix?
[14:44:37] AnotherOne: show your code
[14:51:20] yottanami: anotherone, It is just a controller called byebug https://gist.github.com/yottanami/bd058ee8771794fc13df412527034936
[14:52:03] Ropeney: it's the rest of that routes file that might be the concern.
[14:54:38] yottanami: ropeney, Here is complete routes https://gist.github.com/yottanami/a049cc707cb030fcaebf5088650a176a
[14:55:08] Ropeney: ` get 'saman/payment_request/:id', to: 'saman#transaction_request', as: :saman_transaction_request` may be your culprit
[14:55:21] Ropeney: nvm request !== report
[14:55:53] AnotherOne: does finalize_payment work? ^^
[14:56:28] AnotherOne: get 'saman/payment_request/:id', to: 'saman#transaction_request', as: :saman_transaction_request
[14:56:30] AnotherOne: see that line?
[14:56:41] AnotherOne: you redirecting to transaction_request not to payment_request
[14:56:59] Ropeney: anotherone, but the url is "report" not "request"
[14:57:54] yottanami: anotherone, It is request
[14:58:17] AnotherOne: i see sorry :P
[14:58:50] uks: has joined #RubyOnRails
[14:59:22] yottanami: I also change it `get "saman/payment_report", to: 'saman#payment_report', as: 'saman_payment_request'` but did not fixed
[14:59:43] AnotherOne: how sure are you youre calling the right route and so on because if there is no action in your controller you should get an error
[15:00:04] Ropeney: i'd be looking at server logs when you make that request and paste that :)
[15:00:26] AnotherOne: would be a idea
[15:00:52] defsdoor: has joined #RubyOnRails
[15:01:31] yottanami: anotherone, When I remove the action it will show view yet ( I think it is ok in Rails and it can show views without templates)
[15:02:38] AnotherOne: no it is not possible
[15:02:57] AnotherOne: as far as i know all views need a controller
[15:04:10] yottanami: anotherone, I think tis changed in Rails 5 and it can show views without controller
[15:04:28] yottanami: ropeney, Here is output log https://gist.github.com/yottanami/addb420f8f2960cd3c23ac7ee49d1ef6
[15:05:19] Ropeney: yottanami, more
[15:06:04] AnotherOne: is that true in rails 5 there can be views without controller where do you get that information from?
[15:06:55] yottanami: anotherone, I was looking for a simple way to create several static HTML pages in my application
[15:07:42] AnotherOne: maybe there is some code or what ever that we don't see which automatically redirects your call ?
[15:08:59] yottanami: ropeney, full output is here https://gist.github.com/yottanami/addb420f8f2960cd3c23ac7ee49d1ef6
[15:09:33] yottanami: anotherone, redirect? because it is running the true view
[15:10:04] Ropeney: yottanami, have you restarted server?
[15:10:52] AnotherOne: might be you installed a gem or whatever so you can render views without controller and now ...
[15:11:32] yottanami: ropeney, I am using my application on localhost
[15:11:45] Ropeney: have you restarted the "rails" server?
[15:12:22] yottanami: ropeney, Yes I did I am running it using Docker
[15:13:11] Ropeney: Either your code or your rails server is not in sync
[15:14:24] Ropeney: in ApplicationController, do `before_action { raise "I got here" }` and you will see if your changes work.
[15:15:44] yottanami: I removed the view and I got error that controller not found I think problem is my controller
[15:15:59] AnotherOne: why didn't you do what ropeney said?
[15:20:24] yottanami: I found the problem in controller. the method was protected and it could not see protected then tries to just load view. tnx for helps
[15:21:15] Ropeney: That wasn't in your original gist
[15:22:24] jstrong: has joined #RubyOnRails
[15:25:31] roshanavand: has joined #RubyOnRails
[15:35:31] AnotherOne: ropeney do you know in rails 5 you can have views without controller?
[15:36:12] Ropeney: You can't have without controller
[15:36:17] Ropeney: you might be able to have without action
[15:36:18] montyboy_: has joined #RubyOnRails
[15:36:58] AnotherOne: because rou route to a default action or something like that?
[15:37:28] Ropeney: I "think", I have never tried or checked lol but it does ring a bell of something I read.
[15:37:36] Ropeney: It'd be very easy to test
[15:37:51] AnotherOne: yea but why event test itxD
[15:37:54] bazzy: has joined #RubyOnRails
[15:38:32] TessaM: has joined #RubyOnRails
[15:40:05] Haydos: has joined #RubyOnRails
[15:40:22] Ropeney: You seemed curious :P
[15:41:04] D9: has joined #RubyOnRails
[15:41:42] cam27: has joined #RubyOnRails
[15:41:59] S007: has joined #RubyOnRails
[15:42:20] larissa: has joined #RubyOnRails
[15:42:36] AnotherOne: because he said it like it is a normal thing to have no action/controller
[15:43:08] AnotherOne: if his action is private he also should get a error saying missing action
[15:43:22] AnotherOne: so i guess he had something in place that would redirect to a default action or so
[15:44:29] biox: has joined #RubyOnRails
[15:45:30] Ropeney: I think it did the magic action thing cause it couldn't find one.
[15:49:52] NoGodDamnIdea: has joined #RubyOnRails
[15:50:18] mrbubbles: I'm trying to store an array of strings in a table. It's coming from a comma-delimited text field. I know I can call .split(',') on the string to get an array, but I'm not sure when to do this. I was trying to do it in an ActiveRecord before_save callback but it wasn't playing ball - as I'm not even able to set the value to a string in order to save it.
[15:53:22] AnotherOne: do it in the action
[15:53:38] AnotherOne: update or create for example
[15:54:42] tbuehlmann: mrbubbles: you could define a custom setter for the attribute. when the argument is a string, split the input and call super with it. if it's not a string, just call super
[15:54:59] mrbubbles: tbuehlmann perfect I'll try that now, thanks :)
[15:56:33] mrbubbles: tbuehlmann worked perfectly, thank you :D
[15:56:41] mrbubbles: Man I love ruby
[16:16:28] xall: has joined #RubyOnRails
[16:23:18] DLSteve: has joined #RubyOnRails
[16:57:30] ahrs: has joined #RubyOnRails
[17:01:27] quazimodo: has joined #RubyOnRails
[17:04:38] dionysus69: has joined #RubyOnRails
[17:12:38] nerglish: has joined #RubyOnRails
[17:26:08] Technodrome: has joined #RubyOnRails
[17:32:09] mrbubbles: hmmm does anyone know why my form_tag would be sending params like ?style=first&style=second&style=third rather than style=first,second,third ? I'm using checkboxes for the values and I've got name="style[]" value="first" etc
[17:39:43] Ropeney: That's correct behaviour if they all have the same name
[17:42:23] lxsameer: has joined #RubyOnRails
[17:44:39] mrbubbles: Ah I thought I'd seen URL params grouped previously
[17:45:15] ^mtkd: has joined #RubyOnRails
[17:46:54] tbuehlmann: shouldn't it be this? ?style[]=first&style[]=second&style[]=third
[17:52:02] mrbubbles: ah yes it is, it has the brackets encoded but ye
[17:52:46] mrbubbles: But, okay, so that's expected then? Good good :)
[17:55:29] tbuehlmann: yes, rails will make that an array in your params
[17:56:34] cam27: has joined #RubyOnRails
[17:58:39] helpa-bot: has joined #RubyOnRails
[18:00:21] helpa: has joined #RubyOnRails
[18:19:08] jottr: has joined #RubyOnRails
[18:24:01] srinidhi: has joined #RubyOnRails
[18:26:39] gambl0re: has joined #RubyOnRails
[18:27:07] mtkd: has joined #RubyOnRails
[18:37:53] marr: has joined #RubyOnRails
[18:48:16] tomaw: has joined #RubyOnRails
[18:49:04] thortron: has joined #RubyOnRails
[18:49:07] shtirlic: has joined #RubyOnRails
[18:49:08] Majadon: has joined #RubyOnRails
[18:49:17] iamdevnul: has joined #RubyOnRails
[18:49:24] \13k: has joined #RubyOnRails
[18:49:25] DarkBushido: has joined #RubyOnRails
[18:49:25] nickenchuggets: has joined #RubyOnRails
[18:49:36] Lloyd: has joined #RubyOnRails
[18:49:41] wsmoak: has joined #RubyOnRails
[18:49:41] callahanrts: has joined #RubyOnRails
[18:49:57] johnkpaul: has joined #RubyOnRails
[18:49:59] Aeyris: has joined #RubyOnRails
[18:50:00] machty: has joined #RubyOnRails
[18:50:07] Hates_: has joined #RubyOnRails
[18:50:07] lipoqil: has joined #RubyOnRails
[18:50:16] auv: has joined #RubyOnRails
[18:50:37] DukeDave: has joined #RubyOnRails
[18:51:36] mrbubbles: Bit of a headwrecker... but I'm working on a site that uses a CMS (not my code) and there is a pretty long relationship between two models
[18:52:02] dopie: has joined #RubyOnRails
[18:52:04] mrbubbles: I can get a list of projects, but to get the category I need to do: <%= @projects.first.elements.first.ingredient(:category) %> :(
[18:52:12] dopie: hey guys I'm deploying to my server and overtime this error happens
[18:52:12] dopie: https://gist.github.com/staycreativedesign/fa23ea8275bf264d12e4547f0bde9d28
[18:52:58] mrbubbles: Will it ever be possible for me to do a .where on the category?
[18:53:38] Paradox: has joined #RubyOnRails
[18:58:36] mrbubbles: It feels a bit insane doing a .where across so many nessted associations...
[18:59:10] Ropeney: You can though... sounds like you shouldn't
[18:59:51] Ropeney: If you can't redesign things so they are alot nicer, maybe look at storing the category on the project? :D
[19:00:12] mrbubbles: Ye it's a CMS though so the category is stored in an element
[19:00:15] mrbubbles: But yeah not a bad idea
[19:00:44] Ropeney: I'm confused how the category can be based like that
[19:00:53] Ropeney: so the second ingrediants category is irellevant?
[19:03:53] mrbubbles: So in the above example I've used the first element but in reality it's always an element called meta.
[19:03:58] Ropeney: Sounds like category doesn't belong there then :)
[19:04:06] mrbubbles: :category is the name of the field
[19:04:45] Ropeney: :\ bit hard to work with if your not being honest with the code
[19:05:11] mrbubbles: https://github.com/AlchemyCMS/alchemy_cms/tree/master/app/models/alchemy
[19:05:14] Ropeney: anyway, goodluck I'm off :)
[19:08:30] dionysus69: has joined #RubyOnRails
[19:17:38] arup_r: has joined #RubyOnRails
[19:18:40] dionysus69: has joined #RubyOnRails
[19:21:24] mrbubbles: Haha no worries thanks ropeney enjoy your evening :)
[19:22:26] mtkd: has joined #RubyOnRails
[19:22:52] dopie: has left #RubyOnRails: ("Leaving")
[20:11:29] pLaToOn: has joined #RubyOnRails
[20:50:51] dionysus70: has joined #RubyOnRails
[21:19:06] no-dashes: has joined #RubyOnRails
[21:24:42] no-dashes: hey ho! Is there already a 'best practice' for bundling webpacker-aware javascript code and dependencies in a gem?
[21:56:30] NoGodDamnIdea: has joined #RubyOnRails
[21:58:33] no-dashes: has joined #RubyOnRails
[21:59:13] andrew91841: has joined #RubyOnRails
[21:59:27] no-dashes: has joined #RubyOnRails
[22:00:02] aajjbb: has joined #RubyOnRails
[22:00:31] no-dashes: has joined #RubyOnRails
[22:00:56] no-dashes: has joined #RubyOnRails
[22:01:50] no-dashes: has joined #RubyOnRails
[22:02:32] no-dashes: has joined #RubyOnRails
[22:03:20] no-dashes: has joined #RubyOnRails
[22:04:07] no-dashes: has joined #RubyOnRails
[22:04:56] no-dashes: has joined #RubyOnRails
[22:05:50] no-dashes: has joined #RubyOnRails
[22:06:32] no-dashes: has joined #RubyOnRails
[22:07:26] no-dashes: has joined #RubyOnRails
[22:20:49] andrew91841: has left #RubyOnRails: ()
[22:28:40] pLaToOn: has joined #RubyOnRails
[22:47:12] ule: Hey guys.. I'm dealing with an external API call
[22:47:14] Greencoat421: has joined #RubyOnRails
[22:47:40] ule: where should I place this integration file? Under ./lib? an custom class inside ./models?
[22:48:07] ule: under helper
[22:49:02] ule: And basically I have a controller that provides this data to a view
[22:49:20] ule: not sure what's the best practice
[23:03:43] weaksauce: has joined #RubyOnRails
[23:05:50] renegadeandy: has joined #RubyOnRails
[23:06:49] nerglish: has joined #RubyOnRails
[23:09:23] cam27: has joined #RubyOnRails
[23:12:36] Technodrome: has joined #RubyOnRails