« Back to channel list

#RubyOnRails - 24 April 2017

« Back 1 day Forward 1 day »
[00:05:32] wethu: has joined #RubyOnRails
[00:22:36] Jameser: has joined #RubyOnRails
[00:26:19] sunrunner20: has joined #RubyOnRails
[00:29:39] Jameser: has joined #RubyOnRails
[00:35:19] helpa: has joined #RubyOnRails
[00:43:32] bpmedley: has joined #RubyOnRails
[00:44:53] Technodrome: has joined #RubyOnRails
[00:49:46] gusrub: has joined #RubyOnRails
[00:58:43] gambl0re: has joined #RubyOnRails
[01:06:52] wethu: OT: Anyone getting /msg spam right now?
[01:09:21] HoierM: has joined #RubyOnRails
[01:13:15] Trynemjoel: has joined #RubyOnRails
[01:16:34] patarr: has joined #RubyOnRails
[01:17:50] cerulean: has joined #RubyOnRails
[01:18:06] cerulean: can anyone recommend me a CMS for rails5 honestly i tried spina and mexican couch and didnt like it much
[01:18:19] cerulean: CMS was just like edit the page, spina is like nothing at all
[01:18:27] cerulean: i dont want refinery because it has vulnerabilities and rails 4
[01:18:36] cerulean: i refuse to use php
[01:20:30] Technodrome: cerulean CMS's have never had good traction in rails
[01:20:36] Technodrome: cerulean my full time job is drupal
[01:22:37] cerulean: im looking at nesta, its sinatra, but i agree with you. should i use drupal? this isnt for a serious software project its for a personal website
[01:22:48] cerulean: i dont think my "client" wants to write markdown or textile
[01:26:02] bronson: has joined #RubyOnRails
[01:26:14] sunrunner20: has joined #RubyOnRails
[01:26:50] cerulean: i pcked up drupal, something id normally never do
[01:27:06] cerulean: just doesnt seem like ruby is the right tool here or something. no offense
[01:30:00] cerulean: i used drupal years ago, seems nice now
[01:30:04] cerulean: has left #RubyOnRails: ()
[01:33:32] quazimodo: has joined #RubyOnRails
[01:38:23] Radar: Technodrome: hello again
[01:38:31] cam27: has left #RubyOnRails: ()
[01:38:47] Technodrome: hi Radar , sorry for my sob story :)
[01:39:03] Radar: Following up about that in PM
[01:48:42] mjora7: has joined #RubyOnRails
[02:04:36] libastral: has joined #RubyOnRails
[02:09:16] gusrub: has joined #RubyOnRails
[02:25:43] sunrunner20: has joined #RubyOnRails
[02:27:03] Jameser: has joined #RubyOnRails
[02:47:43] mroutis: has joined #RubyOnRails
[02:49:11] irishfromua: has joined #RubyOnRails
[02:57:17] mroutis: has joined #RubyOnRails
[03:03:24] sunrunner20: has joined #RubyOnRails
[03:12:31] mroutis: is there a site to read about why the "ruby heroes" were nominated?
[03:13:58] mroutis: (I'm refering to the ones named at railsconf)
[03:15:36] havenwood: mroutis: The award is no more. It has been discontinued. You can watch patch RailsConf award videos to learn more about historical awards.
[03:15:45] havenwood: /s/patch/past
[03:16:19] havenwood: mroutis: http://olivierlacan.com/posts/ruby-heroes-farewell/
[03:17:09] patarr: has joined #RubyOnRails
[03:17:31] mroutis: thanks, @havenwood
[03:21:53] sunrunner20: has joined #RubyOnRails
[03:29:58] mroutis: reading the rails doctrine, it talks about "convention over configuration", but how this "conventions" are decided and by who? does scaffolding represent this conventions?
[03:32:48] Technodrome: has joined #RubyOnRails
[03:49:41] rakm: has joined #RubyOnRails
[03:54:14] cam27: has joined #RubyOnRails
[03:58:24] sunrunner20: has joined #RubyOnRails
[04:00:49] northfurr: has joined #RubyOnRails
[04:04:42] sunrunner20: has joined #RubyOnRails
[04:05:37] mjora7: has joined #RubyOnRails
[04:21:18] dminuoso: !goodmorning
[04:21:18] helpa: おはよう ございます
[04:24:43] Radar: oooh til the ruby heroes have been discontinued!
[04:24:52] Radar: I was one of the lucky ones to win :D
[04:26:48] Radar: I agree that it would probably demotivate people who haven't won the award.
[04:27:31] Radar: mroutis: Hi :) The conventions are decided by the Rails core team and have been formed over at least a decade.
[04:28:08] Radar: mroutis: scaffolding isn't necessarily a convention... more of a feature. I think of conventions more like that every Rails app has the app's code in the "app" directory and database config is in a file called config/database.yml (usually)
[04:38:00] brent__: has joined #RubyOnRails
[04:39:19] dminuoso: Though scaffolding makes use of certain conventions, such as that an action will by default render a template with the same name.
[04:40:23] northfurr: has joined #RubyOnRails
[04:40:48] dminuoso: Radar: By the way, I have finally found the final nail in the coffin for why AMS is ultimately superior.
[04:41:16] dminuoso: Out-of-the-box json:api
[04:41:44] mjora7: has joined #RubyOnRails
[04:41:45] mroutis: Radar: thankyou
[04:42:20] dminuoso: Radar: And your redux store will thank you for using json:api :-)
[04:44:18] mroutis: indeed, AMS is awesome :P
[04:44:46] Radar: dminuoso: ha :)
[04:45:40] ikoma: has joined #RubyOnRails
[04:56:26] Trynemjoel: has joined #RubyOnRails
[05:17:58] patarr: has joined #RubyOnRails
[05:18:07] northfurr: has joined #RubyOnRails
[05:34:43] quazimodo: has joined #RubyOnRails
[05:43:23] auv5: has joined #RubyOnRails
[05:58:53] rakm: has joined #RubyOnRails
[05:59:06] mjora7: has joined #RubyOnRails
[06:39:37] hadricus: has joined #RubyOnRails
[06:40:50] hadricus: Having an issue on OSX with rbenv and brew, where Sidekiq is being loaded twice (apparently). Wondering how to find a cause. https://gist.github.com/nmanzi/73beb4ef6457b16fc9c7e5451c8e867f
[06:41:03] hadricus: Hugs to anyone who can offer advice!
[06:41:43] dminuoso: hadricus: Do you forcibly 'load' it from anywhere?
[06:41:53] hadricus: That's a big negatory.
[06:42:07] hadricus: The closest is requiring Sidekiq::Web in an initializer
[06:42:28] dminuoso: hadricus: The fastest (and dirtiest) way would be to to open your sidekiq-4.2.10/lib/sidekiq/version.rb and modify it to log the output of Kernel#caller
[06:42:36] dminuoso: Because it's stupid to guess what's causing this.
[06:42:49] hadricus: Totally, I'll try that now.
[06:45:18] rakm: has joined #RubyOnRails
[06:47:05] v|sh: has joined #RubyOnRails
[06:54:09] armyriad: has joined #RubyOnRails
[06:55:57] srinidhi: has joined #RubyOnRails
[07:08:44] hadricus: Bootscale was the cause.
[07:09:58] r3vDev: has joined #RubyOnRails
[07:13:54] morfin: has joined #RubyOnRails
[07:15:34] morfin: any idea is there something like strands from ASIO in Sidekiq?
[07:16:01] morfin: i want to execute A,B,C,D but it should be [[A,B,C]]
[07:16:16] morfin: [[A,B,C],D]
[07:17:53] morfin: i need to wait till all tasks before D finish and only then process D, but after D goes news tasks E,F,G which should be always processed after D
[07:18:50] patarr: has joined #RubyOnRails
[07:34:32] marr: has joined #RubyOnRails
[07:46:47] conta: has joined #RubyOnRails
[07:49:38] mjora7: has joined #RubyOnRails
[07:50:55] alaing: has joined #RubyOnRails
[07:50:59] alaing: good morning
[07:55:49] alaing: I'm building a gem and would like to include some js/css so far I've created a single css under my gems vendor/assets/stylesheets/_my_date_fields.scss and then in my app i try importing it into my application.css.scss using @import 'my_date_fields' but my application cannot find the file
[07:56:02] patarr: has joined #RubyOnRails
[07:56:08] alaing: File to import not found or unreadable: my_date_fields.
[07:58:30] mjora7: has joined #RubyOnRails
[07:59:02] Technodrome: has joined #RubyOnRails
[08:00:11] blackmesa: has joined #RubyOnRails
[08:00:50] mikecmpbll: has joined #RubyOnRails
[08:02:19] r3vDev: has joined #RubyOnRails
[08:22:12] Qchmqs: has joined #RubyOnRails
[08:45:34] pLaTo0n: has joined #RubyOnRails
[08:49:16] pLaTo0n: has joined #RubyOnRails
[08:55:34] dionysus69: has joined #RubyOnRails
[08:56:23] lxsameer: has joined #RubyOnRails
[08:57:08] gambl0re: has joined #RubyOnRails
[08:57:14] arBmind: has joined #RubyOnRails
[09:05:41] defswork: has joined #RubyOnRails
[09:06:16] ferr: has joined #RubyOnRails
[09:17:21] Technodrome: has joined #RubyOnRails
[09:24:08] mjora7: has joined #RubyOnRails
[09:29:19] mjora7: has joined #RubyOnRails
[09:31:18] shotbug: has joined #RubyOnRails
[09:38:46] r3vDev: has joined #RubyOnRails
[09:53:26] Olipro: has joined #RubyOnRails
[10:04:42] arBmind: has joined #RubyOnRails
[10:04:51] shotbug: has joined #RubyOnRails
[10:11:40] futilegames: has joined #RubyOnRails
[10:13:14] futilegames: has left #RubyOnRails: ()
[10:14:39] dyjakan: has joined #RubyOnRails
[10:17:55] mjora7: has joined #RubyOnRails
[10:24:06] HoierM: has joined #RubyOnRails
[10:27:44] donnib: i have this https://github.com/komagata/fastclick-rails which i have added as per instructions, in my erb file i added new FastClick(document.body); as per instructions (at least that's how i read them) but i get the error FastClick is not defined. any ideas what i am doing wrong ?
[10:27:56] workmad3: has joined #RubyOnRails
[10:30:35] r3vDev: has joined #RubyOnRails
[10:50:17] solars: has joined #RubyOnRails
[10:54:26] blackmesa: has joined #RubyOnRails
[10:56:14] gusrub: has joined #RubyOnRails
[10:58:20] conta: has joined #RubyOnRails
[10:59:36] Fernando-Basso: has joined #RubyOnRails
[11:09:28] bbrowning: has joined #RubyOnRails
[11:18:11] universa1: donnib: show your code...
[11:25:07] arBmind: has joined #RubyOnRails
[11:25:58] navo: has joined #RubyOnRails
[11:27:03] srinidhi: has joined #RubyOnRails
[11:30:56] srinidhi: has joined #RubyOnRails
[11:40:19] srinidhi: has joined #RubyOnRails
[11:47:03] srinidhi: has joined #RubyOnRails
[11:48:15] srinidhi: has joined #RubyOnRails
[11:49:03] Jameser: has joined #RubyOnRails
[11:50:09] v|sh: has joined #RubyOnRails
[11:51:55] mauro1254: has joined #RubyOnRails
[11:53:30] mauro1254: Hi folks! Is there a page with a list of middleware I can include in a Controller extending ActionController::API in order add functionalities back? I need to use helpers in jbuilder templates, but it seems they are not available.
[11:59:33] universa1: mauro1254: you can list the middleware stack.. compare it to a default rails app
[12:00:28] blackmesa: has joined #RubyOnRails
[12:00:34] mauro1254: universa1 : I use both ActionController::Base & ActionController::API
[12:01:13] mauro1254: It is a Rails 5 app that also provide an API
[12:01:35] mauro1254: I'm trying to optimize the API part
[12:02:00] universa1: mauro1254: rails middleware .
[12:02:23] mauro1254: I can create a Rails 5 app & a Rails 5 API app
[12:02:28] mauro1254: and then do a diff
[12:07:54] GodFather: has joined #RubyOnRails
[12:09:17] ldnunes: has joined #RubyOnRails
[12:17:36] srinidhi: has joined #RubyOnRails
[12:18:39] dminuoso: mauro1254: Though adding middleware blindly seems a bit silly. Is there something in particular you are looking for?
[12:18:49] universa1: view helpers
[12:19:08] mauro1254: dminuoso : perhaps is not related to middlewares
[12:19:23] dminuoso: mauro1254: It likely is not
[12:20:00] mauro1254: I probably need to include modules in the controller extending ActionController::API
[12:20:28] dminuoso: mauro1254: The Rack (this should give you a hint already) middlewares basically allow special treatment of requests.
[12:20:36] mauro1254: Something similar to https://stackoverflow.com/questions/14752935/how-to-use-view-helpers-with-rails-api-gem
[12:20:43] dminuoso: mauro1254: It's comparable with the componse() function from functional programming.
[12:21:12] mauro1254: dminuoso : is there a documentation about ActionController::API? I would like to know what to include in order to bring features back.
[12:21:41] dminuoso: mauro1254: http://edgeguides.rubyonrails.org/api_app.html#choosing-controller-modules
[12:21:54] dminuoso: Im looking at that currently to figure out what module would introduce helpers to templates.
[12:27:44] mauro1254: include ActionController::Helpers
[12:28:03] mauro1254: but then I have to add the helpers
[12:28:15] mauro1254: helper ApplicationHelper, OtherHelper, ...
[12:28:29] dminuoso: mauro1254: See, I just avoid this jbuilder nonsense entirely.
[12:28:48] dminuoso: mauro1254: I use AMS
[12:30:46] dminuoso: mauro1254: By then chosing the JSON:API adpater I can just start describing models and passing control over what fields and relationships are needed to the client. It's pretty cool.
[12:32:44] quirkycoders: has joined #RubyOnRails
[12:33:05] pupsicle: has joined #RubyOnRails
[12:34:30] Jameser: has joined #RubyOnRails
[12:39:06] pavelz: hi I am getting deprecation warning on sprockets and it directs me to https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors but where do I put that code? does not work if placed in initalizer file
[12:40:03] beauby: has joined #RubyOnRails
[12:43:01] Technodrome: has joined #RubyOnRails
[12:49:35] hashrocket: has joined #RubyOnRails
[12:50:22] universa1: pavelz: inside whatever gem raises that warning.
[12:54:29] Silox|: has joined #RubyOnRails
[12:54:54] dminuoso: hadricus: Did you by any chance figure out the cause of your error?
[12:55:23] pavelz: https://gist.github.com/pavelz/cc45cc8d68bf1b361e3c0cf4f0acf833
[12:56:08] universa1: what should we do with a stack trace without code? ...
[12:56:43] dminuoso: universa1: Based on what Im seeing code is not going to help much.
[12:57:02] dminuoso: Well, the Gemfile could be helpful at best.
[12:57:08] universa1: and again, unless you load a custom(written by yourself) sprockets extension inside your app, this code is not going inside an initializer.
[12:57:45] dminuoso: https://gist.github.com/pavelz/cc45cc8d68bf1b361e3c0cf4f0acf833#file-gistfile1-txt-L3
[12:57:47] dminuoso: ACTION pokes pavelz with universa1
[12:58:57] chouhoulis: has joined #RubyOnRails
[13:01:00] pavelz: dminuoso: added the boiler plate file.
[13:01:17] pavelz: dminuoso: question is if it does not go into initializer where would it go
[13:01:31] universa1: pavelz: inside whatever gem raises that warning.
[13:01:57] dminuoso: pavelz: ^- what he means to say is: fork the repository, commit your change, make a pull request.
[13:02:09] dminuoso: Stop monkey patching things to get rid of warnings. Its retarded.
[13:02:43] dminuoso: While you are at it you might want to check the origial repos issues and commits whether this is possibly being addressed already.
[13:03:49] pavelz: well Old sprockets were deprecated and i wonder what I would do, this link was given in the warning code how to get rid of those warnings: https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
[13:04:20] dminuoso: matthewd: Who is responsible for sprockets?
[13:04:35] universa1: pavelz: first step: figure out which gem is triggering the deprecation warning...
[13:04:49] universa1: pavelz: second step: find the initialization code inside that gem
[13:04:49] jgpawletko: has joined #RubyOnRails
[13:05:10] universa1: pavelz: third step: make the changes + what dminuoso said.
[13:11:59] handicraftsman: has joined #RubyOnRails
[13:12:41] bbrowning_: has joined #RubyOnRails
[13:21:56] patarr: has joined #RubyOnRails
[13:22:05] mordof: has joined #RubyOnRails
[13:23:06] harfangk: has joined #RubyOnRails
[13:29:25] rgr_: has joined #RubyOnRails
[13:32:06] mhenson: has joined #RubyOnRails
[13:32:28] chouhoulis: has joined #RubyOnRails
[13:39:12] DLSteve: has joined #RubyOnRails
[13:39:29] EXCHGR: has joined #RubyOnRails
[13:49:52] sonOfRa: has joined #RubyOnRails
[14:01:44] gambl0re: has joined #RubyOnRails
[14:07:55] Sigyn: has joined #RubyOnRails
[14:17:47] workmad3_: has joined #RubyOnRails
[14:19:43] pavelz: trying to joust with spring , suspend not working figured out that guard-rspec gem interferes with spring singnal handing.
[14:20:38] pLaTo0n: has joined #RubyOnRails
[14:26:20] workmad3: has joined #RubyOnRails
[14:38:08] Jameser: has joined #RubyOnRails
[14:41:09] drale2k_: has joined #RubyOnRails
[14:57:49] irishfromua: has joined #RubyOnRails
[14:58:36] choke: has joined #RubyOnRails
[15:06:13] patarr1: has joined #RubyOnRails
[15:09:25] theunraveler: has joined #RubyOnRails
[15:09:55] drale2k_: has joined #RubyOnRails
[15:17:12] beauby: dminuoso: "why AMS is ultimately superior" - superior to what? (Also, if you do json:api, you should check out http://jsonapi-rb.org )
[15:18:28] blackmesa: has joined #RubyOnRails
[15:23:56] GeorgesLeYeti: has joined #RubyOnRails
[15:28:20] GeorgesLeYeti: I want to select in a string 1 in every 2 ".
[15:28:24] AzaToth: has joined #RubyOnRails
[15:28:43] GeorgesLeYeti: For example : Hello "my" name "is" John.
[15:29:44] GeorgesLeYeti: Here I want to select the 1st " (the one before my) and the 3rd " (the one before is)
[15:30:17] polishdub: has joined #RubyOnRails
[15:30:29] GeorgesLeYeti: Btw I don't want to select the space " because the sentence could be hello"my name " is ...
[15:32:39] ravster: has joined #RubyOnRails
[15:33:56] dminuoso: beauby: Superior to jbuilder for my needs.
[15:34:21] morfin: jsonapi is nice thing
[15:34:33] morfin: with all that relations etc
[15:35:08] dminuoso: morfin: It was really stupid in the beginning because I kept handwriting all these jbuilder templates to create horribly nested respones, and then in my redux layer I completely normalized it again..
[15:35:26] dminuoso: And I ended up with custom implementations of things that were already part of the JSON:API spec..
[15:35:31] brent__: has joined #RubyOnRails
[15:35:34] ravster: morfin: Do you use jsonapi with activemodelserializer or with something else? I tried it for a little bit on a new project but found it too clunky so I went back to Oat::HAL.
[15:35:45] dminuoso: ravster: clunky?
[15:36:28] morfin: can't remember - we used it with EmberJS in one project
[15:36:29] dminuoso: ravster: Interesting, I havent heard of Oat before.
[15:36:37] ravster: dminuoso: Maybe I'm just too used to oat-hal; I used it for >2 years on a previous project.
[15:36:55] dminuoso: ravster: Fair enough. I think this is actually a good point, a lot of libraries are quite usable.
[15:37:03] dminuoso: Many just have a steep entry curve or bad documentation.
[15:38:03] morfin: i can't understand how that serialize model
[15:38:30] ravster: I might give it another shot one day, maybe with a different serializer gem.
[15:38:37] ravster: if I don't go full graphql
[15:38:53] ravster: morfin: was that directed at me?
[15:40:05] morfin: yes, not sure how do i check
[15:40:32] morfin: can't see neither activemodelserializer and Oat
[15:41:27] morfin: with JSONAPI
[15:42:34] morfin: we just inherit JSONAPI::Resource
[15:42:42] ravster: https://github.com/rails-api/active_model_serializers recommends using its built-in JSONAPI output mode
[15:43:30] morfin: we use some special gem
[15:43:31] beauby: dminuoso: Agreed that doing json:api with jbuilder is unnecessary pain. AMS is awfully slow though
[15:43:39] ravster: morfin: oh ok
[15:43:56] morfin: gem 'jsonapi-resources', '~> 0.8.0.beta2'
[15:43:57] thomasfedb: has joined #RubyOnRails
[15:44:08] ravster: morfin: sweet, I'll check it out.
[15:44:16] morfin: not sure why that version, but it handle stuff
[15:45:54] morfin: you basically create app/resources where put your resources(all relations are grabbed from models) then define route like jsonapi_resources :hotels(creates REST methods unless only used)
[15:46:26] quirkycoders: has joined #RubyOnRails
[15:46:34] ravster: interesting, so its like a parallel set of controllers?
[15:47:02] morfin: i guess it create controllers hmm
[15:47:14] ravster: I'll check it out, thanks for the link
[15:48:30] aseibert: has joined #RubyOnRails
[15:50:15] morfin: Ember has "adapter" for that and smart enough to handle relations etc)
[15:52:56] quirkycoders: has joined #RubyOnRails
[15:55:05] blackmesa: has joined #RubyOnRails
[15:58:34] catphish: has joined #RubyOnRails
[15:59:35] catphish: kind of a feature request / point for discussion: a way to destroy an object in such a way that all dependencies are recursively removed with delete_all
[16:00:02] catphish: sometimes i want to remove an object, and all its children recursively, with absolutely no regard for the consequences
[16:00:28] ahrs: has joined #RubyOnRails
[16:00:39] catphish: because i know that by the end, there will be no dependencies left
[16:01:33] morfin: dependent: :destroy ?
[16:02:08] morfin: or you use trought?
[16:05:07] catphish: dependent: :destroy does several things, it actually gets every child object and runs destroy on it, this is usually fine, but for very large trees of objects it can take a long time
[16:05:31] catphish: it also runs any callbacks, etc
[16:05:32] beauby: catphish: One way or an other you will have to traverse the tree though
[16:05:48] catphish: beauby: that's true, i realise this
[16:06:09] catphish: i just wondered if there might be a faster way to do it, like a delete_all_recursive
[16:06:39] catphish: but i realise there's got to be a lot of recursion still, a lot of state in the ruby app
[16:07:09] catphish: but fetching all child objects in full into memory isn't usually ideal
[16:07:40] beauby: catphish: Depending on what you're doing, if you only acess your tree through its root, you could just delete the root, and periodically run a job that deletes unrooted elements
[16:08:16] catphish: i suppose i could just look at every object, follow it up the tree and delete it if it's orphaned
[16:08:23] catphish: is that what you mean?
[16:08:41] catphish: in fact i could just look at every object and delete it if its immediate parent is missing
[16:08:50] catphish: eventually everything would get cleared up
[16:09:20] ravster: catphish: sounds like you are reinventing garbage collection
[16:09:31] dminuoso: catphish | kind of a feature request / point for discussion: a way to destroy an object in such a way that all dependencies are recursively removed with delete_all
[16:09:38] dminuoso: catphish: It's called using your database.
[16:09:43] catphish: ravster: does rails have it already? if so, i won't reinvent it ;)
[16:09:44] dminuoso: Use a real database that supports ON DELETE CASCADE
[16:09:45] ravster: also, that method requires that your DB tables don't use foreign-key verification.
[16:09:47] tbuehlmann: catphish: what about having a foreign_key and on_delete: :cascade?
[16:09:58] dminuoso: tbuehlmann: High five!
[16:10:06] dminuoso: We both had the same answer simultanously.
[16:10:26] catphish: dminuoso: yes, the database might be able to help, i've actually never used db foreign keys
[16:10:52] dminuoso: What the fuck?
[16:11:10] dminuoso: Pictures cant describe the facepalm I'm doing.
[16:11:21] ravster: catphish: which DB?
[16:11:36] xco: has joined #RubyOnRails
[16:11:55] catphish: rails has always handles dependencies perfectly, i've never had any cause to delegate it to the database
[16:12:07] dminuoso: catphish: Except rails does not enforce them.
[16:12:15] dminuoso: Which means its possible for a database to be in an inconsistent state.
[16:12:24] catphish: doesn't it?
[16:12:27] dminuoso: No it does not.
[16:12:48] catphish: well, not forcefully, you can choose to call delete instead of destroy and leave something orphaned
[16:12:51] ravster: catphish: Never used mariadb, but it probably supports foreign-keys. I highly recommend them, even if rails handles the associations. I find comfort in having relationships enforced at the DB-level instead of only at the application level. ymmv
[16:13:23] catphish: ravster: yeah, it makes sense, i was just never taught to do it that way i guess
[16:13:44] catphish: this would certainly solve my problem anyway, letting the database cascade the delete
[16:13:59] Technodrome: has joined #RubyOnRails
[16:14:02] dminuoso: catphish: You miss the point. The purpose of database constraints is to enforce something you assume.
[16:14:04] ravster: catphish: thats fine. I didn't know about foreign-keys for a long time either. Then the inconsistencies bit me in the ass.
[16:14:22] dminuoso: catphish: Because if at some point your database gets inconsistent you have a real problem on your hands.
[16:14:43] dminuoso: You can't reason about the database anymore. It's one of the reasons I dislike polymorphic associations so much.
[16:14:47] catphish: dminuoso: i've honestly never had a problem with it, using destroy properly, rails keeps track of everyhting as it should
[16:15:13] catphish: an orphaned object is rarely a huge problem, but i can certainly see the point
[16:15:17] dminuoso: catphish: Add a foreign key. It still works, except the database suddenly makes a *guarantee* out of a *contract*
[16:15:23] dminuoso: Contracts are great if all parties abide by them.
[16:15:50] dminuoso: Guarantees are great all the time.
[16:18:06] dminuoso: catphish: A very trivial scenario where rails cant protect you from: 2 concurrent threads. One thread receives an update to apple.bag = Bag.find_by(name: "Blue bag"); apple.save!; and the other thread receives a statement Bag.find_by(name: "Blue bag").destroy!
[16:18:15] dminuoso: catphish: Suddenly your database is screwed up. Rails could not protect you from this.
[16:18:28] gusrub: has joined #RubyOnRails
[16:18:29] dminuoso: A database constraint would have.
[16:19:41] catphish: a careful row lock might protect against that
[16:20:03] catphish: but foreign key enforcement at the database level seems better
[16:20:08] dminuoso: catphish: So suddenly you start introducing highly expensive and highly exclusive locks for absolutely no reason?
[16:20:28] dminuoso: The whole point of MVCC is that you dont have to lock. :-)
[16:20:32] gusrub: has joined #RubyOnRails
[16:20:54] catphish: that's also true
[16:21:05] catphish: dminuoso: also, there is a reason
[16:21:25] catphish: there "being a better solution" != "no reason" :)
[16:21:50] catphish: this should be mentioned more in newbie tutorials
[16:22:06] catphish: to get people into good habits
[16:22:06] dminuoso: catphish: I could come up with more scenarios that could shred the database even with excessive locking.
[16:22:43] dminuoso: catphish: Honestly? I think it should contain a link to Codd's perhaps.
[16:23:08] dminuoso: But then again Im a conservative bastard with poor temper that likes to pick on newcomers.
[16:23:15] catphish: if it even mentioned in the manual? http://guides.rubyonrails.org/association_basics.html
[16:23:40] catphish: i know how freenode works, it's all good
[16:23:54] dminuoso: catphish: I suppose one problem with the foreign_key bit is that a lot of things in the tutorials are based on "getting things done quickly"
[16:23:58] dminuoso: That implies it has to work on sqlite
[16:24:23] dminuoso: catphish: But if you feel like it could need a change make a pull request.
[16:25:03] catphish: nah, i'm good, i just wanted to justify my non-use of it in the face of your abuse :P
[16:25:12] catphish: but i do agree with you
[16:25:25] dionysus69: has joined #RubyOnRails
[16:26:20] catphish: i suppose this is a downside of an ORM that works on so many db engines
[16:26:48] catphish: you lose useful features that are lacking in a particular supported engine
[16:29:33] dminuoso: catphish: Thats why i lock myself into one particular engine and start using specific features.
[16:29:53] catphish: i usually do too tbh
[16:30:10] catphish: i just never really looked into foreign keys, they always seemed redundant
[16:56:27] gambl0re: has joined #RubyOnRails
[17:08:02] dionysus69: has joined #RubyOnRails
[17:08:08] Technodrome: has joined #RubyOnRails
[17:19:07] drale2k_: has joined #RubyOnRails
[17:19:43] zacts: has joined #RubyOnRails
[17:22:17] chouhoulis: has joined #RubyOnRails
[17:26:14] ikoma: has joined #RubyOnRails
[17:35:04] rakm: has joined #RubyOnRails
[17:45:18] Technodrome: has joined #RubyOnRails
[17:48:44] FooBarWidget: has joined #RubyOnRails
[17:54:21] defsdoor: has joined #RubyOnRails
[18:03:15] beauby: has joined #RubyOnRails
[18:03:52] choke: has joined #RubyOnRails
[18:12:50] duderonomy: has joined #RubyOnRails
[18:17:03] adlerdias: has joined #RubyOnRails
[18:31:54] akshat: has joined #RubyOnRails
[18:32:30] pupsicle: has joined #RubyOnRails
[18:35:16] blackmesa: has joined #RubyOnRails
[18:35:20] KSloth: has left #RubyOnRails: ()
[18:37:13] akshat_: has joined #RubyOnRails
[18:41:43] pLaTo0n: has joined #RubyOnRails
[18:51:42] choke: has joined #RubyOnRails
[18:53:24] choke: has joined #RubyOnRails
[18:56:02] romeoh: has joined #RubyOnRails
[19:06:34] arBmind: has joined #RubyOnRails
[19:11:10] fernandomm: has joined #RubyOnRails
[19:12:05] hive-mind: has joined #RubyOnRails
[19:23:21] lurkashflake: has joined #RubyOnRails
[19:25:20] Principito: has joined #RubyOnRails
[19:26:15] gusrub: has joined #RubyOnRails
[19:28:10] srinidhi: has joined #RubyOnRails
[19:30:00] lxsameer: has joined #RubyOnRails
[19:35:28] drale2k_: has joined #RubyOnRails
[19:36:40] gusrub: has joined #RubyOnRails
[19:38:40] fschuindt: has joined #RubyOnRails
[19:46:55] mordof: has joined #RubyOnRails
[19:52:39] mordof: does anyone know if ActionController::Parameters decided not to allow & on purpose? or if there's any harm in adding it
[20:04:00] beauby: has joined #RubyOnRails
[20:05:04] workmad3: has joined #RubyOnRails
[20:17:43] pavelz: can anyone confirm if ctrl-z works with latest rails console?
[20:18:01] mordof: what is it supposed to do?
[20:18:36] pavelz: i've had some sort of trouble with is in 4.2.8 but after disabling guard-rspec it started functiononing properly. w/stock rails5 suspend does not disengage from the the terminal
[20:19:02] mordof: works for me
[20:19:04] uks: has joined #RubyOnRails
[20:19:11] mordof: just updated from 4.2.6
[20:19:12] pavelz: ctrl-z suppose to suspend the program and it should cease interacting w/termianl.
[20:19:31] blackmesa: has joined #RubyOnRails
[20:19:31] mrgreenfur: has joined #RubyOnRails
[20:19:35] mordof: i get dropped to a normal terminal - but not sure if it would still output logs to it
[20:19:39] mordof: i've seen that happen before
[20:19:45] mordof: i haven't checked that particular use case
[20:20:06] pavelz: https://www.google.de/search?q=rails5+spring+suspend+ctrl-z&oq=rails5+spring+suspend+ctrl-z+&aqs=chrome..69i57.9719j0j7&sourceid=chrome&ie=UTF-8#q=rails+5+spring+suspend+ctrl-z+console+does+not+work
[20:20:11] pavelz: sort of like that
[20:20:44] pavelz: really annoying if you're used to old style ctrl-z/fg workflow
[20:20:55] mordof: yeah i bet
[20:21:21] pavelz: actually when you fg you get both shell and rails console talking to the termina
[20:21:47] pavelz: and can't even kill the spring either. for some reason it does not respond to TERM>
[20:23:14] mordof: has joined #RubyOnRails
[20:28:50] hahuang65: has joined #RubyOnRails
[20:30:08] gusrub: has joined #RubyOnRails
[20:32:24] Rodya_: has joined #RubyOnRails
[20:33:00] rakm: has joined #RubyOnRails
[20:33:47] lurkashflake: has left #RubyOnRails: ()
[20:42:08] Principito: has joined #RubyOnRails
[20:43:51] akshat: has joined #RubyOnRails
[20:54:07] EXCHGR: has joined #RubyOnRails
[21:02:12] Technodrome: has joined #RubyOnRails
[21:06:12] whatasunnyday: has joined #RubyOnRails
[21:07:44] whatasunnyday: Hi, I had a question about nested resources. In my new action, I call current_user.projects.build. Is there a difference between that and Project.new for the new action? For my create, I know I should use current_user.build.projects so it sets the id of the current_user automatically.
[21:08:22] whatasunnyday: Also, it should be projects.build not build.projects my mistake :)
[21:11:17] tanuki4: has joined #RubyOnRails
[21:17:23] srinidhi: has joined #RubyOnRails
[21:30:40] drale2k_: has joined #RubyOnRails
[21:45:00] tercenya: has joined #RubyOnRails
[21:45:21] Technodrome: has joined #RubyOnRails
[21:45:22] drale2k_: has joined #RubyOnRails
[21:49:41] kristofferR: has joined #RubyOnRails
[21:51:25] catbusters: has joined #RubyOnRails
[21:53:11] kristofferR: has joined #RubyOnRails
[21:58:08] Rodya_: has joined #RubyOnRails
[22:05:49] Maletor: has joined #RubyOnRails
[22:06:04] beauby: has joined #RubyOnRails
[22:45:46] beauby: has joined #RubyOnRails
[22:48:59] dionysus69: has joined #RubyOnRails
[22:52:19] Didac: has joined #RubyOnRails
[22:57:33] mikecmpbll: has joined #RubyOnRails
[23:16:39] mjora7: has joined #RubyOnRails
[23:17:42] cam27: has joined #RubyOnRails
[23:31:40] carlosd: has joined #RubyOnRails
[23:33:10] Rodya_: has joined #RubyOnRails
[23:36:47] carlosd: has joined #RubyOnRails
[23:37:57] carlosd: When using turbolinks 5 can I take it for granted that the jQuery ready event will not be triggered?
[23:38:37] carlosd: The documentation says that it will fire in the initial page load: https://github.com/turbolinks/turbolinks#running-javascript-when-a-page-loads
[23:38:43] kanzure: has joined #RubyOnRails
[23:39:36] carlosd: But it's never triggering in my application
[23:52:45] DLSteve: has joined #RubyOnRails
[23:56:39] kanzure: has joined #RubyOnRails
[23:57:38] chouhoulis: has joined #RubyOnRails
[23:59:16] patarr: has joined #RubyOnRails