« Back to channel list

#RubyOnRails - 25 July 2017

« Back 1 day Forward 1 day »
[00:01:56] SteenJobs_: has joined #RubyOnRails
[00:03:15] SteenJobs_: has joined #RubyOnRails
[00:11:14] jhfisc: has joined #RubyOnRails
[00:12:39] gamblor3: has joined #RubyOnRails
[00:20:40] bronson: has joined #RubyOnRails
[00:39:53] jhfisc: has joined #RubyOnRails
[00:42:11] codelahoma: has joined #RubyOnRails
[00:48:04] jhfisc: has joined #RubyOnRails
[00:48:21] quazimodo: has joined #RubyOnRails
[00:49:54] SteenJobs_: has joined #RubyOnRails
[00:50:03] ArTiSTiX: has joined #RubyOnRails
[00:53:14] jhfisc: has joined #RubyOnRails
[00:55:04] Rodya_: has joined #RubyOnRails
[00:56:21] jhfisc: has joined #RubyOnRails
[01:02:06] jhfisc: has joined #RubyOnRails
[01:06:37] gusrub: has joined #RubyOnRails
[01:08:22] cagomez: has joined #RubyOnRails
[01:08:32] cagomez: has joined #RubyOnRails
[01:09:53] cagomez: has joined #RubyOnRails
[01:10:26] jhfisc: has joined #RubyOnRails
[01:11:16] ar1a: has joined #RubyOnRails
[01:20:40] bios: hey *.. question.. if I've got an array of hashes and I want to get the value of a key in each hash to essentially treat it like an array.. in one line.. can I do that, and how?
[01:21:25] bronson: has joined #RubyOnRails
[01:22:32] jarray52: has left #RubyOnRails: ()
[01:23:21] jhfisc: has joined #RubyOnRails
[01:28:32] Radar: bios: example code please.
[01:29:57] bios: Radar: https://gist.githubusercontent.com/mikesaltsman/f2a1a5955f48134cd58a4ad8f8419ce0/raw/925192a2caf61719a0d4d0ccdbe750f483306c62/gistfile1.txt
[01:30:13] jhfisc: has joined #RubyOnRails
[01:30:25] bios: I want to end up with [275,275,216,....]
[01:30:32] bios: I think I need to look at map, possibly?
[01:31:15] bios: so I want to get all of the values for the key 'value' into an array structure
[01:31:24] bios: essentially
[01:33:43] muzik: has joined #RubyOnRails
[01:37:29] Radar: Thank you.
[01:37:49] Radar: Did you try list.map { |e| e["value"] } ?
[01:39:19] rakm: has joined #RubyOnRails
[01:42:13] jhfisc: has joined #RubyOnRails
[01:42:33] Radar: bios: if every element in that array is a hash and the key you want to access is "value", you can use map to fetch the value from each of those hashes and combine them in one big list.
[01:47:05] jhfisc: has joined #RubyOnRails
[01:57:14] Rodya_: has joined #RubyOnRails
[01:57:34] mostlybadfly: has joined #RubyOnRails
[01:57:55] cam27: Ok, so I made a users table a while back, and now I just dropped it a few days ago, but it turns out i need the create one back, what is the smartest way to do this> new migration of can I use the origional one?
[02:03:17] cagomez: has joined #RubyOnRails
[02:05:04] Radar: cam27: Create a new migration
[02:05:14] Radar: That new one can have the same content as the old migration.
[02:05:43] cam27: Ok, and what about the conflict error that gets raised, just force it?
[02:06:09] Radar: What's the conflict error? Two migrations named the same?
[02:06:54] emers2n: I have a table called priceHistories where I check the price of a certain Amazon product every few hours and save it. If I wanted to go about graphing this data, any ideas on how I could go about removing some of the excess data (Adjusting hourly data to a daily price)?
[02:11:08] agent_white: emers2n: What data do you have and what are you looking to shed?
[02:11:25] agent_white: If it's in a table, you should already be able to selectively pull the data you want.
[02:12:28] emers2n: agent_white: So I have price checks every 4 hours (so I have 6 price checks per day). I essentially want to get the last price check for every day so I can graph the price as a daily price graph
[02:12:54] emers2n: Not really sure where to begin in rails for doing that sort of a query
[02:13:08] agent_white: "get the last price check for every day" seems simple enough?
[02:13:17] muzik: When you detect the last one for the day, destroy the prior records for that day
[02:13:53] emers2n: That's a much simpler way to put it, yes
[02:14:00] muzik: so in the controller where you have the price check, check if it is the fourth for that date
[02:14:05] emers2n: good idea muzik
[02:14:14] muzik: ACTION is happy to help :) 
[02:14:30] emers2n: If I have months of pricing data though, will that be slow do you think?
[02:14:42] agent_white: If that's the case (you're deleting previous data), why gather it in the first place? You may as well do just one check a day.
[02:14:45] emers2n: in which case I could build a separate table with only the daily prices
[02:14:45] muzik: You can write a quick script to clear out the old data
[02:15:06] muzik: Of course, all of this depends on wether or not you need those other 3 records
[02:15:33] agent_white: Building a separate table seems excessive... get records for the day (6 total), take last record of those 6.
[02:15:53] muzik: The same data in 2 tables is not 3rd normal form
[02:15:57] emers2n: Because the primary function of the app is to detect price changes. For example if I want to be notified if a amazon product goes below the price xyz, so it makes sense to check multiple times in this case
[02:16:35] emers2n: I'm basically making my own version of this: https://thetracktor.com/detail/B00YPISRR6/
[02:16:43] muzik: You should only need 1 price record for each product. So every price check should destroy prior records for that product
[02:16:58] muzik: You should really only create a new record and destroy the old if the price is different
[02:16:59] agent_white: muzik: Yeah unless you're looking for daily trends I guess?
[02:17:09] emers2n: I thought about that muzik
[02:18:15] agent_white: Then you need to question why you're checking so many times per day.
[02:18:32] emers2n: In order to notify if the price changes
[02:18:33] agent_white: Seems kinda simple to get the last item for the day, though... another table? WAAAY overdoing it.
[02:18:56] agent_white: Well if it only matters at the end of the day, why not check once before the day is over?
[02:19:22] emers2n: It doesn't matter only at the end of the day
[02:19:32] agent_white: Then why delete prior records?
[02:19:35] emers2n: If the price changes in the middle of the day and it hits my price point I want to be notified of it
[02:19:58] emers2n: But for the secondary function (the daily graph), I only need a daily price point
[02:21:10] agent_white: Yeah that's easy, get the last timestamp for the day of the item? Not sure where the holdup is.
[02:21:28] Jameser: has joined #RubyOnRails
[02:21:46] emers2n: Yes, I am going to try that. Thank you for the suggestion. I was just trying to answer your questions
[02:21:53] muzik: So, you want daily history, but checks every 4 hours
[02:22:15] bronson: has joined #RubyOnRails
[02:22:30] emers2n: I have 4 price checks saved for day, but I want only 1 price for each day, yes.
[02:22:56] muzik: what if all 4 price checks are different, which would be the daily price?
[02:23:09] Jameser: has joined #RubyOnRails
[02:23:35] emers2n: the last one probably makes the most sense
[02:24:16] emers2n: It would make sense if I only saved the price if it has changed, but then it is more difficult to tell if something went wrong
[02:25:20] muzik: So, do you only need the 4 price checks on that day, than after that day they are useless?
[02:25:22] bios: Radar: thank you!.. that's the conclusion I was coming to.
[02:26:56] cam27: Radar: yes
[02:30:03] emers2n: muzik: Yeah great point there. I can certainly clean up the price checks after the day is over
[02:30:09] emers2n: Thanks for the insight!
[02:30:16] sevenseacat: has joined #RubyOnRails
[02:30:28] codelahoma: has joined #RubyOnRails
[02:32:10] cam27: Radar, I’ll just give it a differnt name
[02:32:43] cam27: But out of curiosity, I wonder if skip or force would have allowed for the same name
[02:33:51] cam27: Rails migrate help answered that
[02:40:04] Rodya_: has joined #RubyOnRails
[02:42:15] agent_white: emers2n: Yeah I was just prodding to see, as I assume if the last price is used, why not just check once a day instead? Unless you're doing hourly trends, it seems odd to create history you're just going to wipe.
[02:43:06] emers2n: agent_white: because the primary function of the app is to alert the user if the amazon price goes below their desired price, so they are able to buy it.
[02:43:28] agent_white: Ahhh! Now it makes sense.
[02:43:45] emers2n: Happy to hear
[02:46:06] Dreamer3_: has joined #RubyOnRails
[02:54:23] Dreamer3_: has joined #RubyOnRails
[02:55:57] Jameser: has joined #RubyOnRails
[03:00:40] lacuna: has joined #RubyOnRails
[03:01:41] Jameser: has joined #RubyOnRails
[03:02:54] ur5us: has joined #RubyOnRails
[03:15:24] cam27: IS dropping a table irreversible?
[03:15:35] cam27: via a migration
[03:23:27] bronson: has joined #RubyOnRails
[03:25:38] cam27: No matter how I google this question I’m getting answers I don’t need
[03:25:38] cam27: Just trying to find out if a dropped table can be rolledback?
[03:25:59] sevenseacat: no. how does Rails know what table should be created in the rollback?
[03:26:23] sevenseacat: it would also be easy to test :)
[03:31:24] cam27: I found a method for invert_drop_table
[03:32:39] cam27: but yeah, this is getting stupid, good thing I branched off, but if I try it again I’ll have new issues.
[03:32:53] cam27: I already had a table called users, now I’m trying to use devise gem
[03:34:13] cam27: when I don’t really know how everything works in rails, all of this moving things around is a nightmware for me
[03:34:35] sevenseacat: practice and exploration is how you learn how things work :)
[03:34:37] cam27: I just keep making things worse all of the time trying to make them better
[03:35:16] cam27: I can’t wait to just be awesome
[03:35:34] sevenseacat: give it time :) there will be much more frustration on the way I'm sure lol
[03:36:28] cam27: I started adding braintree today and I think I might need to make the users table in order for it to work, so I have two branches active besides master
[03:37:04] cam27: I read Radar’s blog that was lnked to me last night
[03:37:21] cam27: But now I’m just going off of their website
[03:38:01] sevenseacat: Radar's a smart dood
[03:39:21] cam27: well both links are open actually, but yeah, now I’m trying to figure out this table with devise. Keep the table and add columns for devise to work, or drop the table and go with devise. I dropped table and installed devise, but now the email column has a conflict, I tried a few things, still not letting me run the new migration
[03:39:28] cam27: yeah, both of you guys are
[03:40:09] cam27: IF I dropped the table, then why is the email column still an issue… these are the things I have to learn
[03:40:22] sevenseacat: it doesnt sound like you dropped the table
[03:40:41] sevenseacat: it sounds like you're trying to add an email column to a table that already has one, but thats a pure guess without seeing the migration or the error
[03:41:26] lamduh: has joined #RubyOnRails
[03:42:03] lamduh: Is rails good for api only applications?
[03:42:14] srinidhi: has joined #RubyOnRails
[03:42:46] cam27: sevenseacat: the schema file shows the table is gone
[03:51:01] kies: has joined #RubyOnRails
[03:53:25] Rodya_: has joined #RubyOnRails
[04:01:25] quazimod1: has joined #RubyOnRails
[04:04:23] cam27: sevenseacat: I got it. Turns out that the contents in that file said change_table, and I wanted create_table
[04:07:35] cam27: I switched over the default test/ framweork to use RSpec instead today, so though I have a lot to learn, coming back to this project, I’ve learned a lot since then, and wish I set it up with what I know now about not using 2 different db’s, devise gem is good, and rails new app —skip-test-unit, but hey, I’m doing it the hard way
[04:10:06] bios: Radar: thanks again.. that worked well!
[04:13:02] bios: hey *.. I've got an array of ruby date objects that I want to use as a bunch of strings to pass into a charting library as the x axis values. but when I call myDateObject.strftime("%a, %d %b %Y") the output has all of the quotation marks replaced with ". How can I keep that from happening? I've tried .html_safe, raw, h, replace.. but nothing seems to work
[04:13:11] ar1a_: has joined #RubyOnRails
[04:13:11] bios: any ideas?
[04:13:53] sevenseacat: what quotation marks?
[04:14:40] bios: so if I leave them as ruby Date objects, they don't have quotes in the array that gets passed into my js
[04:15:08] bios: but if I use the date formatter, it turns it to " around each item in the array
[04:15:14] bios: sec.. will gist an example
[04:15:17] sevenseacat: i suspect you should provide some code.
[04:15:58] Ropeney: has joined #RubyOnRails
[04:18:49] codelahoma: has joined #RubyOnRails
[04:19:41] bios: https://gist.github.com/mikesaltsman/b7ba63a4a242f73d15e503e14674f44b
[04:20:31] bios: OK.. hopefully that makes sense .. when I talk about the date formatter, I mean the .strftime("%a, %d %b %Y")
[04:20:54] SteenJobs_: has joined #RubyOnRails
[04:21:03] sevenseacat: well the second isnt valid JS because its missing the quotes
[04:21:18] ariedler: has joined #RubyOnRails
[04:21:19] bios: that's the issue
[04:21:29] sevenseacat: .html_safe should work on the result of the map
[04:21:48] bios: how do I format the date object to make it ["Thu, 27 Apr 2017"] and not ["Thu, 27 Apr 2017"]
[04:22:13] bios: I will try that on the map then.. sec
[04:22:13] blindMoe: has joined #RubyOnRails
[04:22:38] blindMoe: is there a trick to render a jbuilder file into a usable json object w/o using render_to_string then parsing it?
[04:22:47] bios: undefined method `html_safe' for #<Array:0x007facd49663f0>
[04:23:34] sevenseacat: wrap it in a raw() then?
[04:23:50] bios: ahh.. the whole map result
[04:23:58] cam27: So all that generating a migration is doing is stubbing out a one time use file and I provide the content that goes into the file
[04:24:17] bronson: has joined #RubyOnRails
[04:24:27] bios: haha.. NICE!
[04:24:28] sevenseacat: if you name the migration correctly, rails may populate the content for you
[04:24:29] bios: that did it
[04:24:34] sevenseacat: bios: awesome :)
[04:24:38] bios: ugh.. thanks sevenseacat !!
[04:25:18] sevenseacat: cam27: but in all honesty yeah I just use the generator to get a properly-named file with the migration boilerplate in it
[04:25:23] sevenseacat: then I fill in the contents myself
[04:26:25] cam27: Ok, well that clears up migrations for me, so I can name that file anything related to what I want to do, there’s no strict naming convention like with the model or controller
[04:27:13] sevenseacat: yep. its good to describe what you want it to do, but there's no strict naming conventions - what matters is the timestamp at the front of the filename, as that determines order
[04:28:34] cam27: ok, I was thinking my issues where with the files names (singular vs plural) turns out it was always jsut the content
[04:29:01] sevenseacat: hence i was asking yesterday to see what was in the migrations
[04:33:30] cam27: Yeah, and I snapped huh lol :) I love programming, but I really enjoy not being stuck
[04:33:34] quazimodo: has joined #RubyOnRails
[04:33:54] cam27: I’m already onto a new issue :)
[04:34:16] cam27: the new issues journey begins
[04:42:51] jhfisc: has joined #RubyOnRails
[04:47:36] timdotrb: has joined #RubyOnRails
[04:55:00] jhfisc: has joined #RubyOnRails
[04:55:08] Ropeney: has joined #RubyOnRails
[04:56:31] nahtnam: has joined #RubyOnRails
[04:58:28] Rodya_: has joined #RubyOnRails
[05:04:50] jhfisc: has joined #RubyOnRails
[05:09:51] Rodya_: has joined #RubyOnRails
[05:10:01] jhfisc: has joined #RubyOnRails
[05:12:31] codelahoma: has joined #RubyOnRails
[05:13:56] jhfisc: has joined #RubyOnRails
[05:15:43] Radar: Sorry just came back from a 2.5hr lunch. Missed messages from cam27, bios and sevenseacat.
[05:15:56] sevenseacat: this lunch better have involved alcohol
[05:16:00] Radar: It did not.
[05:16:22] Radar: It was at Red Spice Road which more than made up for it.
[05:16:37] cam27: welcome back
[05:17:03] Radar: EXTREME WINNING
[05:22:47] cam27: aaaah winning
[05:22:56] cam27: I win here and I win there
[05:23:17] jhfisc: has joined #RubyOnRails
[05:23:29] cam27: Yeah, I’m on a drug, it’s called Charlie Sheen
[05:23:38] high_fiver: has joined #RubyOnRails
[05:25:08] bronson: has joined #RubyOnRails
[05:30:08] Jameser: has joined #RubyOnRails
[05:32:38] jhfisc: has joined #RubyOnRails
[05:40:38] high_fiver: has joined #RubyOnRails
[05:45:43] jhfisc: has joined #RubyOnRails
[05:57:50] KeyJoo: has joined #RubyOnRails
[05:58:51] jhfisc: has joined #RubyOnRails
[06:00:58] Heyo: has joined #RubyOnRails
[06:01:05] Heyo: Anyone home?
[06:02:47] Heyo: I've been trying to get a functioning version of rails running on windows for a while now, and I really could use some help
[06:04:06] lamduh: yeah dont use rails on windows
[06:04:10] lamduh: cross platform is a lie
[06:04:15] jhfisc: has joined #RubyOnRails
[06:04:16] lamduh: too many gems depend on unix
[06:04:32] Heyo: So I have to setup an entire VM just to learn this?
[06:04:35] lamduh: just install virtual box with a lubuntu vm
[06:04:36] sevenseacat: well, what problems are you having?
[06:04:41] Chernobuk: has joined #RubyOnRails
[06:04:44] sevenseacat: for getting started, rails on windows is fine
[06:04:56] lamduh: setting up a vm takes like 3 seconds and windows is lame
[06:05:03] Heyo: Yeah, okay
[06:05:34] Heyo: But trying to run the applications that a Chemical Engineer uses on a Linux machine blows from what I hear
[06:05:39] sevenseacat: lamduh: sure, but if you're not familiar with any other OS, its going to take a hell of a lot longer than 3 seconds
[06:05:46] Heyo: That too
[06:05:54] sevenseacat: so let's just try to keep things moving forward
[06:06:57] Heyo: It looks like the gem is producing an error when running the server command. There's a whole long trace, but after googling around it looks like some code produces a weird bug with regular expressions and string appending.
[06:07:24] sevenseacat: if you can put that error in a gist, with the details of how you generated it, that would be useful
[06:07:26] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[06:08:01] lamduh: I just dont understand the point of learning ruby on windows if you need unix in the future. You will be limiting yourself.
[06:08:19] sevenseacat: who says anyone will need unix in the future?
[06:08:41] lamduh: I do becuase I tried learning ruby on windows when I was in college and it was horrible so I quit.
[06:08:53] lamduh: I remember having to manually install certificates
[06:09:11] Heyo: I honestly don't even really have a good idea of the scope of Ruby. I'm mostly learning this to help with some small web development things for an organizaiton I'm in
[06:09:48] sevenseacat: it's a general-purpose programming language
[06:10:44] Heyo: https://gist.github.com/anonymous/9f1958e04a0d4408fd2d8809c5f3ea8c
[06:11:21] sevenseacat: thats not at all what I asked for
[06:11:21] Heyo: I kind of figured. I know a tiny bit of Python though too, and it seems to be more robust/supported for other STEM applications, which is more my deal
[06:12:01] jhfisc: has joined #RubyOnRails
[06:12:01] Radar: Heyo: what's the error that you're seeing?
[06:12:02] Heyo: What is it that you're looking for? I'm just running the file that is generated by an untouched rails file
[06:12:09] Radar: [16:07:26] <sevenseacat> if you can put that error in a gist, with the details of how you generated it, that would be useful
[06:12:22] Radar: Heyo: sevenseacat asked for an error, you showed us some code from the Rails source.
[06:12:31] Heyo: Gotcha. My bad
[06:12:56] lamduh: has joined #RubyOnRails
[06:13:50] Heyo: https://gist.github.com/anonymous/6bbc8f669928163bfeb79e7758f2cb19
[06:14:17] sevenseacat: now that I've seen before
[06:14:22] Radar: Yes me too.
[06:14:32] Radar: Heyo: what is the version of the Rails gem mentioned in the Gemfile?
[06:15:17] Heyo: I'm running 5.1.2 on Ruby 2.4.1
[06:15:33] sevenseacat: https://github.com/rails/rails/issues/18660
[06:15:46] Radar: sevenseacat: you win
[06:16:02] Heyo: Yeah, I've been reading that thread for a bit, and have tried a couple of the suggestions
[06:16:13] Radar: matthewd: plz fix immediately
[06:16:29] sevenseacat: seems to be related to case sensitivity of folder names
[06:16:39] Radar: Heyo: https://github.com/rails/rails/issues/18660#issuecomment-284411059
[06:16:45] Radar: Heyo: Are you running this in Bash on windows?
[06:17:26] Heyo: powershell
[06:17:51] Radar: Heyo: And did you navigate to the directory like cd C:, then cd users, etc?
[06:17:54] Radar: All lowercase?
[06:18:01] Radar: Trying to work out how the path in the Rails error message is lowercased.
[06:18:38] Heyo: I'll give that a try. I've tried renaming stuff, and adjusting code, but not actually how navigate to the directories
[06:18:58] Radar: Make sure to use the right case when navigating to directories.
[06:18:59] Radar: Crazy, I know.
[06:20:07] lamduh: windows isnt case sensitive. does rails make things case sensitive?
[06:20:16] Heyo: Still produced the same error
[06:20:28] Heyo: My home directory is capitalized anyway
[06:20:58] Heyo: I'm curious about the weird appending of the extension "helper.rb" to the end of the file its looking for
[06:21:03] lamduh: wouldn't it be faster to just install a vm heh
[06:21:16] lxsameer: has joined #RubyOnRails
[06:22:28] Heyo: If you look at the error call, it's looking for a file named "application_helper.rb_helper.rb", the Rails has accidentally appended something to the file name that it doesn't need.
[06:22:47] Heyo: like Rails*
[06:23:06] ariedler: has joined #RubyOnRails
[06:25:05] matthewd: lamduh: The problem is that Rails is doing string manipulation of the path, so the OS's case insensitivity isn't enough to make it Just Work
[06:25:33] lamduh: just seems like a lot of trouble when you could spend 15 mins setting up a vm and not have to worry about a bunch of compatibility issues
[06:25:46] Radar: and then another 15 mins installing ruby
[06:25:52] Radar: and another 15 mins setting up your editor again
[06:25:56] bronson: has joined #RubyOnRails
[06:25:58] Radar: and another 15 mins waiting for Nokogiri to compile
[06:26:01] lamduh: 15 mins to install ruby? wtf world are oyu living in
[06:26:11] lamduh: Heyo, you used rubyinstaller not the ruby website right?
[06:26:19] matthewd: .. and if Rails instead just blindly treats the path case insensitively to solve this, it creates a risk of a different problem on a system that has case sensitive paths (or even the same OS in a different directory)
[06:26:20] Radar: and then another 15 mins trying to install the packages that nokogiri requires
[06:26:20] Heyo: Yeah, rubyinstaller
[06:26:57] lamduh: project setup is a one time thing. Ruby community doesnt like windows. THis isnt going to be the only issue
[06:27:12] lamduh: and I literally never got it working on windows when I tried it last year
[06:27:23] Heyo: At this point, I might just try to setup a VM tomorrow that boots Unbuntu. Not the worst thing ever.
[06:27:33] lamduh: damn. what a good idae
[06:27:46] lamduh: dont use ubuntu though. Unity will lag the shit out of your vm
[06:28:06] Heyo: I've considered looking into it anyway, since I've gotten a bit more familiar with how the fuck a computer actually functions, just didn't want to mess with something I don't know
[06:28:57] lamduh: yeah its really not that hard. you will be okay. lubuntu or xubuntu. I like lubuntu
[06:30:20] Heyo: Alright. I'll probably just deal with that tomorrow then. About how much hard drive space does a vm take up?
[06:31:27] jhfisc: has joined #RubyOnRails
[06:32:44] p8m: has joined #RubyOnRails
[06:36:27] lamduh: has left #RubyOnRails: ("Leaving")
[06:36:46] jhfisc: has joined #RubyOnRails
[06:46:17] jhfisc: has joined #RubyOnRails
[06:47:00] srinidhi: has joined #RubyOnRails
[06:51:44] apofis: has joined #RubyOnRails
[06:52:59] jhfisc: has joined #RubyOnRails
[06:56:42] tanuki: has joined #RubyOnRails
[07:00:09] high_fiver: has joined #RubyOnRails
[07:00:20] codelahoma: has joined #RubyOnRails
[07:05:06] jhfisc: has joined #RubyOnRails
[07:06:38] srinidhi: has joined #RubyOnRails
[07:08:03] codelahoma: has joined #RubyOnRails
[07:12:53] tanuki: has joined #RubyOnRails
[07:25:35] one_zero: has joined #RubyOnRails
[07:26:18] high_fiver: has joined #RubyOnRails
[07:26:51] bronson: has joined #RubyOnRails
[07:29:06] cgfbee: has joined #RubyOnRails
[07:29:48] jhfisc: has joined #RubyOnRails
[07:33:41] solars: has joined #RubyOnRails
[07:35:17] solars: hi, can anyone tell me how I would set a primary key on the schema_migrations table?
[07:35:23] solars: through a migration
[07:35:36] v|sh: has joined #RubyOnRails
[07:35:46] jhfisc: has joined #RubyOnRails
[07:36:34] Radar: seems bad
[07:36:38] Radar: why would you want to do that?
[07:38:06] solars: Radar: Why does a PK seem bad? I need to normalize the DB in order to replicate it
[07:38:14] Radar: you need to who da what now
[07:38:29] Radar: There is no reason at all to add a primary key to that table.
[07:38:36] Radar: It tracks all the migrations which have ever run on your Rails application.
[07:39:21] Radar: And I just saw my own schema_migrations table and the version field is already a primary key.
[07:39:29] Radar: Are you talking about adding a different primary key?
[07:39:43] Radar: My stop is up next. Good luck.
[07:39:44] solars: I know what the table is for, and I don't see a reason why it should not be normalized
[07:40:25] solars: Radar: not with my db, but possible that it was added to rails at a later stage
[07:40:27] sevenseacat: a) because normalizing a db table isn't 'adding another primary key' and b) you dont need to add another PK
[07:41:16] jhfisc: has joined #RubyOnRails
[07:41:49] solars: sevenseacat: I have one column and there is no PK
[07:41:54] solars: as written above
[07:42:03] sevenseacat: so why do you need one?
[07:42:24] solars: as written I need to normalize the DB for replication, thus I need a PK
[07:42:37] sevenseacat: in english, why do you need one?
[07:42:54] solars: In english?
[07:43:27] solars: I need a PK because otherwise we cannot replicate this DB, it's a requirement
[07:47:12] jhfisc: has joined #RubyOnRails
[07:47:44] sevenseacat: since rails 5, Rails has used a primary key for the schema_migrations table
[07:48:03] solars: sevenseacat: thanks, the app is older
[07:48:10] sevenseacat: i suggest upgrading it.
[07:48:46] solars: it's on rails 5, I'm not sure if rails automatically upgrades existing tables
[07:50:00] sevenseacat: our app was not created on rails 5 and has a PK for that table
[07:51:55] solars: that's weird then
[07:52:17] solars: added it manually for now
[07:52:33] muzik: has joined #RubyOnRails
[07:53:43] alexday: I have a csv file for mobile operators and country codes, which is 77kb in length, I want to get the list of country codes and split a phone number by its country code and send it in user profile response. since its 77kb I am thinking of loading it in memory. but I am not sure how to do it. as in, in config intializer, put the csv file and a class, and load them like Phonelib.country_codes = ..
[07:55:55] solars: has left #RubyOnRails: ()
[07:57:00] defsdoor: has joined #RubyOnRails
[08:00:18] jhfisc: has joined #RubyOnRails
[08:00:29] mikecmpbll: has joined #RubyOnRails
[08:05:48] jhfisc: has joined #RubyOnRails
[08:10:31] cagomez: has joined #RubyOnRails
[08:11:09] muzik: Dont worry about memory, just load it
[08:11:53] jhfisc: has joined #RubyOnRails
[08:11:55] marr: has joined #RubyOnRails
[08:16:15] jhfisc: has joined #RubyOnRails
[08:23:15] jhfisc: has joined #RubyOnRails
[08:24:39] ariedler: has joined #RubyOnRails
[08:27:58] bronson: has joined #RubyOnRails
[08:33:16] jhfisc: has joined #RubyOnRails
[08:34:04] DoubleMalt: has joined #RubyOnRails
[08:39:07] Sirecote: has joined #RubyOnRails
[08:39:16] jhfisc: has joined #RubyOnRails
[08:39:32] shamanime: has joined #RubyOnRails
[08:39:40] \13k: has joined #RubyOnRails
[08:39:54] g3funk: has joined #RubyOnRails
[08:41:22] bodie_: has joined #RubyOnRails
[08:42:03] x4ec7: has joined #RubyOnRails
[08:44:27] jhfisc: has joined #RubyOnRails
[08:45:53] x4ec7: hello guys, I am not a Ruby programmer, I heard that ROR is very good for web development, What the difference between ROR and other web frameworks(such as django, lavavel)?
[08:47:39] quazimod1: has joined #RubyOnRails
[08:48:06] muzik: Well, first you should compare the programming languages
[08:48:11] muzik: for example, python vs ruby
[08:48:20] x4ec7: Why it is the first choice for web developer
[08:48:49] muzik: Most rails applications follow the same rules and structure
[08:48:54] muzik: It does a lot of work for you
[08:49:01] muzik: its written in ruby, the greatest programming language
[08:49:09] muzik: testing is built in
[08:49:12] muzik: very easy to deploy
[08:49:27] muzik: once you know the basics, you can get a lot done very quickly
[08:49:32] muzik: multiplatform development
[08:49:39] muzik: lots of well thought out gems
[08:49:41] muzik: easy debugging
[08:49:45] muzik: The list goes on
[08:50:00] muzik: I changed from django to rails, and have never looked back
[08:50:22] clamstar: has joined #RubyOnRails
[08:52:03] jhfisc: has joined #RubyOnRails
[08:52:03] x4ec7: muzik Thanks for the explanation, I'll try RoR
[08:52:13] muzik: My pleasure :)
[08:53:36] workmad3: has joined #RubyOnRails
[08:54:56] moeabdol: has joined #RubyOnRails
[08:55:04] x4ec7: has left #RubyOnRails: ("ERC (IRC client for Emacs 25.2.1)")
[08:55:20] srinidhi: has joined #RubyOnRails
[08:55:51] codelahoma: has joined #RubyOnRails
[09:03:47] moeabdol: I'm trying to create an embeddable widget with rails
[09:04:02] moeabdol: the widget should be embeddable in other sites using <script> tag
[09:04:18] moeabdol: I looked into this https://www.quora.com/How-do-I-create-a-embeddable-widget-in-rails
[09:04:30] moeabdol: and it works for simple listing
[09:04:59] moeabdol: I want to be able to have forms inside this widget where users can post back to the rails server through the widget
[09:05:13] moeabdol: is this doable?
[09:05:56] muzik: it should be. You should just need the controller on your server accept the call, and send something back
[09:06:48] moeabdol: has joined #RubyOnRails
[09:07:03] moeabdol: sorry got d/c
[09:07:19] muzik: it should be. You should just need the controller on your server accept the call, and send something back
[09:08:02] jhfisc: has joined #RubyOnRails
[09:08:07] moeabdol: muzik: I have my controller working fine if I do the post through localhost:3000
[09:08:31] moeabdol: I embedded my <script> inside an index.html and opened it in the browser
[09:08:49] moeabdol: it shows the form, but when I submit the form nothing is posted back to rails server
[09:09:26] muzik: Check the link. Is the link using your host as its root, or the host of the other site?
[09:11:26] moeabdol: muzik: you're right
[09:11:45] muzik: ACTION is happy to help :) 
[09:12:00] moeabdol: the form has an action attribute that points to /messages/new
[09:12:23] moeabdol: I tried to user messages_url in simple_form_for as the post url
[09:12:35] moeabdol: but still it shows /messages/new
[09:13:55] jhfisc: has joined #RubyOnRails
[09:15:37] krmela: has joined #RubyOnRails
[09:16:19] moeabdol: thanks muzik Got it :)
[09:16:36] muzik: How did you fix it?
[09:19:36] moeabdol: muzik: I provided the absolute url: "http://localhost:3000/messages"
[09:19:41] moeabdol: you were right
[09:19:50] muzik: I dont think that is the best solution
[09:20:00] muzik: _url as opposed to _path should work for the ruby url
[09:20:17] codelahoma: has joined #RubyOnRails
[09:20:21] jhfisc: has joined #RubyOnRails
[09:20:31] krmela: good day there
[09:20:32] muzik: You will need to change the link anywhere else in your code if it is used anywhere else
[09:20:38] moeabdol: yeah I thought so too, but I guess it's not working since it's embedded in another site
[09:20:55] muzik: hhmmm. Maybe define a variable in the controller of the real site and use that
[09:21:08] muzik: thats still better than hardcoding in the view
[09:21:52] moeabdol: true...because it won't work in production if I hard code it this way
[09:22:16] muzik: yeppers. if it is hardcoded in the controller, you will only have to change it in one place
[09:23:14] moeabdol: muzik: it works now :) i did simple_form_for @message, url: messages_url, method: :post
[09:23:16] moeabdol: and it works
[09:23:28] muzik: excellent :)
[09:23:30] muzik: Well done
[09:23:40] moeabdol: I want to have your babies hahahahaha
[09:24:29] moeabdol: sorry....was just meant as a joke....but I appreciate your help
[09:24:39] muzik: All good. We are having a laugh as it is very funny
[09:24:58] krmela: i have question i have @orders = Order.where(:datum => @date.beginning_of_week..@date.end_of_week)each day can have just one order or none how to get to order for some day
[09:25:12] moeabdol: I tried asking the same question on slack...and I never get a reply from anyone
[09:25:18] moeabdol: people say irc is dead
[09:25:47] muzik: the google people hang here as we know where to find the other good people :P
[09:26:07] muzik: When i changed from vi to emacs about a year ago, i had the same issue on slack
[09:26:24] moeabdol: oh....why did you switch schools
[09:26:32] jhfisc: has joined #RubyOnRails
[09:26:38] moeabdol: vi is the way of enlightenment
[09:26:46] muzik: i was curious on why emacs claims their editor is just soooo good. So i went on youtube and found the path
[09:26:53] muzik: we have much to talk about :)
[09:27:27] muzik: please hop onto the #emacs channel
[09:27:33] moeabdol: can you share the video that should you the true way of light
[09:28:03] muzik: https://www.youtube.com/watch?v=JWD1Fpdd4Pc
[09:28:46] muzik: vi is written mostly by one person, and is a compiled program
[09:29:20] moeabdol: you already got me with thoughtbot
[09:29:20] bronson: has joined #RubyOnRails
[09:29:25] muzik: Emacs is a lisp script. ANYTHING can be changed instantly. It has its own package manager, web browser, irc client, text renderer, and heaps HEAPS more
[09:29:45] muzik: The whole thing is a live lisp script, which is absolutely awesome
[09:29:57] muzik: 1 key combination gives you a searchable list of ALL functions
[09:30:14] muzik: if you open a file your emacs doesnt know about, it will find the support in the package manager and ask if you want to install
[09:30:28] muzik: Each element in the editor can have its OWN font size, style, and size
[09:30:37] muzik: multiple cursors
[09:31:00] muzik: a tree history to if you make a change, then undo, then chage, then undo, ALL changes will be available
[09:31:05] muzik: there is just too much to show
[09:32:13] moeabdol: i'm a hardcore vim user
[09:32:21] moeabdol: you're saying awesome things here
[09:32:25] moeabdol: but what about all my plugins
[09:32:38] muzik: This series shows you some cool stuff too: https://www.youtube.com/watch?v=5axK-VUKJnk
[09:32:49] muzik: Which plugins? Emacs has better plugins for everything
[09:33:39] muzik: i can jump to any character in the editor with 3 key combinations
[09:33:55] moeabdol: what about huge files
[09:34:03] moeabdol: how does it deal with 10 GB file size
[09:34:04] muzik: also, search for matches, and the resulting list get copied to a buffer where i can make changes to those lines, and save them back into the original places they came from
[09:34:08] muzik: never tried
[09:34:16] muzik: ill try now. one moment
[09:35:14] jhfisc: has joined #RubyOnRails
[09:35:27] muzik: Emacs said, the file you are trying to open is 2GB. Are you sure you want to open it? i said yes
[09:35:50] muzik: Yep, opened it no probs
[09:35:54] moeabdol: is it smooth when you navigate through
[09:35:56] muzik: its all binary of course as it is a movie
[09:36:34] muzik: sort of, the cursor keeps up, but im running emacs in windows, so a tiny amount of lag is expected
[09:37:32] moeabdol: how many years have you been using vim before they sucked you into the dark side?
[09:37:35] muzik: have a quick peek through some of those emacs rocks videos. Youll see that vi isnt even close
[09:37:40] muzik: vi was about 15 years
[09:37:46] muzik: emacs has been 1
[09:38:05] muzik: it took a good 2 weeks until i was "comfortable"
[09:38:50] moeabdol: do you navigate using the same hjkl?
[09:38:54] muzik: Emacs has an evil mode which is vim in emacs. That may be nice if you really love vi
[09:38:59] muzik: no. i use arrows
[09:39:04] muzik: you can turn that off easily
[09:39:10] muzik: Do you use those in vi, or arrows?
[09:39:39] moeabdol: i never use arrows. always hjkl
[09:40:05] muzik: Thats fine. You will be comfortable in emacs
[09:40:19] muzik: I am happy to show you the ropes over skype
[09:40:27] muzik: I love spreading emacs as it rocks!
[09:41:02] moeabdol: i'd love to :)
[09:43:19] jhfisc: has joined #RubyOnRails
[09:48:41] jhfisc: has joined #RubyOnRails
[09:56:58] jhfisc: has joined #RubyOnRails
[09:58:04] v|sh: has joined #RubyOnRails
[10:03:48] Ergo: has joined #RubyOnRails
[10:05:10] Madman_man: has joined #RubyOnRails
[10:05:15] Madman_man: Good Morning
[10:05:24] jhfisc: has joined #RubyOnRails
[10:06:15] Madman_man: I'm trying to build a complex JSON object with Jbuilder and I'm havbing issues getting the controller to give me the right infomation.
[10:11:16] muzik: What is the problem?
[10:11:17] jhfisc: has joined #RubyOnRails
[10:13:22] rapha: There used to be find_all_by_* methods, but they don't exist anymore. Is there any new way to ensure you get an ActiveRecord::Relation back instead of a single result if there is only one?
[10:14:02] rapha: sevenseacat: that has the same problem for me. If there's only a single result, it doesn't give me a set.
[10:14:13] sevenseacat: yes it does. it always gives you something enumerable.
[10:14:23] rapha: weird then
[10:14:30] muzik: Which version of rails?
[10:15:12] rapha: muzik: activerecord 5.1.2, but i'm using it on its own, without rails. might that be the problem?
[10:15:35] rapha: ... and on ruby 2.2, because 2.4 won't compile properly with gcc 7.
[10:16:49] muzik: Shouldnt make a difference if it is in rails or not
[10:17:06] rapha: ACTION tries #where again
[10:17:19] jhfisc: has joined #RubyOnRails
[10:18:21] muzik: I sense enlightenment
[10:18:57] rapha: muzik: i think chaining order matters. if i use "some_scope.where(blah)" instead of "where(blah).some_scope" ithen it works. which is weird because some_scope also uses where(foobar), but okay...
[10:24:36] lxnr: has joined #RubyOnRails
[10:27:15] jhfisc: has joined #RubyOnRails
[10:28:57] moeabdol: has joined #RubyOnRails
[10:29:53] moeabdol: has joined #RubyOnRails
[10:30:11] bronson: has joined #RubyOnRails
[10:30:23] moeabdol: has joined #RubyOnRails
[10:31:34] jackhum: has joined #RubyOnRails
[10:33:15] jhfisc: has joined #RubyOnRails
[10:37:53] jhfisc: has joined #RubyOnRails
[10:43:13] jhfisc: has joined #RubyOnRails
[10:44:20] srinidhi: has joined #RubyOnRails
[10:49:08] jhfisc: has joined #RubyOnRails
[10:50:45] roshanavand: has joined #RubyOnRails
[10:59:28] jhfisc: has joined #RubyOnRails
[11:01:45] robert_learner: has joined #RubyOnRails
[11:03:14] jhfisc: has joined #RubyOnRails
[11:04:41] srinidhi: has joined #RubyOnRails
[11:06:02] jhfisc: has joined #RubyOnRails
[11:08:14] robert_learner: I'm trying to write a custom validator which uses ActiveRecord::Validations::UniquenessValidator
[11:08:38] codelahoma: has joined #RubyOnRails
[11:08:41] robert_learner: but I keep getting this error NoMethodError: undefined method `abstract_class?' for nil:NilClass, not sure why
[11:09:04] robert_learner: ActiveRecord::Validations::UniquenessValidator.new( attributes: attribute).validate(record
[11:09:18] robert_learner: that would be the code that calls it
[11:09:57] jhfisc: has joined #RubyOnRails
[11:13:01] conta: has joined #RubyOnRails
[11:17:55] jhfisc: has joined #RubyOnRails
[11:28:14] srinidhi: has joined #RubyOnRails
[11:31:00] bronson: has joined #RubyOnRails
[11:31:36] lessless: has joined #RubyOnRails
[11:32:20] conta: has joined #RubyOnRails
[11:33:02] pootiscoder: has joined #RubyOnRails
[11:44:23] snowy: has joined #RubyOnRails
[11:45:20] ldnunes: has joined #RubyOnRails
[11:51:50] Jameser: has joined #RubyOnRails
[11:53:14] jhfisc: has joined #RubyOnRails
[11:53:50] brent__: has joined #RubyOnRails
[11:56:18] ar1a: has joined #RubyOnRails
[12:05:15] jhfisc: has joined #RubyOnRails
[12:05:31] apparition47: has joined #RubyOnRails
[12:07:03] mr-spoon: has joined #RubyOnRails
[12:15:40] jhfisc: has joined #RubyOnRails
[12:20:47] jhfisc: has joined #RubyOnRails
[12:26:37] codelahoma: has joined #RubyOnRails
[12:28:17] ariedler: has joined #RubyOnRails
[12:30:53] Jameser: has joined #RubyOnRails
[12:32:10] bronson: has joined #RubyOnRails
[12:33:34] jhfisc: has joined #RubyOnRails
[12:33:40] Jameser: has joined #RubyOnRails
[12:40:45] boykoc: robert_learner: what's the code in your custom validation?
[12:42:51] robert_learner: ActiveRecord::Validations::UniquenessValidator.new(case_sensitive: false, attributes: attribute).validate(record)
[12:49:23] Jameser: has joined #RubyOnRails
[12:49:57] jhfisc: has joined #RubyOnRails
[12:59:16] conta: has joined #RubyOnRails
[13:00:20] jhfisc: has joined #RubyOnRails
[13:09:16] jhfisc: has joined #RubyOnRails
[13:10:30] cagomez: has joined #RubyOnRails
[13:13:13] Jameser: has joined #RubyOnRails
[13:20:34] jhfisc: has joined #RubyOnRails
[13:23:28] jphase: has joined #RubyOnRails
[13:27:04] Jameser: has joined #RubyOnRails
[13:29:28] dblessing: has joined #RubyOnRails
[13:30:16] jhfisc: has joined #RubyOnRails
[13:32:55] cagmz_: has joined #RubyOnRails
[13:32:55] ForeignBiscuit: has joined #RubyOnRails
[13:33:02] bronson: has joined #RubyOnRails
[13:34:26] watersoul_: has joined #RubyOnRails
[13:34:32] jamal7_: has joined #RubyOnRails
[13:35:36] jhfisc: has joined #RubyOnRails
[13:39:00] Jameser: has joined #RubyOnRails
[13:40:13] Vircung: has joined #RubyOnRails
[13:41:31] jhfisc: has joined #RubyOnRails
[13:43:19] cam27: has joined #RubyOnRails
[13:47:01] jhfisc: has joined #RubyOnRails
[13:48:10] Jameser: has joined #RubyOnRails
[13:52:43] pawelbx: has joined #RubyOnRails
[13:54:17] boykoc: robert_learner: sorry, I haven't used validations like that before. I'd typically call them from the model following the rails guide.
[13:56:02] dviola: has joined #RubyOnRails
[13:57:49] pawelbx: hey guys i have a question about rails validations. Here is an example of what I'm trying to do: https://gist.github.com/pawelbx/c4247b5ee55d8b4b64635d950c5752dd
[13:59:18] pawelbx: seems like rails is complaining because movie is nil on the movie_actor_junctions model
[14:00:10] andywww: has joined #RubyOnRails
[14:00:31] andywww: how might i go about making a rails controller listn for UDP traffic?
[14:08:59] jscheel: has joined #RubyOnRails
[14:12:14] lewls: has joined #RubyOnRails
[14:13:16] moeabdol: has joined #RubyOnRails
[14:14:57] codelahoma: has joined #RubyOnRails
[14:16:57] chouhoulis: has joined #RubyOnRails
[14:17:11] lewls: has joined #RubyOnRails
[14:19:15] jhfisc: has joined #RubyOnRails
[14:24:22] theunraveler: has joined #RubyOnRails
[14:25:15] jhfisc: has joined #RubyOnRails
[14:27:58] jhfisc: has joined #RubyOnRails
[14:30:33] ariedler: has joined #RubyOnRails
[14:33:11] jhfisc: has joined #RubyOnRails
[14:33:31] bronson: has joined #RubyOnRails
[14:37:10] mikecmpbll: has joined #RubyOnRails
[14:38:41] jhfisc: has joined #RubyOnRails
[14:56:41] mikecmpbll: has joined #RubyOnRails
[15:00:18] robert_learner: has joined #RubyOnRails
[15:05:24] [Butch]: has joined #RubyOnRails
[15:06:48] jhfisc: has joined #RubyOnRails
[15:27:32] jhfisc: has joined #RubyOnRails
[15:28:50] cagomez: has joined #RubyOnRails
[15:29:17] Jon30: has joined #RubyOnRails
[15:29:42] Jon30: hey guys, how come the accented letters can replaced with regular ones after being written to the database (mysql 5.6) ?
[15:31:29] jhfisc: has joined #RubyOnRails
[15:32:50] fryguy: Jon30: might want to ask in mysql as this is very database specific, but what character set is your database configured to use, and what are the collation settings and localization settings?
[15:33:28] srinidhi: has joined #RubyOnRails
[15:34:01] Jon30: fryguy everything is set to default, that's the character: È
[15:35:01] bronson: has joined #RubyOnRails
[15:36:07] fryguy: Jon30: everything set to default will likely be problematic, i'd follow up with mysql experts (it's been 5 years for me so i'm fuzzy on these details)
[15:36:17] fryguy: i blocked out all of the internationalization and localization stuff I did at previous company :)
[15:36:23] brent__: has joined #RubyOnRails
[15:36:51] jhfisc: has joined #RubyOnRails
[15:37:51] brent__: has joined #RubyOnRails
[15:43:16] jhfisc: has joined #RubyOnRails
[15:46:20] [Butch]: has joined #RubyOnRails
[15:48:04] jhfisc: has joined #RubyOnRails
[15:53:41] jhfisc: has joined #RubyOnRails
[15:56:19] eelster: has joined #RubyOnRails
[15:59:42] sloggerkhan: Is there any meaningful difference between redis-store vs redis-session-store at this point? As in are there any gotchas with one vs another?
[16:00:11] sloggerkhan: (By redis-store I mean redis-rails.)
[16:01:51] gusrub: has joined #RubyOnRails
[16:03:17] codelahoma: has joined #RubyOnRails
[16:08:22] chouhoulis: has joined #RubyOnRails
[16:09:19] \13k: has joined #RubyOnRails
[16:09:26] snowy: has joined #RubyOnRails
[16:12:59] cjk101010: has joined #RubyOnRails
[16:17:52] apeiros: has joined #RubyOnRails
[16:18:16] futilegames: has joined #RubyOnRails
[16:18:49] shamanime: has joined #RubyOnRails
[16:18:51] \13k: has joined #RubyOnRails
[16:20:28] v|sh: has joined #RubyOnRails
[16:22:29] irishfromua: has joined #RubyOnRails
[16:24:20] someuser: has joined #RubyOnRails
[16:26:50] baweaver: has joined #RubyOnRails
[16:32:05] ariedler: has joined #RubyOnRails
[16:35:32] bronson: has joined #RubyOnRails
[16:39:39] inoas: has joined #RubyOnRails
[16:39:39] Snowy_: has joined #RubyOnRails
[16:40:15] inoas: I want to do something like echo "body { color: red }" | sass > foo.css
[16:40:15] dionysus69: has joined #RubyOnRails
[16:40:27] inoas: but I get Invalid CSS after "body ": expected selector, was "{ color: red }"
[16:40:39] inoas: on line 1 of standard input
[16:41:23] apeiros: has joined #RubyOnRails
[16:42:36] kanzure: has joined #RubyOnRails
[16:45:00] timdotrb: has joined #RubyOnRails
[16:46:25] kanzure: has joined #RubyOnRails
[16:46:31] ldnunes: has joined #RubyOnRails
[16:47:53] kanzure: has joined #RubyOnRails
[16:49:39] AzaToth: has joined #RubyOnRails
[16:55:37] Aherin: has joined #RubyOnRails
[16:55:47] mtkd: has joined #RubyOnRails
[16:56:19] codelahoma: has joined #RubyOnRails
[16:57:02] DrYockel1: has joined #RubyOnRails
[16:57:40] one_zero: has joined #RubyOnRails
[17:00:43] srinidhi: has joined #RubyOnRails
[17:01:22] rakm: has joined #RubyOnRails
[17:11:34] one_zero_t: has joined #RubyOnRails
[17:14:23] chouhoulis: has joined #RubyOnRails
[17:21:49] duderonomy: has joined #RubyOnRails
[17:36:42] bronson: has joined #RubyOnRails
[17:44:26] srinidhi: has joined #RubyOnRails
[17:45:27] jhfisc: has joined #RubyOnRails
[17:49:41] kies: has joined #RubyOnRails
[18:00:29] lamduh: has joined #RubyOnRails
[18:01:26] cam27: has joined #RubyOnRails
[18:04:31] mikecmpbll: has joined #RubyOnRails
[18:07:05] high_fiver: has joined #RubyOnRails
[18:13:25] jhfisc: has joined #RubyOnRails
[18:16:08] jhfisc: has joined #RubyOnRails
[18:16:18] high_fiver_: has joined #RubyOnRails
[18:20:24] ur5us: has joined #RubyOnRails
[18:22:09] jhfisc: has joined #RubyOnRails
[18:25:53] dionysus70: has joined #RubyOnRails
[18:33:40] jhfisc: has joined #RubyOnRails
[18:37:31] bronson: has joined #RubyOnRails
[18:43:21] gusrub: has joined #RubyOnRails
[18:45:02] dopie: has joined #RubyOnRails
[18:45:24] jhfisc: has joined #RubyOnRails
[18:45:35] srinidhi: has joined #RubyOnRails
[18:46:22] dopie: I am having problems with my associations https://gist.github.com/staycreativedesign/ae79ef010b9029ebf8f9bf5b23c73d20 I don't think I set them up correctly, A user, has one job, a job has one business category and has one business industry
[18:49:56] jhfisc: has joined #RubyOnRails
[18:50:54] hron84: has joined #RubyOnRails
[18:52:00] hron84: Hi! If i want to use respond_to { |format| format.png { send_data png_data } }, what I need it for make it working? Currently Rails 5 says "no renderer defined for format png" even if mime type is registered.
[18:52:03] mustmodify: has joined #RubyOnRails
[18:52:46] hron84: I have no specific "renderer" in this case, I just have the png as a raw binary and I want to send it out.
[18:53:30] mustmodify: I'm trying to collect a signature via the web. I used sketch.js to collect a signature and encoded it as a base64 png. But when I put that in the browser it seems blank / transparent. Could it be that the image just doesn't have a color? What should I do with it now? :)
[18:54:03] conta3: has joined #RubyOnRails
[18:55:34] hron84: mustmodify: did you tried to make a dark background? maybe the signature is written with white ink :-) Did you specifiy an ink color for sketch.js?
[18:55:35] eelster: has joined #RubyOnRails
[18:56:17] mustmodify: I don't remember specifying a color. but I did see a signature in black. :)
[18:56:25] mustmodify: and the URI is ... long...
[18:57:23] mustmodify: well, I'll keep plugging. I was able to convert it to a straight PNG but same issue.
[19:00:48] eelster: has joined #RubyOnRails
[19:06:00] jhfisc: has joined #RubyOnRails
[19:10:29] cagomez: has joined #RubyOnRails
[19:15:41] gambl0re: has joined #RubyOnRails
[19:19:03] gusrub: has joined #RubyOnRails
[19:22:10] jhfisc: has joined #RubyOnRails
[19:25:35] gusrub: has joined #RubyOnRails
[19:34:45] jhfisc: has joined #RubyOnRails
[19:38:02] bronson: has joined #RubyOnRails
[19:39:15] lxsameer: has joined #RubyOnRails
[19:41:48] snowy: has joined #RubyOnRails
[19:46:21] jhfisc: has joined #RubyOnRails
[19:48:14] Heyo: has joined #RubyOnRails
[19:54:23] cagomez: has joined #RubyOnRails
[20:04:46] mtkd: has joined #RubyOnRails
[20:19:40] jhfisc: has joined #RubyOnRails
[20:26:38] cagomez: has joined #RubyOnRails
[20:29:36] xpl0iter: has joined #RubyOnRails
[20:30:18] cagomez: has joined #RubyOnRails
[20:31:09] jhfisc: has joined #RubyOnRails
[20:31:32] loincloth: has joined #RubyOnRails
[20:33:03] loincloth: Is assigning self.location after a redirect_to call a reasonable-ish way to 'cancel' the previous redirect so I can redirect somewhere else?
[20:33:07] HoierM: has joined #RubyOnRails
[20:33:58] loincloth: I'm working with a Rails engine and reusing some elements of it outside the engine in the embedding applicaiton. Those elements include views which link to actions inside the engine which I sometimes want to redirect back to the main app instead of somewhere in the engine.
[20:33:59] xpl0iter: Hello, I am trying to edit a db record using form_for tag. Now in the action, I am trying to do Profile.update(params.require(:profile).permit(:mobile). I think I am missing something. Anyway its not getting updated because its not getting the profile object from the form
[20:34:38] loincloth: If assigning self.location doesn't work, I'm not sure how else I can do it except to reproduce the controller action in question and modify its behavior... which I'd rather avoid if I can help it.
[20:35:22] jhfisc: has joined #RubyOnRails
[20:35:28] xpl0iter: has joined #RubyOnRails
[20:35:31] xpl0iter: cAn someone please help me?
[20:38:53] bronson: has joined #RubyOnRails
[20:42:56] dviola: has joined #RubyOnRails
[20:43:49] moeabdol: has joined #RubyOnRails
[20:46:28] loincloth: Well, for what it's worth to anybody who saw my issue, assigning self.location and response.location in the controller seems to work.
[20:47:08] loincloth: I assume it's not ideal, but hey...
[20:47:16] ariedler: has joined #RubyOnRails
[21:01:37] DoubleMalt: has joined #RubyOnRails
[21:02:27] cagomez: has joined #RubyOnRails
[21:10:02] gusrub: has joined #RubyOnRails
[21:13:23] cagomez: has joined #RubyOnRails
[21:17:16] knight33: has joined #RubyOnRails
[21:19:52] Xentil: has joined #RubyOnRails
[21:22:26] jhfisc: has joined #RubyOnRails
[21:22:44] Heyo: has joined #RubyOnRails
[21:22:57] Heyo: Hey, anyone have experience with virtual machines?
[21:31:20] ur5us: has joined #RubyOnRails
[21:34:53] dlangr: has joined #RubyOnRails
[21:35:41] jhfisc: has joined #RubyOnRails
[21:37:06] iamdevnul: xpl0iter: what was your question
[21:37:31] xpl0iter: sorry it was a stupid one, anyway figured it out. Thanks
[21:40:02] bronson: has joined #RubyOnRails
[21:41:07] jhfisc: has joined #RubyOnRails
[21:46:11] jhfisc: has joined #RubyOnRails
[21:46:49] moei: has joined #RubyOnRails
[22:01:41] jhfisc: has joined #RubyOnRails
[22:05:55] jhfisc: has joined #RubyOnRails
[22:07:23] elcontrastador: has joined #RubyOnRails
[22:09:30] futilegames: has joined #RubyOnRails
[22:11:40] jhfisc: has joined #RubyOnRails
[22:16:57] jhfisc: has joined #RubyOnRails
[22:17:11] gusrub: has joined #RubyOnRails
[22:19:44] mlt-: has joined #RubyOnRails
[22:21:56] Radar: GOOD MORNING
[22:22:02] jhfisc: has joined #RubyOnRails
[22:24:07] mlt-: Hi! How do I use ActionController::TestCase with mock OmniAuth and plain MiniTest?
[22:26:10] mlt-: It seems that I'd still need to post to, e.g., /auth/google_oauth2 for mocking to work(?) but I'm getting ActionController::UrlGenerationError: No route matches {:action=>"/auth/google_oauth2", :controller=>"org/users"}
[22:26:30] mlt-: Is it impossible with ActionController::TestCae?
[22:27:02] jhfisc: has joined #RubyOnRails
[22:28:17] mtkd: has joined #RubyOnRails
[22:29:47] elcontrastador: I'm struggling with ERB newline suppression with both ERB and Erubis. Any help would be appreciated: https://gist.github.com/elcontrastador/f0fb129de07477d80c3d618abc29404b
[22:30:28] mlt-: elcontrastador: like in the closing -%> vs %> ?
[22:30:52] elcontrastador: yeah...that's not working as expected...check out the notes in my gist
[22:32:20] elcontrastador: i admit, i'm extremely tired, but things are just not behaving right...i've read on this and tried everything...including thinking there was some strange encoding in my csv infile
[22:32:37] elcontrastador: but, i may just be retarded
[22:38:55] mlt-: elcontrastador: have you tried using full fledged <%- if block ?
[22:39:11] elcontrastador: yes...zero output
[22:39:19] elcontrastador: even when vals present
[22:40:53] bronson: has joined #RubyOnRails
[22:41:13] elcontrastador: just changed changed tags of bottom 3 tags to <%- -%> and re-verified zero output
[22:41:19] jhfisc: has joined #RubyOnRails
[22:42:27] elcontrastador: oh, and if tried <% if ruby_condition %> <%= ruby_stuff %> <% end %>
[22:42:54] elcontrastador: no different than posted condition...newlines for nil
[22:43:23] mlt-: elcontrastador: https://stackoverflow.com/a/13568485/673826 ?
[22:44:11] elcontrastador: yes...i saw this same link. Originally, used ERB...wasn't working. Switched to Erubis out of desperation/frustration
[22:44:25] elcontrastador: i mentiond this in my gist notes
[22:45:12] mlt-: elcontrastador: This https://stackoverflow.com/a/25626629/673826 says: erubis: useless because <%- %> is the same as <% %> (without =), and this cannot be used with = which is the only case where -% can be useful. So never use this
[22:45:20] mlt-: I don't know why...
[22:45:37] mlt-: Didn't notice
[22:46:15] mlt-: well... in worst case, move everything on a single line and inject newlines inside )
[22:47:15] jhfisc: has joined #RubyOnRails
[22:47:51] elcontrastador: yeah, i mean, its small enough that i could just HEREDOC it..but i'm stubborn and wont let this make me it's bitch
[22:48:30] theunraveler: has joined #RubyOnRails
[22:50:29] jhfisc: has joined #RubyOnRails
[22:53:09] jhfisc: has joined #RubyOnRails
[22:55:54] mlt-: elcontrastador: Use postprocessor :-)
[23:00:44] jhfisc: has joined #RubyOnRails
[23:03:05] elcontrastador: I just dont remember ever having probs like this with erb... Been out of it for awhile, but why am i the only one having this issue. The official solution is simple and should work. I ran iconv to strip any possible utf-8 chars from my infile...just grasping at straws
[23:05:49] jhfisc: has joined #RubyOnRails
[23:06:35] Radar: https://gist.github.com/elcontrastador/f0fb129de07477d80c3d618abc29404b#file-ert_test-rb-L23-L25
[23:06:40] Radar: There are probably other ways to write these lines.
[23:08:24] Radar: elcontrastador: https://gist.github.com/radar/0dbe888a8d31b5a031d25bdbf2c0c639
[23:08:32] helpa: Next question, please!
[23:09:00] elcontrastador: I just found a work around:
[23:09:09] Radar: elcontrastador: was it the one that I showed?
[23:09:17] Radar: what was the work around?
[23:11:19] jhfisc: has joined #RubyOnRails
[23:17:15] jhfisc: has joined #RubyOnRails
[23:22:11] mlt-: Any hint on minitest controler testing and mocking omniauth?
[23:24:35] mlt-: https://gist.github.com/mlt/52ae23231585f638320114e55e4d169b
[23:27:16] uksio: has joined #RubyOnRails
[23:29:19] cagomez: has joined #RubyOnRails
[23:31:15] jhfisc: has joined #RubyOnRails
[23:32:19] Jameser: has joined #RubyOnRails
[23:35:02] gusrub: has joined #RubyOnRails
[23:40:29] Jameser: has joined #RubyOnRails
[23:41:04] jhfisc: has joined #RubyOnRails
[23:41:43] bronson: has joined #RubyOnRails
[23:48:59] jhfisc: has joined #RubyOnRails
[23:51:47] Defenestrate: has joined #RubyOnRails
[23:53:51] Jameser: has joined #RubyOnRails