« Back to channel list

#RubyOnRails - 14 June 2018

« Back 1 day Forward 1 day »
[00:16:07] orbyt_: has joined #RubyOnRails
[00:16:52] cagomez: has joined #RubyOnRails
[00:30:26] duderonomy: has joined #RubyOnRails
[00:33:24] mjolnird: has joined #RubyOnRails
[00:49:23] orbyt_: has joined #RubyOnRails
[00:50:51] Croata: has joined #RubyOnRails
[00:55:11] eckhardt: has joined #RubyOnRails
[01:04:59] yehowyada: has joined #RubyOnRails
[01:20:00] cagomez: has joined #RubyOnRails
[01:39:54] silvio_bada_bing: has joined #RubyOnRails
[01:42:11] Technodrome: has joined #RubyOnRails
[01:43:23] silvio_bada_bing: Hey guys - What is the general opinion of the Action_Policy Authorization Gem that was talked about this year at RailsConf, made by Vladmir Dementyev / Evil Martians?
[01:45:58] silvio_bada_bing: Should I go with that, or something else like Pundit / Cancancan? I have a Rails app where people can create projects on my platform, and each user can be either an Owner, or a Customer on each app. They can own some projects, or be a customer on some projects, and that is calculated by simply checking if they are the project owner or if they are in a list of Project.customers (connected through
[01:45:59] silvio_bada_bing: project_customers)… Eventually I want to add the Developers role too, so each project can have an Owner and Developers who can do various administrative things, and customers who can just view the project and make payments. Everybody else cannot see the project.. Sory for the long message :-)
[01:46:16] silvio_bada_bing: Just wanted to possibly get some opinions on which Auth framework I should go for, given my situation.
[01:46:35] Tempesta: has joined #RubyOnRails
[01:53:56] dogweather: has joined #RubyOnRails
[01:55:08] jane_booty_doe: has joined #RubyOnRails
[02:01:51] Radar: silvio_bada_bing: pundit is still widely used. I would go with that.
[02:07:26] dogweather: has joined #RubyOnRails
[02:16:08] sevenseacat: has joined #RubyOnRails
[02:18:20] silvio_bada_bing: Radar: roger that
[02:20:32] orbyt_: has joined #RubyOnRails
[02:25:02] dogweather: has joined #RubyOnRails
[02:27:09] sevenseacat: has joined #RubyOnRails
[02:32:36] Balthasar: has joined #RubyOnRails
[02:37:32] dogweather: has joined #RubyOnRails
[02:39:41] darkhanb: has joined #RubyOnRails
[02:49:07] dogweather: has joined #RubyOnRails
[02:50:05] SanguineAnomaly: has joined #RubyOnRails
[02:58:10] iAmDecim: has joined #RubyOnRails
[03:09:43] braincrash: has joined #RubyOnRails
[03:24:38] guillec: has joined #RubyOnRails
[03:26:28] ez_cat: has joined #RubyOnRails
[03:30:24] rgiscard: has joined #RubyOnRails
[03:31:49] guillec: Hello I am hoping someone can help me as I am having issues on production and I really don't understand what is going on. We are using Rails 4.2.8 and we are getting this error (can't add a new key into hash during iteration) pretty frequently. The error seems to happen mostly during background jobs. I understand the idea of the error I just don't get why it is happening in rails code. Any help would be appreciated! Here is a
[03:31:51] guillec: link to a gist with more on the error https://gist.github.com/guillec/39cbe0a2a164b85f6516c2db13500938
[03:34:08] cjohnson: You would probably need to include the full stack trace including the line from your own code that is causing it
[03:35:50] guillec: will add thanks
[03:37:46] dogweather: has joined #RubyOnRails
[03:44:30] iAmDecim: has joined #RubyOnRails
[03:45:23] iAmDecim: has joined #RubyOnRails
[03:45:41] guillec: Here is the new gist with entire stack trace https://gist.github.com/guillec/5bb4ce0ea74d57c1dfea9f205e63e0a2
[03:51:18] ez_cat: hi there!, any tutorial about rails engines? :)
[03:51:19] iAmDecim: has joined #RubyOnRails
[03:59:29] iAmDecim: has joined #RubyOnRails
[04:05:50] hfp_work: has joined #RubyOnRails
[04:12:39] BloopMonster: has joined #RubyOnRails
[04:14:55] Technodrome: has joined #RubyOnRails
[04:17:57] vedu_: has joined #RubyOnRails
[04:28:57] machinewar: has joined #RubyOnRails
[04:35:10] vedu_: has joined #RubyOnRails
[04:43:11] iAmDecim: has joined #RubyOnRails
[04:54:51] iAmDecim: has joined #RubyOnRails
[05:08:10] rafaeldelucena: has joined #RubyOnRails
[05:14:07] vedu_: has joined #RubyOnRails
[05:15:37] dogweather: has joined #RubyOnRails
[05:23:20] jcarl43: has joined #RubyOnRails
[05:24:22] silvio_bada_bing: has left #RubyOnRails: ()
[05:34:18] reber: has joined #RubyOnRails
[05:35:27] Puffball: has joined #RubyOnRails
[05:42:26] Balthasar: has joined #RubyOnRails
[05:54:33] dogweather: has joined #RubyOnRails
[05:59:42] guillec: has joined #RubyOnRails
[06:02:06] conta: has joined #RubyOnRails
[06:08:09] dogweather: has joined #RubyOnRails
[06:10:32] dionysus69: has joined #RubyOnRails
[06:18:27] psychoslave_: has joined #RubyOnRails
[06:19:55] dionysus69: has joined #RubyOnRails
[06:32:40] mtkd: has joined #RubyOnRails
[06:49:33] mtkd: has joined #RubyOnRails
[06:50:54] bijan_: has joined #RubyOnRails
[06:51:56] bijan_: Hey guys I get several warnings on rails s command complaining about fileutils.rb and "warning: already initialized constant" for some constants. Same on two machines with latest rails gem, ruby 2.5.1 via rbenv. Can anyone reproduce the problem?
[06:53:37] bijan_: here is the concrete output: https://gist.github.com/gobijan/cff23d11c0a5b779fde22fa099ed8a39
[06:55:56] sevenseacat: looks like you're using a gem that has been folded into rails core, so now there's two of everything
[06:56:12] sevenseacat: *into ruby core
[06:57:02] sevenseacat: can you remove that fileutils gem?
[07:32:36] bijan_: has joined #RubyOnRails
[07:51:55] cabotto: has joined #RubyOnRails
[07:53:41] srinidhi: has joined #RubyOnRails
[07:58:26] noob_on_rails: has joined #RubyOnRails
[07:59:37] bijan_: sevenseacat you were right: fileutils (1.1.0, default: 1.0.2) I had both installed
[08:01:30] bijan_: gem update installs ileutils-1.1.0.gem
[08:01:35] bijan_: gem update installs fileutils-1.1.0.gem
[08:01:52] bijan_: and then rails starts with warnings
[08:02:08] sevenseacat: again, can you remove the gem
[08:02:16] sevenseacat: from your app
[08:02:30] bijan_: yeah of course. I removed the updated version of fileutils and the warnings stop
[08:03:27] bijan_: but the gem is not listed in my app
[08:03:38] bijan_: nor in the gemfile.lock
[08:03:54] bijan_: so I guess there is a potential incompatibility incoming?
[08:04:55] sevenseacat: I'm confused. the warnings are now gone?
[08:04:58] sevenseacat: problem solved?
[08:05:23] bijan_: sevenseacat yeah sticking to the old fileutils gem there are no warnings
[08:05:26] vovs03: has joined #RubyOnRails
[08:05:51] bijan_: maybe I should check if rails master complains about the new fileutils version
[08:08:39] bijan_: gem "fileutils" cannot be uninstalled because it is a default gem => (version 1.0.2) If you run a "gem update" somewhere on your system then the new version is installed (1.1.0). This version leads to warnings using rails. That's the problem on my machines.
[08:08:59] bijan_: I guess many others will run into this
[08:10:23] bijan_: sevenseacat you see what I mean?
[08:10:38] sevenseacat: no, but I'm glad you fixed the problem.
[08:12:50] bijan_: sevenseacat if rails has incompatibilities with a newer fileutils version the version should be set to a fixed working one in the gemfile for new rails projects by default or the next patch release of rails should be compatible. you agree?
[08:13:04] sevenseacat: its got nothing to do with rails if its a default gem
[08:13:32] mikecmpbll: has joined #RubyOnRails
[08:15:02] dogweather: has joined #RubyOnRails
[08:15:15] conta: has joined #RubyOnRails
[08:15:22] sandstrom: has joined #RubyOnRails
[08:15:58] bijan_: what happens on your machine if you run gem update? isn't the newer fileutils gem installed?
[08:19:44] psychoslave: has joined #RubyOnRails
[08:19:49] sevenseacat: I don't do that.
[08:20:08] sevenseacat: thats not a sensible thing to do.
[08:21:55] DrYockel: has joined #RubyOnRails
[08:22:17] mauro1254: Hi folks! Is there a gem that let you consume a json web services created models that can be associated to ActiveRecord ones? Looked at ActiveResource and Her, but unfortunately association to AR models is not supported. I have a Rails API application and a few apps that need to consume this API. I created an engine with ActiveResource models and I use it in these apps. The problem is that I cannot associate app models (AR) to engine ones
[08:23:11] ams__: has joined #RubyOnRails
[08:23:30] srinidhi: has joined #RubyOnRails
[08:25:11] bijan_: sevenseacat so what is then your approach to stay on current software especially when it comes to security vulnerability fixes?
[08:25:34] sevenseacat: to update specific gems in my application's bundle, not all gems on my pc willy-nilly
[08:26:30] bijan_: but the ones on your pc are globally available and therefore could also lead to breaches on your system
[08:30:08] bijan_: lets say I publish a gem that helps you parse rss feeds. this gem has a vulnerability in it that causes prepared strings to get executed. you use that gam not only in rails but as a global gem on your machine for lets say your rss reader. how do you get an update for that security fix if it is "not a sensible" thing to do? and also how do you keep the other gems updated that you might be using for other things outside of rails updated?
[08:31:52] sevenseacat: ah you're talking about non-web software. remember you're talking in #rubyonrails :P
[08:32:10] sevenseacat: I don't have "global gems" on my machine
[08:33:04] bijan_: sevenseacat so you don't call rails a global gem?
[08:33:17] bijan_: but it is
[08:33:36] bijan_: how do you init new rails projects?
[08:33:39] sevenseacat: its part of an application bundle, like any other
[08:34:21] bijan_: but before you have your project setup: how do you init your new rails project?
[08:34:30] sevenseacat: sure I've installed rails with gem install, but after that, it gets treated like any other gem in my app
[08:34:34] bijan_: after that rails version is fixed in the bundle i agree
[08:34:45] bijan_: sevenseacat you see ;)
[08:34:55] sevenseacat: I don't see your point
[08:35:04] bijan_: no you don't want to see it
[08:35:21] sevenseacat: if you say so
[08:35:52] bijan_: "I don't have "global gems" on my machine" => sure I've installed rails with gem install
[08:36:21] sevenseacat: maybe we have different definitions of global gems
[08:36:35] dogweather: has joined #RubyOnRails
[08:38:05] padung: has joined #RubyOnRails
[08:39:14] bijan_: sevenseacat seems like. anyways thx for your hint. it ultimately solved the warnings.
[08:40:13] padung: any suggested resources to start rails ? I'm very new to rails dev. And my vscode with vscode-ruby extension cant do things like 'Go Peek Definition'.
[08:40:23] padung: It makes me hard to follow the code
[08:40:33] sevenseacat: the official guides are pretty good
[08:41:19] bijan_: padung if you need better development experience in regards to peek definition try rubymine or sublimetext with ctags
[08:41:26] tbuehlmann: I second, the guides are good starting point for when you got ruby installed: http://guides.rubyonrails.org/getting_started.html
[08:41:32] padung: The framework and language have too many magic LoL
[08:41:38] padung: it confuses me alot!
[08:41:58] sevenseacat: thats ruby for you
[08:42:01] bijan_: padung no it's not magic. it follows rules. I admit that it can be a bit overwhelming for starters
[08:42:25] padung: Just took a look at RubyMine, It's pretty cool. I gonna give it a try
[08:43:03] bijan_: padung also this gets you started in a more verbose way also teaching you some ruby on the way: https://www.railstutorial.org/book
[08:43:18] padung: Its learning curve is very high. But I guess that It's a very good start to lead to Elixir ?
[08:43:26] padung: I've heard their syntax is very similar
[08:43:28] sevenseacat: elixir is totally different
[08:43:44] sevenseacat: if you want to learn elixir, go there, don't start with ruby
[08:43:48] bijan_: you want to learn elixir with phoenix or ruby with rails?
[08:44:12] padung: Nope, I'm learning Ruby, dudes. I've just heard about the words.
[08:44:35] sevenseacat: we're not all dudes, thanks.
[08:44:54] bijan_: Elixir is a totally different beast. Also crystal is different.
[08:48:21] bijan_: btw: textmate has released a new update today. I'm thinking about using it again for rails :D
[08:49:14] padung: Alright, I see. Actually, I start with official guide. Not the whole but almost done.
[08:49:15] padung: Then, I want to test my understanding and learn writing styles.
[08:49:17] padung: So I searched project-based learning with RoR.
[08:49:21] padung: Immediately, I got confused and lost.
[08:49:24] padung: Gonna finish the least official guide and try it again with RubyMine.
[08:49:26] padung: Thanks alot!
[08:50:02] bijan_: you're welcome. have a great start into the ruby and rails world :)
[08:53:37] dogweather: has joined #RubyOnRails
[08:55:05] GeorgesLeYeti: has joined #RubyOnRails
[09:11:31] noob_on_rails: has joined #RubyOnRails
[09:15:03] dogweather: has joined #RubyOnRails
[09:29:29] srinidhi: has joined #RubyOnRails
[09:40:44] dogweather: has joined #RubyOnRails
[10:07:02] conta: has joined #RubyOnRails
[10:08:46] bbobb: has joined #RubyOnRails
[10:09:37] bbobb: has left #RubyOnRails: ()
[10:12:15] cabotto: has joined #RubyOnRails
[10:15:47] kreantos: has joined #RubyOnRails
[10:16:25] hfp_work: has joined #RubyOnRails
[10:20:25] kreantos: Hello, is it somehow possible to migrate domains from a cookie? I have a trackingscript witch sets a cookie on the domain of the tracking script lets say mytracking.com. The tracking script itself is integrated as javascript on the domain mycustomer.com. Status quo is, every guest on the website mycustomer.com has now a cookie for the domain mytracking.com. Can I somehow migrate the cookie domain from mytracking.c
[10:20:25] kreantos: om to mycustomer.com?
[10:21:36] jottr: has joined #RubyOnRails
[10:23:25] dogweather: has joined #RubyOnRails
[10:30:35] noob_on_rails: has joined #RubyOnRails
[10:36:22] cabotto: has joined #RubyOnRails
[10:44:34] hammer065: has joined #RubyOnRails
[10:51:45] syndikate: I have a ActiveJob which updates the associations of a record. The association ids are passed as arguments. As of now I blindly get the id and write it to the target record.
[10:52:01] syndikate: I found a gotcha here, if someone messes up the id order nothing can be done
[10:52:06] kreantos: has joined #RubyOnRails
[10:52:18] syndikate: Should I query the db to check if teh id exists before write?
[10:52:36] syndikate: Or should this be kept as something that the devs should take care of?
[11:15:05] BloopMonster: has joined #RubyOnRails
[11:15:47] mtkd: has joined #RubyOnRails
[11:21:34] pavelz: has joined #RubyOnRails
[11:23:06] pavelz: wonder why would .where would accept some children and not the others. like Node.where(File.all) but not Node.where(Folder.all) both are children of Node.
[11:29:53] bijan_: has joined #RubyOnRails
[11:37:57] dogweather: has joined #RubyOnRails
[11:40:39] guillec: has joined #RubyOnRails
[11:54:52] dogweather: has joined #RubyOnRails
[11:56:12] guillec: has joined #RubyOnRails
[11:58:15] gheegh: has joined #RubyOnRails
[12:02:53] rgiscard: has joined #RubyOnRails
[12:04:36] mikecmpb_: has joined #RubyOnRails
[12:05:41] Technodrome: has joined #RubyOnRails
[12:07:07] apparition47: has joined #RubyOnRails
[12:12:29] dogweather: has joined #RubyOnRails
[12:16:39] dionysus70: has joined #RubyOnRails
[12:18:09] cagomez: has joined #RubyOnRails
[12:24:09] nickjj: does anyone know offhand if you can have rails return an empty head response directly from routes.rb?
[12:24:39] nickjj: (without having to set up a controller)
[12:25:07] dogweather: has joined #RubyOnRails
[12:33:09] za1b1tsu: has joined #RubyOnRails
[12:35:16] quazimodo: has joined #RubyOnRails
[12:38:04] _aeris_: has joined #RubyOnRails
[12:42:02] bijan_: has joined #RubyOnRails
[12:42:15] dogweather: has joined #RubyOnRails
[12:43:38] conta1: has joined #RubyOnRails
[12:49:35] fmcgeough: has joined #RubyOnRails
[12:54:57] nzst: has joined #RubyOnRails
[12:55:16] deathwishdave: has joined #RubyOnRails
[12:55:56] workmad3: has joined #RubyOnRails
[12:57:23] za1b1tsu: has joined #RubyOnRails
[12:57:51] Ericx2x: has joined #RubyOnRails
[12:59:27] dogweather: has joined #RubyOnRails
[13:20:24] dionysus69: is it ok practice to use migration to seed data per capistrano deploy?
[13:22:05] skryking: dionysus69: why not use seed.rb ?
[13:22:22] dionysus69: seed.rb contains full db reset stuff
[13:22:43] dionysus69: I am talking about seeding data just for one migration that I added on this current deploy
[13:23:00] dionysus69: for example I added column to some old model and I want to populate it for existing objects
[13:23:12] skryking: ahh, makes sense to do that to me
[13:27:47] sinjin1985: has joined #RubyOnRails
[13:28:39] sinjin1985: hey guys, I used ActiveRecord::Base.connection.execute in a migration to "create function", but after i run the migration, the function only exists outside of the database
[13:29:17] sinjin1985: doesn't Rails select the database before running the query in ActiveRecord::Base.connection.execute ?
[13:33:41] dogweather: has joined #RubyOnRails
[13:48:43] pavelz: why I can pass ActiveRecord::Relation into where in 4.2 and not in 5.2
[13:53:34] Technodrome: has joined #RubyOnRails
[13:55:01] dogweather: has joined #RubyOnRails
[13:55:10] nickjj: if anyone is interested, i answered my own question, and you can define a response in routes.rb without a controller , ex. get '/ok, to: ->(_) { [200, {}, ['']] }
[14:00:04] workmad3: has joined #RubyOnRails
[14:01:39] dionysus70: has joined #RubyOnRails
[14:07:19] pavelz: sevenseacat: i think I see it. trying to replace any_of since it is not supported in rails 5.2
[14:07:42] sevenseacat: uh... don't think thats a rails method
[14:09:23] za1b1tsu: has joined #RubyOnRails
[14:12:15] dogweather: has joined #RubyOnRails
[14:15:45] bijan_: has joined #RubyOnRails
[14:16:17] Inside: has joined #RubyOnRails
[14:20:53] safetypin: has joined #RubyOnRails
[14:36:23] safetypin: has joined #RubyOnRails
[14:38:06] deathwishdave: has joined #RubyOnRails
[14:46:45] Jon30: has joined #RubyOnRails
[14:53:49] GodFather: has joined #RubyOnRails
[14:54:37] dogweather: has joined #RubyOnRails
[15:05:42] akaiiro: has joined #RubyOnRails
[15:07:28] Balthasar: has joined #RubyOnRails
[15:07:31] dogweather: has joined #RubyOnRails
[15:24:02] tcopeland: has joined #RubyOnRails
[15:25:06] dogweather: has joined #RubyOnRails
[15:31:48] sandstrom: has joined #RubyOnRails
[15:34:32] weird_error: has joined #RubyOnRails
[15:42:10] dogweather: has joined #RubyOnRails
[15:45:32] rodd: has left #RubyOnRails: ("WeeChat 1.4")
[15:49:36] choke: has joined #RubyOnRails
[15:53:56] dbugger_: has joined #RubyOnRails
[15:53:56] cagomez: has joined #RubyOnRails
[15:57:07] cagomez: has joined #RubyOnRails
[15:57:42] cagomez: has joined #RubyOnRails
[16:01:07] dogweather: has joined #RubyOnRails
[16:04:50] Technodrome: has joined #RubyOnRails
[16:06:02] mtkd: has joined #RubyOnRails
[16:06:38] KeyJoo: has joined #RubyOnRails
[16:12:19] eckhardt: has joined #RubyOnRails
[16:18:22] cagomez: has joined #RubyOnRails
[16:19:14] choke: has joined #RubyOnRails
[16:21:18] jcarl43: has joined #RubyOnRails
[16:21:23] darkhanb: has joined #RubyOnRails
[16:24:02] choke: has joined #RubyOnRails
[16:30:14] FernandoBasso: has joined #RubyOnRails
[16:34:21] lxsameer: has joined #RubyOnRails
[16:35:32] za1b1tsu: has joined #RubyOnRails
[16:42:01] lxsameer: has joined #RubyOnRails
[16:42:49] dbugger__: has joined #RubyOnRails
[16:43:35] [Butch]: has joined #RubyOnRails
[16:51:07] workmad3: has joined #RubyOnRails
[16:52:03] lxsameer: has joined #RubyOnRails
[16:55:07] dogweather: has joined #RubyOnRails
[16:59:14] bijan_: has joined #RubyOnRails
[16:59:30] orbyt_: has joined #RubyOnRails
[17:02:39] desperek: has joined #RubyOnRails
[17:07:05] kapil___: has joined #RubyOnRails
[17:07:58] dogweather: has joined #RubyOnRails
[17:16:44] za1b1tsu: has joined #RubyOnRails
[17:20:40] dogweather: has joined #RubyOnRails
[17:25:34] weird_error: has joined #RubyOnRails
[17:30:16] dblessing: has joined #RubyOnRails
[17:32:12] lxsameer: has joined #RubyOnRails
[17:42:02] dogweather: has joined #RubyOnRails
[17:42:21] lxsameer: has joined #RubyOnRails
[17:50:28] Technodrome: has joined #RubyOnRails
[17:52:12] lxsameer: has joined #RubyOnRails
[17:52:52] sameerynho: has joined #RubyOnRails
[17:53:21] srinidhi: has joined #RubyOnRails
[18:03:27] dogweather: has joined #RubyOnRails
[18:13:41] conta1: has joined #RubyOnRails
[18:17:20] cagomez: has joined #RubyOnRails
[18:17:39] cagomez: has joined #RubyOnRails
[18:34:19] nzst: What's the difference between #includes and #references? I know you can only use #references in conjunction with an includes, but I'm not sure on the difference
[18:52:07] lxsameer: has joined #RubyOnRails
[18:54:43] dogweather: has joined #RubyOnRails
[19:00:43] Terens: has joined #RubyOnRails
[19:02:06] lxsameer: has joined #RubyOnRails
[19:06:32] nzst: has left #RubyOnRails: ("Using Circe, the loveliest of all IRC clients")
[19:12:18] lxsameer: has joined #RubyOnRails
[19:14:36] cagomez: has joined #RubyOnRails
[19:16:40] schneider: has joined #RubyOnRails
[19:18:54] beingjohnm: seriously why does multiplying by a fraction always return zero like nothing happened
[19:20:35] dogweather: has joined #RubyOnRails
[19:26:27] fryguy: uh, what?
[19:26:36] fryguy: got an example to show?
[19:26:51] fryguy: i think I know what you are running into, but want to make sure
[19:27:26] beingjohnm: t = 0.01 * 100 * (5/9)
[19:28:06] beingjohnm: just researched and see that I have to add .to_f to the numerator and/or denomiantor but that feels like terrible default behaviour
[19:28:15] beingjohnm: should at least output a warning
[19:36:53] bijan_: has joined #RubyOnRails
[19:37:40] dogweather: has joined #RubyOnRails
[19:46:17] cagomez: has joined #RubyOnRails
[19:51:56] baweaver: beingjohnm: That's integer division, and it's expected.
[19:52:03] baweaver: You probably want fdiv
[19:52:18] lxsameer: has joined #RubyOnRails
[19:53:11] fryguy: instead of 5/9 and to_f, you can also do 5/9.0
[19:54:57] beingjohnm: baweaver: I'm not convinced that is expected. Maybe a warning that says "It looks like you are trying to divide two integers and you might expect a float to be returned. We're going to return zero but if you wanted a float you can use this alternative method."
[19:55:40] beingjohnm: I just can't think of a use case otherwise
[19:56:20] baweaver: Integer division is truncated, that's expected behavior and is present in C as well. The interpreter cannot reliably know that's what you mean.
[19:56:43] fryguy: beingjohnm: ruby has no mechanism to do warnings like that in core, and you are providing no hints that would cause it to think you want floats. you specify 2 integers and ask to do division, it does integer division.
[19:57:04] baweaver: That, and the entire accuracy and precision issues around Floats.
[19:57:24] dtzuzu: has joined #RubyOnRails
[19:57:56] beingjohnm: I will cede both of those points but does everybody just multiple every number inside their apps by 100?
[19:58:00] fryguy: maybe in version 3 the default could be changed. a discussion in the ruby-lang mailing list might get some progress down that regard, or some more clear technical reasons why integer division is the default
[19:59:07] beingjohnm: From a user's point of view I can't think of anytime I would want 5/9 to equal 0.
[20:00:04] baweaver: Most of the issue is around floating point precision and inability to express doubles / rationals sanely.
[20:07:17] lxsameer: has joined #RubyOnRails
[20:11:36] workmad3: has joined #RubyOnRails
[20:11:49] dogweather: has joined #RubyOnRails
[20:17:06] lxsameer: has joined #RubyOnRails
[20:17:56] cagomez: has joined #RubyOnRails
[20:21:01] blackmesa: has joined #RubyOnRails
[20:26:23] Technodrome: has joined #RubyOnRails
[20:26:40] ellcs: has joined #RubyOnRails
[20:27:04] lxsameer: has joined #RubyOnRails
[20:35:36] duderonomy: has joined #RubyOnRails
[20:37:08] lxsameer: has joined #RubyOnRails
[20:38:02] mikecmpbll: has joined #RubyOnRails
[20:47:17] lxsameer: has joined #RubyOnRails
[20:47:57] mtkd: has joined #RubyOnRails
[20:54:15] unreal: has joined #RubyOnRails
[20:54:56] Radar: GOOD MORNING
[20:57:49] BloopMonster: has joined #RubyOnRails
[21:02:18] lxsameer: has joined #RubyOnRails
[21:09:38] fmcgeough: has joined #RubyOnRails
[21:11:48] Sylario: has joined #RubyOnRails
[21:12:20] lxsameer: has joined #RubyOnRails
[21:12:44] AlHafoudh: guys, what do you use for simple model state tracking like "DRAFT PUBLISHED ARCHIVED" with tracking when did the transition happen?
[21:22:34] Ericx2x: has joined #RubyOnRails
[21:24:13] akaiiro: has joined #RubyOnRails
[21:32:09] lxsameer: has joined #RubyOnRails
[21:40:52] blackcross: has joined #RubyOnRails
[21:42:06] lxsameer: has joined #RubyOnRails
[21:42:13] hahuang65_: why do my object.changes disappear in `after_save` if I define an `after_update` callback before the `after_save`
[21:43:25] weaksauce: has joined #RubyOnRails
[21:49:36] duderonomy: has joined #RubyOnRails
[21:55:18] cnk: has joined #RubyOnRails
[21:58:30] BloopMonster: has joined #RubyOnRails
[21:58:48] cnk: Sorry off topic, but in SCSS, is there a way to convert between a variable name and the value of a variable? I am trying to create a mixin that takes color and writes something like .button-orange {color: ##ff6e1e;} I don't actually care if I pass in $color or the name, but I would love not to have to make the signature of the mixing ('orange', $orange) to get the string and the variable value
[22:03:08] dogweather: has joined #RubyOnRails
[22:09:01] cnk: has joined #RubyOnRails
[22:12:16] workmad3: has joined #RubyOnRails
[22:13:44] jottr: has joined #RubyOnRails
[22:17:06] lxsameer: has joined #RubyOnRails
[22:20:21] dogweather: has joined #RubyOnRails
[22:23:20] quazimodo: has joined #RubyOnRails
[22:27:16] lxsameer: has joined #RubyOnRails
[22:29:30] schneider: has joined #RubyOnRails
[22:30:24] Radar: AlHafoudh: This is what people typically use events for.
[22:30:55] Radar: AlHafoudh: You could create a post_events table and then track the events in there. Fields would be `from` `to` `timestamp`
[22:30:59] Radar: oh and post_id of course.
[22:31:24] Radar: Bonus points if you manage to dynamically show the current state based off the last event in the table, rather than having a field on the `posts` table do it.
[22:32:19] blackmesa: has joined #RubyOnRails
[22:37:33] dogweather: has joined #RubyOnRails
[22:38:45] schneider: has joined #RubyOnRails
[22:39:49] beingjohnm: Radar: that sounds like something I should do for my app
[22:40:22] Radar: beingjohnm: What I proposed is a ghetto version of Event Sourcing, but yeah it might be worthwhile for you to look at too :)
[22:42:00] Radar: We use _some_ event sourcing in our applications at Culture Amp, and it's really neat to be able to go through the events for a record and see where a certain field changed from one value to another.
[22:44:48] jottr: has joined #RubyOnRails
[22:47:18] beingjohnm: Just added to my too reesearch list
[22:48:05] schneider: has joined #RubyOnRails
[22:53:36] RougeR: has joined #RubyOnRails
[22:57:24] schneider: has joined #RubyOnRails
[23:02:48] GodFather: has joined #RubyOnRails
[23:06:39] schneider: has joined #RubyOnRails
[23:07:14] lxsameer: has joined #RubyOnRails
[23:10:15] Technodrome: has joined #RubyOnRails
[23:16:02] schneider: has joined #RubyOnRails
[23:17:00] lxsameer: has joined #RubyOnRails
[23:22:03] lxsameer: has joined #RubyOnRails
[23:25:17] schneider: has joined #RubyOnRails
[23:30:43] DTZUZO: has joined #RubyOnRails
[23:34:31] bambanx: has joined #RubyOnRails
[23:34:36] schneider: has joined #RubyOnRails
[23:34:51] bambanx: has joined #RubyOnRails
[23:37:20] lxsameer: has joined #RubyOnRails
[23:37:32] dviola: has joined #RubyOnRails
[23:43:56] schneider: has joined #RubyOnRails
[23:52:02] lxsameer: has joined #RubyOnRails
[23:53:31] schneider: has joined #RubyOnRails
[23:56:56] weird_error: has joined #RubyOnRails