« Back to channel list

#RubyOnRails - 24 March 2017

« Back 1 day Forward 1 day »
[00:00:48] GodFather: has joined #RubyOnRails
[00:02:45] hakash: has joined #RubyOnRails
[00:08:04] wkoszek_: Radar: Let me take a look.
[00:18:10] Omnilord: has joined #RubyOnRails
[00:32:40] zeddan: has joined #RubyOnRails
[00:33:46] Limix: has joined #RubyOnRails
[00:34:40] cagomez: has joined #RubyOnRails
[00:35:53] byteflame: has joined #RubyOnRails
[00:36:02] rakm: has joined #RubyOnRails
[00:36:06] jdm: has joined #RubyOnRails
[00:50:53] Kilo`byte: ah so i have this rails app which i recently switched to https. For that i have an nginx which does the TLS and then connects to rails using a domain socket
[00:51:19] roamingdog: has joined #RubyOnRails
[00:51:25] Kilo`byte: in that moment, whenever i try to use the login form, i get an HTTP 422. From the logs it seems like this might be a csrf token error
[00:51:37] Kilo`byte: i tried clearing cookies and refreshing multiple times
[00:51:41] Kilo`byte: what can cause this`
[00:52:18] Kilo`byte: and more importantly: how do i fix this
[00:56:25] Technodrome: has joined #RubyOnRails
[00:56:26] qwertme: has joined #RubyOnRails
[00:58:46] d5sx43: has joined #RubyOnRails
[01:03:21] ahrs: has joined #RubyOnRails
[01:04:44] kara_sweets: has joined #RubyOnRails
[01:08:14] arBmind1: has joined #RubyOnRails
[01:24:04] Jameser: has joined #RubyOnRails
[01:29:32] mecnun_c: has joined #RubyOnRails
[01:31:22] eclecticjohny: has joined #RubyOnRails
[01:36:41] byteflame: has joined #RubyOnRails
[01:37:57] quazimodo: I've had this issue with scopes on associations
[01:37:59] quazimodo: https://gist.github.com/siassaj/e813cd7819accf008ced8123bf70a189
[01:38:05] quazimodo: never really solved it in a clean way
[01:44:11] planigan: has joined #RubyOnRails
[01:48:20] kara_sweets: hey guys im having an issue chaining database queries
[01:48:21] kara_sweets: https://gist.github.com/anonymous/fbf807d6ca560b287fd3d956f392da60
[01:48:43] kara_sweets: how do i prevent the method call from executing the return value
[01:48:59] kara_sweets: specifically line 35 within the for loop
[01:57:40] nyaa: has joined #RubyOnRails
[02:01:24] planigan: has joined #RubyOnRails
[02:03:25] planigan: has joined #RubyOnRails
[02:04:08] Kallis: has joined #RubyOnRails
[02:05:16] Kallis: has joined #RubyOnRails
[02:10:32] Trynemjoel: has joined #RubyOnRails
[02:23:40] roflmyeggo: has joined #RubyOnRails
[02:30:58] lumberjack__: has joined #RubyOnRails
[02:32:35] lumberjack__: Hey guys, Im looking for the pro tip, My rspec validation tests are failing because my model callback methods dont have attribute with values, what is the best practice
[02:35:10] weaksauce: has joined #RubyOnRails
[02:36:35] mostlybadfly: has joined #RubyOnRails
[02:37:24] byteflame: has joined #RubyOnRails
[02:41:07] cnk: has joined #RubyOnRails
[02:44:36] jenrzzz: has joined #RubyOnRails
[02:44:36] jenrzzz: has joined #RubyOnRails
[02:47:29] Technodrome: has joined #RubyOnRails
[02:53:23] Duckily: has joined #RubyOnRails
[02:54:30] naprimer: has joined #RubyOnRails
[02:56:25] roamingdog: has joined #RubyOnRails
[03:01:48] akshat: has joined #RubyOnRails
[03:01:56] jenrzzz: has joined #RubyOnRails
[03:03:52] marcdel: has joined #RubyOnRails
[03:05:55] libastral: has joined #RubyOnRails
[03:05:58] zeddan: has joined #RubyOnRails
[03:06:25] gusrub: has joined #RubyOnRails
[03:17:16] jdm: has joined #RubyOnRails
[03:19:38] Davey: has joined #RubyOnRails
[03:19:38] Davey: has joined #RubyOnRails
[03:19:53] IRCFrEAK: has joined #RubyOnRails
[03:20:04] marcdel: has joined #RubyOnRails
[03:21:07] TessaM: has joined #RubyOnRails
[03:22:45] IRCFrEAK: has left #RubyOnRails: ()
[03:25:14] Limix: has joined #RubyOnRails
[03:29:53] mecnun_c: has joined #RubyOnRails
[03:35:55] quazimodo: has joined #RubyOnRails
[03:38:33] byteflame: has joined #RubyOnRails
[03:42:07] IRCFrEAK: has joined #RubyOnRails
[03:43:19] duderonomy: has joined #RubyOnRails
[03:46:12] larissa: has joined #RubyOnRails
[03:46:44] tw1sted: has joined #RubyOnRails
[03:52:52] jenrzzz: has joined #RubyOnRails
[03:52:52] jenrzzz: has joined #RubyOnRails
[03:59:33] IRCFrEAK: has joined #RubyOnRails
[04:00:38] IRCFrEAK: has left #RubyOnRails: ()
[04:01:21] eclecticjohny: has joined #RubyOnRails
[04:02:31] irishfromua: has joined #RubyOnRails
[04:06:27] _tk421_: has joined #RubyOnRails
[04:19:15] irishfromua: has joined #RubyOnRails
[04:27:25] IRCFrEAK: has joined #RubyOnRails
[04:30:12] IRCFrEAK: has left #RubyOnRails: ()
[04:31:11] keerthana: has joined #RubyOnRails
[04:33:13] hakash: has joined #RubyOnRails
[04:39:39] byteflame: has joined #RubyOnRails
[04:43:10] alex88: has joined #RubyOnRails
[04:44:35] alex88_: has joined #RubyOnRails
[04:45:39] itsgokul: has joined #RubyOnRails
[04:54:52] fernandomm: has joined #RubyOnRails
[05:04:47] jdm: has joined #RubyOnRails
[05:05:07] quazimodo: has joined #RubyOnRails
[05:06:10] _djbkd: has joined #RubyOnRails
[05:10:01] hahuang61: has joined #RubyOnRails
[05:12:55] pulkit4tech: has joined #RubyOnRails
[05:14:03] zero1one0: has joined #RubyOnRails
[05:19:14] IRCFrEAK: has joined #RubyOnRails
[05:30:19] mecnun_c: has joined #RubyOnRails
[05:33:09] Duckily: has joined #RubyOnRails
[05:40:25] byteflame: has joined #RubyOnRails
[05:45:45] doodlehaus: has joined #RubyOnRails
[05:47:11] dminuoso: Is there any add-in that automatically adds an extra column to mark a resource as deleted, generate exceptions (similar to ActiveRecord::RecordNotFound) so that I can respond with HTTP 410?
[05:47:38] dminuoso: And ideally even add a default scope to models ;o
[05:47:45] dminuoso: Like a full care pacakge.
[05:56:14] kreantos: has joined #RubyOnRails
[06:00:12] kreantos: has joined #RubyOnRails
[06:02:14] igniting: has joined #RubyOnRails
[06:02:22] dionysus69: has joined #RubyOnRails
[06:11:36] sdwrage: has joined #RubyOnRails
[06:12:23] Or1on: has joined #RubyOnRails
[06:18:24] kreantos: cpruitt, FYI: unfortunately there is no ActiveJob way to start job execution. see --> http://edgeguides.rubyonrails.org/active_job_basics.html#starting-the-backend
[06:19:34] FLeiXiuS: has joined #RubyOnRails
[06:19:34] FLeiXiuS: has joined #RubyOnRails
[06:22:43] patarr: has joined #RubyOnRails
[06:28:20] _djbkd: has joined #RubyOnRails
[06:32:02] darutoko: has joined #RubyOnRails
[06:37:29] ahrs: has joined #RubyOnRails
[06:40:49] byteflame: has joined #RubyOnRails
[06:56:25] hahuang61: has joined #RubyOnRails
[06:59:38] FLeiXiuS`: has joined #RubyOnRails
[07:00:28] Technodrome: has joined #RubyOnRails
[07:01:45] jenrzzz: has joined #RubyOnRails
[07:05:53] pankaj_: has joined #RubyOnRails
[07:06:31] lightheaded: has joined #RubyOnRails
[07:13:59] pankaj_: Hello Community
[07:14:47] pLaTo0n: has joined #RubyOnRails
[07:16:52] pankaj_: Is there anybody out there?
[07:17:15] doublemalt_: has joined #RubyOnRails
[07:21:50] itsgokul: has joined #RubyOnRails
[07:26:14] donnib: has joined #RubyOnRails
[07:26:39] WinterBluFox: has joined #RubyOnRails
[07:26:51] donnib: i am trying to use rake db:create but because of permissions it fails so i am trying to do sudo rake db:create but then i get that the command is not found
[07:27:08] donnib: i then tried to do export PATH=$PATH:$HOME/bin:/home/raistlin/.rvm/gems/ruby-1.9.3-p551/bin but still sudo rake does not work
[07:29:21] donnib: any ideas what i can do to get it to work ?
[07:30:47] mecnun_c: has joined #RubyOnRails
[07:32:48] Duckily: has joined #RubyOnRails
[07:34:45] dps: has joined #RubyOnRails
[07:35:36] Neeeeeeeeeeks: has joined #RubyOnRails
[07:37:01] fernandomm: has joined #RubyOnRails
[07:37:16] jenrzzz: has joined #RubyOnRails
[07:37:16] jenrzzz: has joined #RubyOnRails
[07:41:34] byteflame: has joined #RubyOnRails
[07:41:37] Neeeeeeeeeeks: has left #RubyOnRails: ("Be back later...")
[07:41:53] spicerack: has joined #RubyOnRails
[07:43:59] conta: has joined #RubyOnRails
[07:44:32] lightheaded: has joined #RubyOnRails
[07:44:42] mikecmpbll: has joined #RubyOnRails
[08:03:06] DeusNeusEx: has joined #RubyOnRails
[08:03:43] Technodrome: has joined #RubyOnRails
[08:05:58] jenrzzz: has joined #RubyOnRails
[08:05:58] jenrzzz: has joined #RubyOnRails
[08:06:17] conta: guys, does delayed_job run as daemon?
[08:06:25] conta: RAILS_ENV='production' bin/delayed_job restart -n 1 --pid-dir='/home/www/pids'
[08:08:28] gusrub: has joined #RubyOnRails
[08:14:17] aganov: has joined #RubyOnRails
[08:16:40] workmad3: has joined #RubyOnRails
[08:17:37] luckyruby: has joined #RubyOnRails
[08:18:16] AzaToth: has joined #RubyOnRails
[08:19:04] solars: has joined #RubyOnRails
[08:20:58] solars: quick question: Any suggestinos for cheap hosting for a non time-critical rails app that provides a docker image and essentially depends on sidekiq, redis, postgresql, elasticsearch? Digitalocean instance? The app details are here: https://github.com/LaCasemate/fab-manager
[08:23:10] kreantos: solars, did you have a look at digitalocean?
[08:23:31] patarr: has joined #RubyOnRails
[08:23:42] artto: has joined #RubyOnRails
[08:23:46] solars: kreantos: yes as mentioned :)
[08:24:33] kreantos: solars, sry DN would be my suggestion ;)
[08:26:12] artto_: has joined #RubyOnRails
[08:26:35] sami: has left #RubyOnRails: ()
[08:29:26] mark_66: has joined #RubyOnRails
[08:33:20] snickers: has joined #RubyOnRails
[08:42:23] byteflame: has joined #RubyOnRails
[08:45:48] ReBa_: has joined #RubyOnRails
[08:49:09] arBmind: has joined #RubyOnRails
[08:57:30] hahuang61: has joined #RubyOnRails
[09:01:56] artto: has joined #RubyOnRails
[09:05:22] artto: has joined #RubyOnRails
[09:10:00] artto: has joined #RubyOnRails
[09:12:07] mikecmpbll: has joined #RubyOnRails
[09:19:10] artto: has joined #RubyOnRails
[09:28:39] artto: has joined #RubyOnRails
[09:31:24] mecnun_c: has joined #RubyOnRails
[09:31:42] itsgokul: has joined #RubyOnRails
[09:32:11] mhenrixon: has joined #RubyOnRails
[09:41:32] marr: has joined #RubyOnRails
[09:41:47] Andr3as: morning everyone.. i have a page with datatables on it (dont know if this is related) and when i navigate away to another page and click the back button in browser it doesnt go back
[09:42:05] Andr3as: if i click it again, it goes back to the page i've visited before the one with datatables on it
[09:42:41] Andr3as: if i type in another url in the browser bar instead of clicking a link to navigate away from that page and click the back button, it works
[09:43:08] Andr3as: so i guess its a turbolinks issue? anyone ever experienced this and maybe have a tipp how to fix it?
[09:43:22] Andr3as: i dont want to get rid of turbolinks as i like the speed
[09:43:24] byteflame: has joined #RubyOnRails
[09:45:09] lxsameer: has joined #RubyOnRails
[09:47:48] jenrzzz: has joined #RubyOnRails
[09:55:49] nOwz: has joined #RubyOnRails
[09:59:04] srinidhi: has joined #RubyOnRails
[10:00:57] artto: has joined #RubyOnRails
[10:02:45] Ergo: has joined #RubyOnRails
[10:03:13] tvw: has joined #RubyOnRails
[10:09:23] naprimer: has joined #RubyOnRails
[10:18:45] doublemalt__: has joined #RubyOnRails
[10:22:44] foli_: has joined #RubyOnRails
[10:24:28] arBmind: has joined #RubyOnRails
[10:24:29] patarr: has joined #RubyOnRails
[10:25:13] foli_: i have this issue with this simple side bar toggle menu. When i test in it in web console it works but when i click the button on the page , nothing happends https://gist.github.com/foliwe/71d30c7fc871ce390c8ce9d17004c6a1
[10:30:03] mecnun_c: has joined #RubyOnRails
[10:31:37] pLaTo0n: has joined #RubyOnRails
[10:37:26] nOwz: has joined #RubyOnRails
[10:37:33] madrat_: has joined #RubyOnRails
[10:37:50] arBmind1: has joined #RubyOnRails
[10:39:26] Fernando-Basso: has joined #RubyOnRails
[10:42:47] tedwing: has joined #RubyOnRails
[10:44:10] byteflame: has joined #RubyOnRails
[10:44:13] srinidhi: has joined #RubyOnRails
[10:48:23] blackmesa: has joined #RubyOnRails
[10:52:38] pulkit4tech: has joined #RubyOnRails
[10:58:06] ferr1: has joined #RubyOnRails
[10:58:13] hahuang61: has joined #RubyOnRails
[10:59:47] artto: has joined #RubyOnRails
[11:07:24] nyaa: has joined #RubyOnRails
[11:09:45] artto_: has joined #RubyOnRails
[11:11:44] pickle_: has joined #RubyOnRails
[11:12:04] artto: has joined #RubyOnRails
[11:15:39] artto: has joined #RubyOnRails
[11:18:09] artto: has joined #RubyOnRails
[11:20:40] artto: has joined #RubyOnRails
[11:27:36] pickle__: has joined #RubyOnRails
[11:29:42] artto: has joined #RubyOnRails
[11:31:05] cagomez: has joined #RubyOnRails
[11:43:04] HoierM: has joined #RubyOnRails
[11:44:07] ldnunes: has joined #RubyOnRails
[11:45:14] byteflame: has joined #RubyOnRails
[11:48:33] zeddan: has joined #RubyOnRails
[11:52:08] tedwing: has joined #RubyOnRails
[11:52:58] aajjbb: has joined #RubyOnRails
[12:00:17] zeddan_: has joined #RubyOnRails
[12:02:04] blackmesa: has joined #RubyOnRails
[12:08:10] User458764: has joined #RubyOnRails
[12:11:33] Jameser: has joined #RubyOnRails
[12:14:02] artto_: has joined #RubyOnRails
[12:16:04] artto: has joined #RubyOnRails
[12:17:35] Jameser: has joined #RubyOnRails
[12:18:19] nyanz: has joined #RubyOnRails
[12:20:26] buckrockwell: has joined #RubyOnRails
[12:24:43] Jasaka: has joined #RubyOnRails
[12:25:26] patarr: has joined #RubyOnRails
[12:26:15] drale2k: has joined #RubyOnRails
[12:26:21] Jameser: has joined #RubyOnRails
[12:29:59] Jameser: has joined #RubyOnRails
[12:33:30] eclecticjohny: has joined #RubyOnRails
[12:35:32] pickle__: has joined #RubyOnRails
[12:37:02] kara_sweets: has joined #RubyOnRails
[12:38:00] nOwz: has joined #RubyOnRails
[12:42:35] drale2k: has joined #RubyOnRails
[12:45:41] byteflame: has joined #RubyOnRails
[12:48:39] pickle__: has joined #RubyOnRails
[12:51:26] User458764: has joined #RubyOnRails
[12:52:30] drale2k: has joined #RubyOnRails
[12:56:04] pickle__: has joined #RubyOnRails
[12:58:56] Dysp: has joined #RubyOnRails
[12:58:57] hahuang61: has joined #RubyOnRails
[12:59:27] harfangk: has joined #RubyOnRails
[13:00:38] Dysp: Can someone explain to me why I cannot do this?
[13:00:38] Dysp: https://gist.github.com/Dysp/7fc00733afb12dc4232a573685eb1b28
[13:01:13] rubyonrails751: has joined #RubyOnRails
[13:01:17] tbuehlmann: I can: Illness.where(category: category) returns a relation (or collection), not just a single record
[13:01:29] tbuehlmann: calling id on a single record is okay, calling it on a collection of records is not
[13:01:40] ramortegui: has joined #RubyOnRails
[13:02:22] Or1on: has joined #RubyOnRails
[13:02:26] artto: has joined #RubyOnRails
[13:02:47] Dysp: tbuehlmann: I see. However, shouldn't the method take that into account as the example here: <%= select_tag(“job[state_id]”, options_from_collection_for_select(State.find(:all), “id”, “name”)) %>?
[13:03:03] Dysp: However, using .flatten! worked, because I was appending arrays.
[13:04:19] knight33: has joined #RubyOnRails
[13:07:02] Dysp: Well, another question.. Froala, the editor, works locally, but doesn't when pushed to Heroku. It seems like the javascript isn't loaded correctly, as the console outputs TypeError: $(...).froalaEditor is not a function. How do I address this?
[13:07:27] artto: has joined #RubyOnRails
[13:08:40] kreantos: has joined #RubyOnRails
[13:08:53] Dysp: Seems like it is a routing problem, as Heroku logs (No route matches [GET] "/assets/froala_editor.min.css")
[13:13:36] tbuehlmann: how do you include the library into your rails app?
[13:14:11] artto: has joined #RubyOnRails
[13:15:18] fryguy: that's because of asset precompilation and fingerprinting
[13:16:05] fryguy: when loading things from app/assets, always use the asset_url or asset_path helpers
[13:19:16] handicraftsman: has joined #RubyOnRails
[13:20:35] Dysp: Hm. Alright. This is how I load stuff: https://gist.github.com/Dysp/349926ecc33da202331874a9dd85b0b0
[13:20:57] doodlehaus: has joined #RubyOnRails
[13:22:59] tedwing: has joined #RubyOnRails
[13:28:37] Sidoniuns: has joined #RubyOnRails
[13:29:55] fryguy: Dysp: try moving those files to requires, or consider using vendor/assets or similar
[13:30:38] centrx: has joined #RubyOnRails
[13:30:38] centrx: has joined #RubyOnRails
[13:31:01] pickle__: has joined #RubyOnRails
[13:34:13] pickle__: has joined #RubyOnRails
[13:35:48] DLSteve: has joined #RubyOnRails
[13:37:14] Dysp: fryguy: I am not very proficient in rails, so excuse me my ignorance. Froala is added via a gem; are you suggesting manually including the files in assets and via helpers refer to them?
[13:40:15] fryguy: Dysp: what gem
[13:40:31] Dysp: https://github.com/froala/wysiwyg-rails
[13:41:38] bobbobbins: has joined #RubyOnRails
[13:41:59] chagel: has joined #RubyOnRails
[13:42:04] fryguy: and where is the request to froala_editor.min.css
[13:43:08] cpruitt: has joined #RubyOnRails
[13:43:52] bobbobbins: I’m going through a bunch of html documents and parsing them into nokogiri, and I want to find the first date string anywhere in the body of the document. The date could be in several different formats, and the html doesn’t have a consistent format. Any idea the best way to do that?
[13:44:17] bobbobbins: nokogiri might not even be necessary, but I’m using it for other actions on the document too
[13:46:24] byteflame: has joined #RubyOnRails
[13:47:05] rikkipitt: has joined #RubyOnRails
[13:47:49] rikkipitt: has joined #RubyOnRails
[13:48:18] TvL2386: has joined #RubyOnRails
[13:49:08] rikkipitt: has joined #RubyOnRails
[13:49:35] mecnun_c: has joined #RubyOnRails
[13:49:46] rikkipitt: hi folks, does anyone know of a tutorial where a user can only subscribe to actioncables of data that they own?
[13:50:07] rikkipitt: i.e. actioncable authorization
[13:51:23] Dysp: fryguy: I am not sure what you mean.
[13:53:53] iceden: has joined #RubyOnRails
[13:54:21] fryguy: Dysp: where are you making a request for that file
[13:54:52] Dysp: https://gist.github.com/Dysp/349926ecc33da202331874a9dd85b0b0
[13:54:55] Dysp: I guess in application.js?
[13:56:05] fryguy: where else
[13:56:21] fryguy: you aren't making an http request for it there
[14:00:58] mecnun_c: has joined #RubyOnRails
[14:02:18] mices: has joined #RubyOnRails
[14:03:27] mices: when i run the generator it creates slim views instead of html.erb i have no idea how that happened, how do i change the templating engine back to html.erb and how could it happen as so by accident
[14:04:11] Dysp: fryguy: I am actually not elsewhere.
[14:04:26] Pumukel: has joined #RubyOnRails
[14:04:49] fryguy: Dysp: you have to be
[14:05:53] Derperperd: has joined #RubyOnRails
[14:06:09] Dysp: fryguy: In application layout I use the standard <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
[14:06:34] Dysp: And I initialize the editor via $(function() { $('#description, #etio_and_pato').froalaEditor( { ....
[14:06:53] Derperperd: has joined #RubyOnRails
[14:08:11] fryguy: Dysp: and for css?
[14:08:29] Dysp: Same story, excluding the initialization.
[14:08:43] Dysp: But that part does not seem to fail
[14:08:56] fryguy: that's what your initial logs say are failing
[14:09:09] tbuehlmann: mices: do you have slim-rails in your Gemfile?
[14:09:26] Derperperd: has joined #RubyOnRails
[14:10:59] roflmyeggo: has joined #RubyOnRails
[14:11:12] gusrub: has joined #RubyOnRails
[14:11:12] Technodrome: has joined #RubyOnRails
[14:11:46] Dysp: The css?
[14:12:14] Dysp: Yeah, that's true, actually.
[14:13:38] arBmind: has joined #RubyOnRails
[14:16:06] rikkipitt: has joined #RubyOnRails
[14:16:40] patarr: has joined #RubyOnRails
[14:16:56] rikkipitt: has joined #RubyOnRails
[14:18:39] drale2k: has joined #RubyOnRails
[14:18:46] rikkipitt: has joined #RubyOnRails
[14:20:49] rikkipitt: has joined #RubyOnRails
[14:22:07] ReBa_: With pundit, how to know if a user is able to create a new item?
[14:25:42] drale2k: has joined #RubyOnRails
[14:26:11] envint: has joined #RubyOnRails
[14:26:35] artto: has joined #RubyOnRails
[14:28:10] alex88: has joined #RubyOnRails
[14:32:58] truenito: has joined #RubyOnRails
[14:33:35] pulkit4tech: has joined #RubyOnRails
[14:36:19] cek: How do you rspec test several models that fetch data from DB? What's the procedure re: inserting test data & cleaning up?
[14:36:30] drale2k: has joined #RubyOnRails
[14:38:04] tbuehlmann: ReBa_: what's the problem exactly? writing the policy or using it?
[14:39:25] byteflame: has joined #RubyOnRails
[14:39:52] aganov: has joined #RubyOnRails
[14:40:32] fattuna: has joined #RubyOnRails
[14:40:32] froyo1: has joined #RubyOnRails
[14:41:17] froyo1: In the file chooser field in simple_form, how do you un-choose a file after you've chosen one without replacing it with another?
[14:42:11] Dysp: fryguy: Could it be that after it precompiles assets, the 'references' are still there and the files now included in the one file with another name? I am clueless atm.
[14:43:20] User458764: has joined #RubyOnRails
[14:43:26] patarr: has joined #RubyOnRails
[14:43:40] blackmesa: has joined #RubyOnRails
[14:45:01] waltair: has joined #RubyOnRails
[14:45:33] ReBa_: tbuehlmann: The new? method inside the policy was my problem. Did something wrong there.
[14:45:42] Pumukel: has joined #RubyOnRails
[14:45:44] ReBa_: It's solved and works as explained in the documentation ;)
[14:47:22] ableto: has joined #RubyOnRails
[14:50:12] tbuehlmann: froyo1: I don't think simple_form has such functionality. you could add a link which sets the value to '' or defaultValue via javascript
[14:50:59] foli_: has joined #RubyOnRails
[14:51:10] dminuoso: froyo1: Opt out of these static rails views if you want anything even slightly dynamic.
[14:51:57] artto: has joined #RubyOnRails
[14:52:44] tbuehlmann: you again, with your hipster javascript things!
[14:52:46] drale2k: has joined #RubyOnRails
[14:52:52] dminuoso: tbuehlmann: You are just jealous!
[14:53:48] mark_66: has joined #RubyOnRails
[14:57:49] dminuoso: tbuehlmann: The things you can do with redux is amazing.
[14:58:04] lightheaded: has joined #RubyOnRails
[14:58:25] dminuoso: undo/redo has never been easier. :-)
[14:58:26] froyo1: @dminuoso I'm only but a beginner, so hopefully in the future...
[14:59:24] froyo1: @tbuehlmann Apparently the value of input type file can't be changed via js due to security reasons
[14:59:38] dminuoso: froyo1: What?
[15:00:47] hahuang61: has joined #RubyOnRails
[15:01:05] dminuoso: tbuehlmann: No.
[15:01:15] pankaj: has joined #RubyOnRails
[15:01:24] patarr: has joined #RubyOnRails
[15:02:10] froyo1: Or maybe I'm doing it wrong? $("input:file").val('0') <-- is this the correct way to set the value to 0?
[15:03:01] dminuoso: froyo1: Im not so sure about the '0'. ;-)
[15:03:08] envint: has joined #RubyOnRails
[15:03:28] froyo1: ohhhh my bad
[15:03:36] tbuehlmann: file being the input field, try setting file.value to '' or to file.defaultValue
[15:03:56] dminuoso: Also ugh. jQuery :(
[15:04:05] dminuoso: You do not need jQuery for that particular problem.. at all.
[15:04:36] tbuehlmann: I like it :)
[15:04:42] dminuoso: tbuehlmann: Which part of it?
[15:04:43] artto: has joined #RubyOnRails
[15:04:52] Andr3as: hello again.. maybe now someone has an idea...? i have a page with datatables on it (dont know if this is related) and when i navigate away to another page and click the back button in browser it doesnt go back. if i click it again, it goes back to the page i've visited before the one with datatables on it... if i type in another url in the browser bar instead of clicking a link to navigate away from that page and click the back button, it
[15:04:55] dminuoso: The only thing it teaches nowadays is to not use fast standard APIs.
[15:05:02] Andr3as: so i guess its a turbolinks issue? anyone ever experienced this and maybe have a tipp how to fix it? i dont want to get rid of turbolinks as i like the speed
[15:05:10] froyo1: it works now! that was really dumb on my part; thanks for helping me out!
[15:05:12] dminuoso: I mean I get it if you use it for some of the transition parts, and its fine.
[15:05:35] tbuehlmann: https://github.com/Haeresis/vanilla-js-dom
[15:05:43] dminuoso: But the Fetch API is just superior to $.ajax, selectors are available in document (and faster)
[15:05:43] tbuehlmann: after reading this, I still really want to use jquery
[15:06:19] tbuehlmann: froyo1: great
[15:06:33] dminuoso: tbuehlmann: Just looking at the ajax example shows that this document is completely biased and by someone who wants to prove his point.
[15:07:42] snickers: has joined #RubyOnRails
[15:08:36] dminuoso: tbuehlmann: Though since I started React, there's barely anything from that page I would ever use in any solution.
[15:09:16] dminuoso: add a class to a div? <div className={this.props.active && "tbuehlmann-special"} />
[15:09:26] tbuehlmann: I would love to discuss this some more, but I have to leave for a cold beverage
[15:09:47] dminuoso: tbuehlmann: Which portion of Germany are you from again?
[15:10:27] tbuehlmann: lower saxony
[15:10:33] dminuoso: No kidding.
[15:10:34] dminuoso: Where exactly?
[15:10:41] dminuoso: We might be neighbours.
[15:11:19] tbuehlmann: living in the capital
[15:11:45] dminuoso: Well its fairly close by. We should grab a drink some day.
[15:11:55] envint: has joined #RubyOnRails
[15:12:18] dminuoso: tbuehlmann: > PM.
[15:13:04] tbuehlmann: missing the bus, bbl!
[15:15:30] envint: has joined #RubyOnRails
[15:16:50] cagomez: has joined #RubyOnRails
[15:18:52] choke: has joined #RubyOnRails
[15:20:17] drale2k: has joined #RubyOnRails
[15:25:49] greengriminal: has joined #RubyOnRails
[15:26:10] drale2k: has joined #RubyOnRails
[15:27:04] envint: has joined #RubyOnRails
[15:30:21] teddysmoker: has joined #RubyOnRails
[15:31:08] brent__: has joined #RubyOnRails
[15:31:54] tedwing: has joined #RubyOnRails
[15:34:44] Rodya_: has joined #RubyOnRails
[15:38:24] Pumukel: has joined #RubyOnRails
[15:39:52] charnel: has joined #RubyOnRails
[15:39:53] fattuna: has joined #RubyOnRails
[15:41:06] charnel: I don't know where to ask this but, in elasticsearch-dsl gem when I place 2 terms in the should block it removes one term and builds the query with one term. Anyone knows how to place 2 terms in a should block ? I need to use minimum_should_match
[15:47:05] kara_sweets: has joined #RubyOnRails
[15:47:44] [Butch]: has joined #RubyOnRails
[15:48:59] KnownSyntax: has joined #RubyOnRails
[15:50:35] [Butch]: has joined #RubyOnRails
[15:52:24] kara_sweets: what's the best way to chain active record methods without running the query immediately
[15:52:32] kara_sweets: for example - https://gist.github.com/anonymous/fbf807d6ca560b287fd3d956f392da60
[15:52:48] kara_sweets: line 35, what's the best way to build the query in the loop without it executing
[15:55:19] MrJoshua: has joined #RubyOnRails
[15:55:51] adam12: kara_sweets: Just keep appending to it. It doesnt' execute until you call #each, #to_a, etc.
[15:56:38] kara_sweets: it seems to be executing the outer method, as opposed to changing the returned where clause
[15:57:10] kara_sweets: something like undefined method FIRST_METHOD_IN_ARRAY for ActiveRecord::Relation
[15:57:27] kara_sweets: however, if I manually chain the return value; where(......), it works
[15:58:54] centrx: kara_sweets: query.count is causing it to run each iteration
[15:59:51] kara_sweets: good call...perhaps I need a third variable?
[16:02:50] greengriminal: has joined #RubyOnRails
[16:05:15] tercenya: has joined #RubyOnRails
[16:11:26] blackmesa: has joined #RubyOnRails
[16:12:04] gusrub: has joined #RubyOnRails
[16:13:31] dopamean_: has joined #RubyOnRails
[16:18:14] greengriminal: has joined #RubyOnRails
[16:27:10] drale2k: has joined #RubyOnRails
[16:27:38] gusrub: has joined #RubyOnRails
[16:33:06] drale2k: has joined #RubyOnRails
[16:33:34] fryguy: has joined #RubyOnRails
[16:36:04] drale2k: has joined #RubyOnRails
[16:41:13] cagomez: has joined #RubyOnRails
[16:43:49] artto: has joined #RubyOnRails
[16:44:57] cagomez: has joined #RubyOnRails
[16:46:10] User458764: has joined #RubyOnRails
[16:46:54] tercenya: has joined #RubyOnRails
[16:48:00] fattuna: has joined #RubyOnRails
[16:48:23] fattuna: has joined #RubyOnRails
[16:51:10] rakm: has joined #RubyOnRails
[16:51:37] Sidoniuns: has joined #RubyOnRails
[16:54:54] Sidoniuns: has joined #RubyOnRails
[16:56:24] brent__: has joined #RubyOnRails
[16:57:05] cagomez: has joined #RubyOnRails
[16:58:40] AnoHito: has joined #RubyOnRails
[16:59:59] cagomez: has joined #RubyOnRails
[17:01:29] hahuang61: has joined #RubyOnRails
[17:01:37] patarr1: has joined #RubyOnRails
[17:03:05] _djbkd: has joined #RubyOnRails
[17:03:31] greengriminal: has joined #RubyOnRails
[17:04:31] lightheaded: has joined #RubyOnRails
[17:05:03] mecnun_c: has joined #RubyOnRails
[17:05:07] kies: has joined #RubyOnRails
[17:06:50] HoierM: has joined #RubyOnRails
[17:07:14] Technodrome: has joined #RubyOnRails
[17:11:15] foli_: has joined #RubyOnRails
[17:11:54] centrx: has joined #RubyOnRails
[17:14:41] gusrub: has joined #RubyOnRails
[17:19:18] AnoHito: has joined #RubyOnRails
[17:19:39] mecnun_c: has joined #RubyOnRails
[17:21:04] dionysus69: has joined #RubyOnRails
[17:22:05] keegnotrub: has joined #RubyOnRails
[17:28:45] SteenJobs: has joined #RubyOnRails
[17:29:48] alex88_: has joined #RubyOnRails
[17:34:30] SteenJobs: has joined #RubyOnRails
[17:34:48] beingjohnm: has joined #RubyOnRails
[17:36:34] waltair: has joined #RubyOnRails
[17:37:18] Jasaka|NA: has joined #RubyOnRails
[17:41:52] shinnya: has joined #RubyOnRails
[17:42:44] hahuang61: has joined #RubyOnRails
[17:48:56] pLaTo0n: has joined #RubyOnRails
[17:49:11] jstrong: has joined #RubyOnRails
[17:49:21] Sidoniuns: has joined #RubyOnRails
[17:50:14] gusrub: has joined #RubyOnRails
[17:50:29] jstrong: Have question for all. How would you approach refactoring an excessively big ApplicationController that is overloaded with helper methods
[17:50:41] jstrong: these methods have some logical grouping, but it can be somewhat diffuse.
[17:51:08] jstrong: e.g. we have subscriptions on our platform, so plenty of helper methods such as has_subscription? current_subscription, has_active_subscription?, has_premium_subscription? etc
[17:51:43] jstrong: my first thought was to grab the helper methods by logical grouping and putting them in concerns, but struggling to know what to call the concerns. (SubscriptionConcern?) also, not sure that’s the best idea. is equivalent to sweeping trash under the rug to some extent.
[17:51:51] jstrong: any friendly suggestions?
[17:52:17] uks: has joined #RubyOnRails
[17:53:04] jstrong: I don’t want to put it under SubscriptionsHelper for exaple because that helper has a bunch of methods already defined that assist the view code (for SubscriptionsController)
[17:53:18] jstrong: the methods I’m talking about are more general and are used app-wide hence their presence at the ApplicationController level.
[17:53:46] matthewd: jstrong: I'd start with that, because it helps get a feel for things, even if it's not your ideal destination
[17:54:07] matthewd: ApplicationController::Subscriptions would be one option for the name
[17:54:15] jstrong: ah, I like that.
[17:54:29] jstrong: under folder concerns?
[17:54:44] jstrong: just trying to think what’s the most intuitive naming / file pathing …
[17:56:08] matthewd: I'd probably leave it in just app/controllers/application_controller/subscriptions.rb, personally
[17:56:11] jstrong: I guess I could just nest them under a folder application_controller, yeah.
[17:56:45] jstrong: matthewd: thanks! obviously it’s not the end goal as you said but I like your suggestion, it’s logical.
[17:57:05] matthewd: That leaves concerns/ free for stuff that's more likely to be shared by a couple of individual controllers, etc -- which is potentially the final destination
[17:57:35] jstrong: Right. Concerns shouldn’t be code specific to an entity as much as encapsulate functionality that is shared across entities.
[17:58:32] jstrong: matthewd: Let’s say you had a service object UserAuthenticator. Would you use services/user_authenticator.rb or models/user/authenticator.rb and call it User::Authenticator?
[17:58:36] matthewd: This might make you feel better along the way: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller.rb + https://github.com/ManageIQ/manageiq-ui-classic/tree/master/app/controllers/application_controller ;)
[17:58:43] pabloh: has joined #RubyOnRails
[17:59:46] matthewd: The former, I think
[18:00:10] chagel: has joined #RubyOnRails
[18:01:19] jstrong: How did y’all (assuming you work on that app) let that become so monstruous :P. Looks like a huge app.
[18:01:33] D9: has joined #RubyOnRails
[18:01:47] gusrub: has joined #RubyOnRails
[18:02:15] matthewd: I used to, but came in when it was already that big
[18:02:37] Haydos: has joined #RubyOnRails
[18:02:37] Haydos: has joined #RubyOnRails
[18:02:41] matthewd: The short answer is "startup priorities"
[18:02:49] greenhat: has joined #RubyOnRails
[18:02:58] luckyruby: has joined #RubyOnRails
[18:04:44] Spami: has joined #RubyOnRails
[18:04:44] Spami: has joined #RubyOnRails
[18:06:30] chagel: has joined #RubyOnRails
[18:07:41] jstrong: matthewd: Ouch. Makes sense.
[18:07:52] jstrong: probably now tons of overhead to develop everything
[18:12:06] Rodya_: has joined #RubyOnRails
[18:12:38] urkle: has joined #RubyOnRails
[18:12:44] matthewd: Yeah, since Red Hat acquired them and open sourced it, cleanup is a big priority
[18:17:35] _djbkd: has joined #RubyOnRails
[18:18:47] dopamean_: has joined #RubyOnRails
[18:20:20] tercenya: has joined #RubyOnRails
[18:20:24] jstrong: matthewd: how big of a team is working on that project
[18:20:28] _djbkd: has joined #RubyOnRails
[18:21:14] matthewd: About 50 developers last I heard
[18:24:37] pLaTo0n: has joined #RubyOnRails
[18:25:01] amperry: has joined #RubyOnRails
[18:30:51] greengriminal: has joined #RubyOnRails
[18:31:37] amperry: Hi folks, I've got a flag on many of my tables, 'is_active', and a default_scope on the models, 'where(is_active: true)'. Occasionally, I want records where 'is_active' is false, and have written scopes for that. Will using '.unscope' nullify both scopes, and if so, how do I work around that?
[18:31:39] MTecknology: has joined #RubyOnRails
[18:32:21] MTecknology: I have an app that was written for rails 3.0.1 and I'd like to bump it to 5.0.2. It's a relatively simple app... what kinda hell am I in for?
[18:32:39] MTecknology: Is there a nice pretty transition guide that is going to make me love RoR?
[18:34:28] workmad3: has joined #RubyOnRails
[18:34:59] User458764: has joined #RubyOnRails
[18:35:03] amperry: I.e., if I '.unscope(:where)', can I subsequently add a scope with 'where', or do I need some other workaround?
[18:36:10] jstrong: Does rails autoload only work if a module’s namespace is equivalent to its file path?
[18:36:28] Technodrome: has joined #RubyOnRails
[18:39:09] matthewd: jstrong: Yes
[18:39:23] bawsky: has joined #RubyOnRails
[18:39:49] jstrong: hm, so if I defined a module ControllerHelpers as app/controller_helpers then put that in the autoload_paths under application.rb, that should work, no?
[18:40:06] matthewd: amperry: Yes, unscope works on whatever it's called on; you can then re-scope as you like
[18:40:46] matthewd: jstrong: Which part of that is the filename?
[18:41:10] jstrong: we have app/controller_helpers/authentication.rb which defines module ControllerHelpers::Authentication
[18:41:21] matthewd: MTecknology: http://guides.rubyonrails.org/upgrading_ruby_on_rails.html
[18:41:52] matthewd: MTecknology: You'll want to go through the intermediate release series, to get & react to deprecations along the way
[18:42:15] amperry: matthewd: thanks, just tested that in console; to clarify, then, all I have to do is call a scope after calling 'unscope'? (I.e., the position is the only thing that should matter, all other things being the same?)
[18:44:30] matthewd: jstrong: app/* is in autoload_paths by default. So that would be defining Authentication, no namespace.
[18:45:28] jstrong: so if I wanted the ControllerHelpers module I would need to take my folder OUT of app.
[18:45:37] jstrong: no wonder Spree does this pattern but puts their controller helpers under lib lawl.
[18:46:16] bawsky: Hello there! Can someone help me with this factory? I fell like I am not being DRY enough
[18:46:18] bawsky: http://pastebin.com/hbq0uVnN
[18:46:25] arup_r: has joined #RubyOnRails
[18:47:01] matthewd: jstrong: Or add another level of directory: put controller_helpers/ under app/controllers/, or app/helpers/, or app/something_else/
[18:47:15] matthewd: amperry: Yes.
[18:47:42] jstrong: I guess app/controllers/controller_helpers wouldn’t be the *worst* but would prefer app/controllers/helpers
[18:47:51] jstrong: but then that gives me the Helpers namespace which I feel is not specific enough in this instance.
[18:47:55] jstrong: but perhaps I’m fretting too much
[18:48:27] bawsky: can someone help me to DRY this factory? https://gist.github.com/anonymous/16fdc8ccb16e894447d67063d06f0a7b (sent on pastebin before... guess irc filtered the link)
[18:48:46] MTecknology: matthewd: ah, bummer... I actually can't get a version of rails that old installed on newer ruby.
[18:48:50] tbuehlmann: oh, matthewd, might it be that you work with dávid at rh? met him at rubyconf in braga last year
[18:49:06] ldnunes: has joined #RubyOnRails
[18:49:08] MTecknology: installed? .. I don't know how you call what bundler install does
[18:49:19] matthewd: bawsky: I think a trait can inherit from another?
[18:49:43] MTecknology: I'll see how far back I can go and see about starting there.
[18:50:39] gusrub: has joined #RubyOnRails
[18:50:40] matthewd: MTecknology: Yeah, you'll probably want to alternately upgrade ruby & rails
[18:51:07] MTecknology: I'm using the system version of ruby and in this environemnt, getting outside of that is painful
[18:51:25] matthewd: MTecknology: In development?
[18:51:54] MTecknology: not exactly dev and I'm thinking more about deployment
[18:52:08] matthewd: You don't need to *deploy* the intermediate steps (... assuming you have at least a moderate test suite)
[18:53:13] MTecknology: aight, let's see what I can make happen..
[18:53:15] MTecknology: matthewd: Thanks! :D
[18:53:33] matthewd: MTecknology: No worries, good luck!
[18:53:55] matthewd: MTecknology: I think the bumpiest point will be switching to strong parameters
[18:55:20] jstrong: bawsky: if you can’t get the trait inheritance to work a simple but perhaps not the prettiest solution would just be to abstract the line to a method and call that method in both after builds
[18:56:29] matthewd: tbuehlmann: Yes I did indeed! (But I don't work there any more)
[19:00:33] tbuehlmann: we spent some time at the conference, that was really nice
[19:00:42] bawsky: matthewd: I was thinking something along these lines.. Do you if this is somehow possible? https://gist.github.com/anonymous/82505a50e686c0f83d013250b0f1d6c9
[19:00:49] tbuehlmann: then he met aaron and I got stickers
[19:01:38] Yonk_: has joined #RubyOnRails
[19:02:43] jstrong: basky: I don’t think so. This is not the best from a purely efficiency standpoint but you could do a trait called ‘voted’ which would, in the after build, do user.posts.each { |p| p.vote_status = :voted }
[19:02:56] jstrong: but then that’s an extra iteration and you’d have weirdness if you defined the traits in the wrong order so blegh
[19:03:16] jstrong: I would just do the method I’m telling you about
[19:03:32] bawsky: fair point
[19:04:02] matthewd: bawsky: Can you do `trait(:with_voted_comments) { after(:build) { user.posts.each {|o| o.update vote_status: :voted } } }`, *inside* the :with_comments trait?
[19:04:25] matthewd: Err, which is exactly what jstrong just said
[19:05:08] artto: has joined #RubyOnRails
[19:05:33] jstrong: Why not just make a different class altogether
[19:05:36] jstrong: factory :voted_post
[19:05:56] jstrong: err different factory*
[19:07:23] gusrub: has joined #RubyOnRails
[19:07:43] gusrub: has joined #RubyOnRails
[19:08:30] bawsky: jstrong Would be a better approach I guess. It's just that dealing with a fairly big test codebase and I'd like to keep the test files unchanged for now (but this factory code-repetition is bugging me)
[19:09:22] jstrong: bawsky: so factorygirl is useful but in my experience it really starts to break down whenever you start defining really complex factories with after / before hooks that build associations
[19:09:28] jstrong: you get into the sort of corners you’re in now.
[19:09:48] jstrong: just having a place where you can have helper methods for your specs and defining a plain old ruby method can sometimes be better as you have the full flexibility of ruby syntax
[19:10:36] bawsky: yeah I see.. really seems like so :(
[19:11:34] jstrong: very vaguely: https://gist.github.com/laspluviosillas/21ece04ad3f7ae9195876c503b0f9981
[19:12:30] jstrong: Or, alternatively, just keep the code repetition. Doesn’t seem to be that huge of a violation of DRY :p
[19:12:35] pLaTo0n: has joined #RubyOnRails
[19:15:24] MTecknology: ActionController::RoutingError (No route matches [GET] "/stylesheets/all.css"): I don't know if that's a change in apache or in rails
[19:16:49] MTecknology: The error is correct, there is no route matching /stylesheets. I don't know if apache was previously serving those or if the rails used to hand out static resources
[19:17:23] jenrzzz: has joined #RubyOnRails
[19:17:28] matthewd: MTecknology: Are you using the asset pipeline?
[19:18:00] MTecknology: I'm sorry... I have absolutely no clue. I haven't noticed anything like that.
[19:18:14] MTecknology: (oh.. this is my first intro to rails...)
[19:19:41] _djbkd: has joined #RubyOnRails
[19:19:42] buckrockwell: has joined #RubyOnRails
[19:19:54] fattuna: has joined #RubyOnRails
[19:20:57] cagomez: has joined #RubyOnRails
[19:21:28] artto: has joined #RubyOnRails
[19:21:48] MTecknology: phusion_passenger + apache + rails + ruby ... this is about as far outside of my comfort zone as I can get without running into Windows. :P
[19:25:18] MTecknology: oh! config.serve_static_assets =
[19:25:22] mikecmpbll: has joined #RubyOnRails
[19:26:32] jstrong: one of our views qq
[19:26:44] jstrong: http://imgur.com/a/LvRTi
[19:26:50] jstrong: wish I could spend 24/7 just refactoring stuff here ...
[19:27:27] MTecknology: eh, I guess that wasn't the magic answer. I was excited.
[19:28:14] matthewd: MTecknology: Have you started upgrading without getting the existing app running? :/
[19:28:46] User458764: has joined #RubyOnRails
[19:31:00] MTecknology: I got it running... partly.
[19:31:45] MTecknology: I dropped back to the earliest version of rails I could easily get my hands on (4.2.0) and started cleaning up error by error until I got it running. It's "running" now, at least parts of it are.
[19:33:01] MTecknology: for a ruby dev, I'm sure this project would be done before lunch
[19:35:32] byteflame: has joined #RubyOnRails
[19:40:21] cpruitt: has joined #RubyOnRails
[19:41:42] newcoder: has joined #RubyOnRails
[19:41:59] newcoder: Can all types of website be made with rails?
[19:42:03] envint: has joined #RubyOnRails
[19:42:35] MTecknology: I don't think rails handles static sites very well
[19:42:47] DLSteve: newcoder, For the most part I guess.
[19:43:03] newcoder: A blog website
[19:43:06] xixi: newcoder: what does this mean :D u can yes
[19:43:43] DLSteve: Early versions of twitter were built on rails, and both GitHub and GitLab are built on it.
[19:43:46] xixi: blog site would be fine i guess
[19:44:10] newcoder: Has twitter move from rails to something elese?
[19:44:28] xixi: most likely idk their current codebase ive read scala? dont quote me on that
[19:44:30] DLSteve: Yah, mostly scalla/Java based now I think.
[19:44:59] newcoder: So is twitter entired moved to java?
[19:44:59] xixi: rails is kinda, get it quick done n have a future vision most of the time
[19:45:01] lxsameer: has joined #RubyOnRails
[19:45:21] matthewd: MTecknology: If I were doing it, I would start by getting it running *as is*. If you're less experienced with Rails, I think that's even more important.
[19:45:26] DLSteve: Usually what happens when sites grow very large and move to a micro service oriented architecture.
[19:45:31] xixi: a lot of ppl start on rails because you dont need to write a lot yeah
[19:45:46] xixi: so when ur growing u need to look else where possibly
[19:45:47] jenrzzz: has joined #RubyOnRails
[19:45:47] jenrzzz: has joined #RubyOnRails
[19:46:28] xixi: gitlab is still on rails though so u can look at their source code etc
[19:46:57] carlosd: has joined #RubyOnRails
[19:47:07] Pumukel: has joined #RubyOnRails
[19:47:12] Aherin: has joined #RubyOnRails
[19:49:48] MTecknology: matthewd: eh.. kind of a really ugly spot I'm in at the moment with a very short timeline. If I can't figure it out by the end of today, I'll be expected to drop this into an old system and call it legacy.
[19:50:29] newcoder: So is twitter entired moved to java now?
[19:52:19] patarr: has joined #RubyOnRails
[19:52:38] matthewd: MTecknology: Save yourself the day, then
[19:54:02] MTecknology: dropping it into an old system is equally painful and ensures this will never again have a chance to see updates.
[19:54:45] matthewd: 1) More haste makes less speed, 2) No matter how you do it, if the app's more than the most trivial thing possible, I don't see getting it done in a day
[19:54:53] MTecknology: I'm pretty confident I'm fighting apache right now
[19:55:05] MTecknology: it's quite trivial
[19:55:33] newcoder: has left #RubyOnRails: ()
[19:55:57] byteflame: has joined #RubyOnRails
[19:56:28] buckrockwell: has joined #RubyOnRails
[19:57:46] MTecknology: I could write this same application in bottlepy in ~1wk without help..
[20:01:10] AndrewIsHere: has joined #RubyOnRails
[20:17:10] cagomez: has joined #RubyOnRails
[20:23:15] Aytan72: has joined #RubyOnRails
[20:23:53] defsdoor: has joined #RubyOnRails
[20:24:49] MTecknology: matthewd: I have three pages of this thing working! I fully expect this to break once I try to sign in, but ... that's like 80% of this app. :)
[20:25:48] jobewan: has joined #RubyOnRails
[20:30:01] byteflame: has joined #RubyOnRails
[20:32:35] MTecknology: now the sucky one... one of the gems was dropped. (two were, but it sounds like one is just not needed, no code changes). Whatever used system_timer is supposed to use Timeout. That sounds like it should probably be easy...
[20:33:04] Spami: has joined #RubyOnRails
[20:33:05] Spami: has joined #RubyOnRails
[20:33:17] centrx: has joined #RubyOnRails
[20:33:38] centrx: Any other options other than password_strength, without using a full-fledged authentication library?
[20:34:40] Aytan72: I need some help with time zones. I mass import a CSV file with a date time, although it does not include the time zone. Example: 10/21/2015 00:00:00. It is now stored in the database in UTC. The time zone is set according to the latitude/longitude. How should I convert this time to UTC in the actual time zone?
[20:35:33] Aytan72: Let's assume the time zone is Central Time
[20:35:55] srinidhi: has joined #RubyOnRails
[20:37:57] knight33: has joined #RubyOnRails
[20:38:13] blackmesa: has joined #RubyOnRails
[20:44:43] MTecknology: matthewd: for what it's worth, I completely empathize with your suggestion and know how frustrated just plowing through this makes you, but... I really do think the source is simple enough that I'm probably almost done. This thing uses sqlite to accept input, authenticate users, display input linked to other input, and provide an average and table view... that's 100% of the thing
[20:45:11] Aytan72: Anyone available to help with time zone question?
[20:46:52] matthewd: Aytan72: #in_time_zone ?
[20:48:49] NoGodDamnIdea: has joined #RubyOnRails
[20:49:56] Pumukel: has joined #RubyOnRails
[20:51:26] Spami: I have the following code `connection.execute(sql)` and SQL is a raw SQL query that takes params. I there a way to sanitize the whole query at once ?
[20:53:17] tvw: has joined #RubyOnRails
[20:56:06] _djbkd: has joined #RubyOnRails
[21:01:35] zeddan: has joined #RubyOnRails
[21:02:48] jenrzzz_: has joined #RubyOnRails
[21:02:59] MTecknology: When I use bundle to install gems "bundle install --path vendor/bundle", what do I do so my app will use that directory to look for gems? I feel like this is probably an apache configuriation... right now I just have RackBaseURI and RackEnv set.
[21:08:22] zeddan: has joined #RubyOnRails
[21:12:17] matthewd: Aytan72: !rule15
[21:12:17] helpa: Aytan72: Don't piss off Radar.
[21:12:37] matthewd: Aytan72: !rule12
[21:12:37] helpa: Aytan72: Do not PM members of the channel without first asking if that is OK.
[21:13:13] matthewd: Gah, they got renumbered in the gist (cc Radar)
[21:13:59] Aytan72: Did I do something wrong? Sorry..
[21:15:26] fryguy: MTecknology: running that command will create a .bundle/config file for you that does the right thing (you also probably want to consider the --deployment option)
[21:17:28] _djbkd: has joined #RubyOnRails
[21:17:41] lightheaded: has joined #RubyOnRails
[21:19:19] blackmesa: has joined #RubyOnRails
[21:20:04] lheaded: has joined #RubyOnRails
[21:20:28] MTecknology: fryguy: I ran across --deployment and tried that and saw .bundle/config pointing at that directory. I made sure ./vendor/bundle/ruby/2.3.0/gems/rake-10.4.2 exists. Just for the heck of it, I tried making BUNDLE_PATH the full static path, but I get "Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)" (can share all if needed)
[21:21:49] fryguy: how are you running rake
[21:22:11] MTecknology: I think I'm just relying on apache magic
[21:22:24] fryguy: apache almost certainly isn't running rake
[21:22:48] MTecknology: apache->passenger->rake?
[21:23:02] fryguy: passenger almost certainly isn't running rake
[21:25:12] MTecknology: "bundle exec rake" is the only rake-like command I've touched
[21:25:17] MTecknology: the rest is apache config
[21:25:34] fryguy: and bundle exec rake is giving that error message? or apache?
[21:27:36] mecnun_c: has joined #RubyOnRails
[21:27:44] MTecknology: Well.. I feel dense! That helped, though. Thanks!
[21:28:54] MTecknology: db:migrate required and failing because multiple migrations have the same name
[21:30:08] catbusters: has joined #RubyOnRails
[21:30:45] MTecknology: and that was simple.. :D
[21:35:23] byteflame: has joined #RubyOnRails
[21:38:18] _djbkd: has joined #RubyOnRails
[21:41:08] DrYockel: has joined #RubyOnRails
[21:41:20] cagomez: has joined #RubyOnRails
[21:42:16] zeddan: has joined #RubyOnRails
[21:42:51] sypheren: has joined #RubyOnRails
[21:43:10] _djbkd: has joined #RubyOnRails
[21:44:53] arBmind: has joined #RubyOnRails
[21:46:36] jenrzzz: has joined #RubyOnRails
[21:48:00] DrYockel: has joined #RubyOnRails
[21:49:40] NoGodDamnIdea: has joined #RubyOnRails
[21:49:40] NoGodDamnIdea: has joined #RubyOnRails
[21:51:31] meoblast001: has joined #RubyOnRails
[21:52:01] |PiP|: has joined #RubyOnRails
[21:52:49] cagomez: has joined #RubyOnRails
[21:55:36] Pumukel: has joined #RubyOnRails
[21:58:35] MTecknology: it looks like the db:migrate failed but it seems to be happy with the rest of the code at this point...
[22:01:25] MTecknology: I'm ending up with these errors when I try to run bundle exec rake http://dpaste.com/3Q1FRX2
[22:03:45] doodlehaus: has joined #RubyOnRails
[22:06:01] mecnun_c: has joined #RubyOnRails
[22:06:38] Aytan72: What was your db:migrate error?
[22:09:47] MTecknology: awe... shucks, I did a dumb
[22:10:37] MTecknology: gimme a sec and I'll get it back because I realized I just force-skipped them..
[22:10:47] MTecknology: I need to trust stackexchange less
[22:14:07] MTecknology: Aytan72: This is the db:migrate error - http://dpaste.com/16FDH6R
[22:16:41] Aytan72: MTecknology: Looks like your migration failed because you are trying to create a duplicate column. The column is named "location"
[22:17:41] Aytan72: MTecknology: You can edit the migration file and remove the location column line. Then try to run db:migrate again
[22:23:06] Xangria_: has joined #RubyOnRails
[22:23:17] das3in: has joined #RubyOnRails
[22:24:09] Xangria_: I need to implement a CMS on my website. can someone help me with the process? i don't even know where to start lol
[22:24:42] Radar: Xangria_: What does the CMS need to do?
[22:25:46] das3in: How can I loop through all the attributes of a model in a model? eg if I have a "test" model with 20 attributes... in the model can I do something as easy as "self.attributes.keys.count { |k, v| }"
[22:25:54] Xangria_: it's the webapp for a restaurant. the owner wants to be able to change menus and employees pages
[22:25:54] Radar: das3in: !why
[22:25:54] helpa: das3in: Please explain why you are trying to do this so we can better understand you.
[22:26:35] cagomez: has joined #RubyOnRails
[22:26:53] Radar: Xangria_: Why not use something like squarespace?
[22:27:11] das3in: https://gist.github.com/pelorusAnalytics/f309cd7ab12d8f97977dc02657ab7326 radar
[22:27:42] das3in: I'd like to put the score stuff into a model method
[22:27:49] das3in: def calculate_score ... end
[22:28:00] das3in: and save it in an after_create method
[22:28:32] ahrs: has joined #RubyOnRails
[22:28:36] MTecknology: That was the only thing happening in that file, so I moved it out of the way. The next migrate file produced the same dupe error so I moved it. The next three were fine. Then the last one gave a dupe. Now it's complaining about a different column not being present. I'm going to see about moving the migrate bits back and try to find a .sqlite file that the migrate can run cleanly against. I get
[22:28:42] MTecknology: the feeling this is the fault of stagnant data...
[22:29:40] cagomez: has joined #RubyOnRails
[22:29:41] MTecknology: HAH!! First try!
[22:30:03] Aytan72: Nicely done
[22:30:04] doodlehaus: has joined #RubyOnRails
[22:30:11] MTecknology: still fails..
[22:30:15] Xangria_: @Radar the CMS part is just one of the complex stuff the client wants. It really need to be made in Rails
[22:30:24] MTecknology: but a different column name
[22:31:03] Radar: Xangria_: Will the website just not work if it wasn't in Raisl?
[22:31:05] das3in: Xangria_ I'm confused about what you're confused about - making a CMS is one of the first things you shoudl be able to do in Rails... You create a form, save some text, put in in a database
[22:31:16] das3in: Xangria_ https://www.railstutorial.org/
[22:31:43] Radar: das3in: lol
[22:31:47] Xangria_: the client wants rails lol
[22:31:48] Radar: One does not simply build a CMS in Rails.
[22:32:02] Radar: Xangria: look at refinerycms then
[22:32:07] Xangria_: das3in yeh... thats a big lol
[22:32:25] das3in: Radar: lol I know I was just pointing out the vaguess of the question.
[22:32:31] das3in: Xangria_ refinery is solid
[22:32:34] Xangria_: Radar will search for Refinary thanks
[22:32:47] Xangria_: i want a full on CMS, i know how to do forms :D
[22:33:31] Radar: das3in: Seems like what you've got there will work. I don't understand what you need help with.
[22:33:36] Xangria_: basically the clients wants to log in in admin mode and change the content
[22:33:55] das3in: Radar: still not sure how to loop through attributes properly in a model. I know I can do self.name etc but can I do "self.attributes.keys" in a model?
[22:34:05] Radar: das3in: !try
[22:34:05] helpa: das3in: Why don't you try it and find out for yourself?
[22:34:58] Radar: matthewd: Looks like GFM's recent changes broke the rule numbering.
[22:35:04] _djbkd: has joined #RubyOnRails
[22:42:10] andrewray: has joined #RubyOnRails
[22:43:02] andrewray: can someone with rubocop run it over these two functions and tell me if both error? https://gist.github.com/AndrewRayCode/8bf3eeb441c15440044fc40e8cfc2a05 not sure if general rubocop or my config
[22:44:04] Radar: andrewray: Can't you... do that on your own computer?
[22:44:07] Radar: :confused_parrot:
[22:44:12] Radar: Yes, both error for me.
[22:44:37] MTecknology: Aytan72: Woohoo! I'm down to four errors and I'm pretty sure they're happening because I don't know what type of field :candidate is supposed to be
[22:45:16] Radar: andrewray: You probably want something like this: https://gist.github.com/radar/7f2ae2fd7f1ec52b5b972b511527dd1e Hard to tell because it's pseudocode
[22:45:45] Aytan72: MTecknology: Keep eliminating the errors one by one. Let me know if you run into issues
[22:45:46] andrewray: ahhh there we go
[22:47:25] MTecknology: Aytan72: I wrote db:migrate/something.rb file to create that column (easy peasy) and now I'm down to this - http://dpaste.com/01QSQQ4 - ForbiddenAttributesError and JobsControllerTest makes me assume I just incorrectly created the column so now it seems a matter of figuring out what it's supposed to be.
[22:47:34] andrewray: originally had the second fn, and rubocop complained and said change it to the first, but the first complained also, and was confused about the resolution
[22:47:45] andrewray: sounds like something it would be nice for rubocop to detect
[22:48:28] envint: has joined #RubyOnRails
[22:48:42] MTecknology: Aytan72: heh... and schema.rb is nice enough to tell me it's text :D
[22:49:26] MTecknology: I still get the exact same four errors, though, but at least I'm pretty sure :text is correct
[22:50:26] Aytan72: MTecknology: You're still getting duplicate column errors?
[22:52:33] MTecknology: Aytan72: nope! I found a clean sqlite file and db:migrate ran cleanly. Then all 17 tests failed because the column was missing from the table. I created a migrate/<date>_<desc>.rb file to add the column it was upset about and confirmed it's type w/ schema.rb. Now I'm down to just those four. I'm looking at "should create job" now
[22:54:36] Aytan72: MTecknology: the schema.rb file should only include columns that are currently part of your database schema
[22:54:36] nahtnam: has joined #RubyOnRails
[22:54:44] brent__: has joined #RubyOnRails
[22:56:00] MTecknology: Aytan72: oh... so when I found it and happened to be correct, it's because I made it correct by running db:migrate, eh?
[22:56:44] Aytan72: MTecknology: If you see it in the schema then your migration created the column
[22:57:14] MTecknology: aight, I looked at schema and assumed I'd created the migration correctly because it was there. Thanks for correcting me
[23:05:02] andrewray: has joined #RubyOnRails
[23:11:51] gusrub: has joined #RubyOnRails
[23:15:43] blackmesa: has joined #RubyOnRails
[23:24:32] MTecknology: and now we're to the strict params thing
[23:24:47] MTecknology: I think that's why these tests are failing
[23:25:51] MTecknology: Do I create one method for every set of params that might be passed in the controller and pass that method instead of params?
[23:26:26] MTecknology: that actually sounds very easy so I assume I misunderstand something
[23:27:27] tbuehlmann: MTecknology: right, you only pass the permitted params
[23:28:49] MTecknology: hopefully that and the timer are the last source code problems. Apache still doesn't want to load anything from that vendor/bundle directory. I imagine there's a setting in apache I'm missing
[23:33:01] MTecknology: I think I have enough to buy myself one more day to work on this, and those two things don't sound too terrible.
[23:34:48] tercenya: has joined #RubyOnRails
[23:40:40] workmad3: has joined #RubyOnRails
[23:41:33] zacts: has joined #RubyOnRails
[23:42:45] ahrs: has joined #RubyOnRails
[23:43:40] Spami: has joined #RubyOnRails
[23:57:01] byteflame: has joined #RubyOnRails
[23:59:25] Pumukel: has joined #RubyOnRails