« Back to channel list

#RubyOnRails - 20 October 2015

« Back 1 day Forward 1 day »
[00:01:59] rickmasta: has joined #RubyOnRails
[00:05:05] chopin: has joined #RubyOnRails
[00:09:41] sunya7a: has joined #RubyOnRails
[00:15:15] rhizome: crankharder: put them in public
[00:18:16] Coldblackice: has joined #RubyOnRails
[00:20:08] xtagon: has joined #RubyOnRails
[00:20:37] renegadeandy: weaksauce: https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[00:21:09] petricore: has joined #RubyOnRails
[00:21:09] renegadeandy: i have the wday_in_schedule_date_range in there???but it fails because schedule is nil, as it is not made when the validation runs
[00:21:27] renegadeandy: weaksauce: so im trying to capture that condition in the schedule instead, where i can access start_date and end_date which belongs to schedule
[00:22:27] riotjones: has joined #RubyOnRails
[00:23:15] sunya7a: has joined #RubyOnRails
[00:23:47] agdr: has joined #RubyOnRails
[00:24:36] nya: has joined #RubyOnRails
[00:24:43] Jon30: has joined #RubyOnRails
[00:27:23] nya: has joined #RubyOnRails
[00:28:40] rakm: has joined #RubyOnRails
[00:29:21] reptilain_brain: has joined #RubyOnRails
[00:29:44] reptilain_brain: Hi Guys, anybody knows how to make sure rake task is killed by God?
[00:30:19] FailBit: reptilain_brain: here's the simple way
[00:30:21] FailBit: stop using god
[00:30:30] FailBit: it has actual control over the processes it manages
[00:30:43] bonhoeffer_: has joined #RubyOnRails
[00:30:43] reptilain_brain: oh damn that would be nice
[00:30:44] FailBit: instead of god which just sends it a kill signal and ignores it
[00:30:55] FailBit: https://github.com/kostya/eye
[00:31:01] rdavila: has joined #RubyOnRails
[00:31:18] reptilain_brain: so I can run a custom Rake task independent from Rails and monitor it?
[00:31:48] reptilain_brain: omg amazing man thank you - been through God and Monit and just can???t get the process to die reliably..
[00:31:54] FailBit: they both suck
[00:31:56] FailBit: they're horrible
[00:31:58] FailBit: eye actually works
[00:32:26] reptilain_brain: great never even heard of it
[00:32:34] FailBit: this was always a problem for us when we used god, because the resque workers we had wouldn't die off and started erroring and aborting tasks when they tried to write to their logs
[00:32:45] choke: has joined #RubyOnRails
[00:32:52] FailBit: ??? their logs that had been deleted after the five cap deploys necessary to displace them
[00:33:01] FailBit: ??? seriously how does it not die after that long
[00:33:03] reptilain_brain: and if I have a custom TCPServer the process will just lock out the port
[00:33:10] reptilain_brain: five deploys wow
[00:33:27] roxtrongo: has joined #RubyOnRails
[00:36:31] oflannabhra: has joined #RubyOnRails
[00:36:50] moeabdol: has joined #RubyOnRails
[00:38:09] bonhoeffer_: has joined #RubyOnRails
[00:38:36] rahulgupta: has joined #RubyOnRails
[00:41:20] bonhoeffer_: has joined #RubyOnRails
[00:42:09] seank_: has joined #RubyOnRails
[00:42:51] reptilain_brain: Failbit, does Eye have to be installed sudo?
[00:43:18] FailBit: it runs as a regular Ruby process
[00:47:44] bonhoeffer: has joined #RubyOnRails
[00:48:33] Lytol: has joined #RubyOnRails
[00:50:48] axl_: has joined #RubyOnRails
[00:53:40] axl_: has joined #RubyOnRails
[00:55:57] aruntomar: has joined #RubyOnRails
[00:57:29] nettoweb: has joined #RubyOnRails
[00:58:50] roxtrongo: has joined #RubyOnRails
[01:00:50] roxtrongo: has joined #RubyOnRails
[01:02:25] ellisTAA: does anyone see anything wrong with this querey? @interviews = Interview.where("user_id IS ? AND time > ?", session[:user_id], (Time.now.utc) - (60 * 60))
[01:02:58] sevenseacat: depends. what is it doing/not doing that you think it shouldn't/should ?
[01:02:59] ellisTAA: getting this error: https://gist.github.com/ellismarte/c72f3174e4f00d123024
[01:03:13] FailBit: why not just =?
[01:03:20] ellisTAA: FailBit: i tried that, it didnt work
[01:03:42] FailBit: try using arel
[01:03:51] sevenseacat: it won't work if the user ID is null, but then again you should just be doing something like where(user_id: session[:user_id])
[01:04:16] ellisTAA: ok error is gone ><
[01:04:23] FailBit: Interview.where(user_id: session[:user_id]).where("time > ?", whatever)
[01:04:24] nogic: has joined #RubyOnRails
[01:04:45] ellisTAA: thanks dudes/dudets
[01:04:58] chopin: has joined #RubyOnRails
[01:05:19] superlou: has joined #RubyOnRails
[01:06:38] atomical: has joined #RubyOnRails
[01:06:43] nogic_: has joined #RubyOnRails
[01:07:04] Radar: ACTION remembers when people put ladies first, as in "ladies and gentlemen"
[01:08:34] FailBit: those were the times weren't they
[01:08:38] yfeldblum: has joined #RubyOnRails
[01:08:44] sevenseacat: Radar: i'm just happy to not have to wave the 'we're not all guys' flag, so all good :)
[01:10:02] sankaber: has joined #RubyOnRails
[01:10:42] Lytol: has joined #RubyOnRails
[01:12:16] bruno-: has joined #RubyOnRails
[01:12:44] chills42: has joined #RubyOnRails
[01:14:15] annlewis: has joined #RubyOnRails
[01:14:15] GriffinHeart: has joined #RubyOnRails
[01:19:24] eroc: has joined #RubyOnRails
[01:19:59] chills42: has joined #RubyOnRails
[01:21:37] tuelz: I've always used guys as a gender nuetral things, but as a soutern american it's been easy enough to change that to folks
[01:21:38] eroc: I'm working on a to do list app (original, I know). I have a model called ToDoList. I want to store the items on the todo list in a Postgres json or jsonb column. Does anyone know of a convenient way to serialize a collection of children to and from json? Ideally, I'd like my to do list items to be ActiveModel instances, so I can add validations.
[01:23:03] siddart: has joined #RubyOnRails
[01:24:28] Joufflu: has joined #RubyOnRails
[01:25:40] bendangelo: has joined #RubyOnRails
[01:25:49] GriffinHeart: has joined #RubyOnRails
[01:27:44] roxtrongo: has joined #RubyOnRails
[01:28:19] aruntomar_: has joined #RubyOnRails
[01:28:33] totallymike: has joined #RubyOnRails
[01:28:35] aruntomar_: has joined #RubyOnRails
[01:30:08] totallymike: Hey there. So I have an association in a serializer that's a bit dumb, and is causing me all sorts of troubles.
[01:30:21] FailBit: I imagine for a to-do list the data are tabular
[01:30:24] weaksauce: seems like storing it in json would render activerecord less useful
[01:30:59] totallymike: In an ActiveModel::Serializer (0.8 series), it's a has_many :foos, where foos is defined right there in the serializer as Foo.all
[01:32:22] EminenceHC: has joined #RubyOnRails
[01:32:25] totallymike: This is only a small problem, unless you are serializing many instances of the thing that has this has_many association, when it does the `select * from foos` query a billion times per request, and then serializes them all. There are a total of four Foos
[01:32:37] riotjones: has joined #RubyOnRails
[01:32:39] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[01:32:41] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[01:34:07] totallymike: Thanks. I'll put together a gist that shows the whole thing at once.
[01:34:29] GriffinHeart: has joined #RubyOnRails
[01:36:37] totallymike: Here's the gist https://gist.github.com/totallymike/06e4f514f65c9277ac81
[01:37:15] rickmasta: has joined #RubyOnRails
[01:37:18] weaksauce: logs for a typical call totallymike ?
[01:37:22] sevenseacat: there's nothing being performed there
[01:37:27] sevenseacat: its just a bunch of class definitions
[01:37:45] totallymike: Basically, the Widget/Foo/Whatever needs to be sideloaded into the request, but the way it's currently done causes the same few Widget records to be loaded and serialized over and over and over, murdering performance
[01:39:30] totallymike: I updated the gist with a log. This is far from the only thing happening in this request, but it's a pretty obvious target for optimization, and I feel like there's a fairly obvious way to clean it up that I'm just missing.
[01:39:31] sevenseacat: I have no idea why you've defined has_many :widgets and then overriden the widgets method. i have no idea how you're calling these classes. basically, there isn't enough information to even say there;s a problem.
[01:40:06] totallymike: (not my code) :)
[01:40:21] sevenseacat: your poor explanation though
[01:40:47] weaksauce: what sevenseacat is saying is that you are giving out what you think is important information but it's not what we need.
[01:41:05] weaksauce: we need the log, where it's called from, and the definitions of the classes
[01:41:41] totallymike: Fair enough, and I'm happy to elucidate further. I'm not at liberty to share the actual code, which is why I'm using made-up names, and snippets.
[01:41:59] stannard: has joined #RubyOnRails
[01:42:09] totallymike: It's a bog-standard index action in a controller, render json: Product.all, serailizer: ProductSerializer
[01:42:43] weaksauce: comment out the def widgets method and try the request again
[01:43:29] totallymike: It blows up because there is no real association between the two model types
[01:44:29] Aeyrix: sevenseacat: !rule3.2
[01:44:29] helpa: sevenseacat: NO FAKE CODE. If you're under an NDA, we cannot help you with your problem. Go hire a consultant.
[01:44:39] sevenseacat: i knew it was something like that.
[01:44:45] sevenseacat: ACTION makes note
[01:44:49] totallymike: haha okay give me a moment
[01:44:56] totallymike: ACTION rails news
[01:45:17] weaksauce: totallymike well if that's the case be ok with the logfile then totallymike. it's a cache hit.
[01:45:52] sevenseacat: weaksauce: the problem isnt the sql, its the serialization time. check out the request time.
[01:46:02] eroc: FailBit: Sorry, went AFK for a minute there. I like the JSON format because it translates into sharable files easily. It's also easier to version the list itself (which is a requirement).
[01:46:03] totallymike: Yep, that's the pain point
[01:46:18] weaksauce: ouch yeah, sevenseacat
[01:46:24] sevenseacat: and there's no way generating that json takes 18 seconds.
[01:46:27] rdavila: has joined #RubyOnRails
[01:47:11] totallymike: Nope. There's other things being serialized too
[01:47:19] sevenseacat: ok, this is getting nowhere
[01:47:35] totallymike: Yep. I'm putting together a thing that can be investigated fully
[01:47:46] sevenseacat: 15minutes and we're still no closer to actually seeing a problem
[01:48:17] totallymike: My goal is to find a way to include this association without serializing the same four records each time
[01:48:30] atomical: has joined #RubyOnRails
[01:48:37] hmsimha: has joined #RubyOnRails
[01:49:08] sevenseacat: its not an association.
[01:51:17] totallymike: That's correct, it's really not; we're just abusing the association helpers to jam these records into the JSON blob
[01:52:27] dnewkerk: has joined #RubyOnRails
[01:52:47] quazimodo: has joined #RubyOnRails
[01:54:19] CanTonic: has joined #RubyOnRails
[01:55:58] totallymike: https://github.com/totallymike/totally_not_fake
[01:56:03] hephaestus_rg: has joined #RubyOnRails
[01:57:17] totallymike: There's a project that presents the same issue. I updated the gist https://gist.github.com/totallymike/06e4f514f65c9277ac81 to show the actual logs and json
[01:59:11] capin: not exactly sure where / what to ask pertaining this topic, but I just got my API working but before i put the code in the wild, I thought it would be good to ask first. I have set a limit on how big a file can be uploaded to the API, but I am concerned that someone could upload multiple files to the API, thus filling up the disk space on my VPS which would bring the server to a halt, is there any good way i could prevent this from happening at a system
[01:59:15] totallymike: I also added the product controller and serializer to the gist as they are in the product.
[02:00:10] moeabdol: has joined #RubyOnRails
[02:00:27] totallymike: capin The first thing I can think of, is maybe hosting the files off your local disk, if you can help it.
[02:00:35] jessemcgilallen: has joined #RubyOnRails
[02:00:41] woods: has joined #RubyOnRails
[02:00:48] woods: good morning!
[02:01:06] capin: totallymike: i'd rather host the files myself, don't want to use S3 :P
[02:01:26] totallymike: Do you authenticate the upload requests?
[02:01:57] capin: not really i have basic validations in my model
[02:03:47] totallymike: There are probably a lot of different approaches to take depending on other factors at play, but one could at least prevent the server from halting by keeping logs/application files/code on a different disk than the place where uploaded files land
[02:04:22] Ropeney: has joined #RubyOnRails
[02:04:22] totallymike: Or setting up some sort of quota, if possible
[02:04:40] totallymike: That way when the disk fills up, uploads would fail but writing to your logs wouldn't
[02:05:00] capin: yeah a quota seems the way to go
[02:05:26] totallymike: But my feeling is that if you plan to host files, prepare to host *lots* of files :-/
[02:05:49] bonhoeffer: has joined #RubyOnRails
[02:06:02] totallymike: a quota or some other means of guarding against the disk getting to full for the OS to function will buy you time to buy more disks :)
[02:06:21] capin: ohhh it's not that big of an app
[02:07:00] sunya7a: has joined #RubyOnRails
[02:07:42] CanTonic: has joined #RubyOnRails
[02:08:09] totallymike: So regarding the serializing/db lookup situation, I was thinking of moving the has_many abuse into the model, and wondering what the best (for a definition of 'best' that includes 'most hackish') way to handle it would be
[02:09:09] totallymike: My current thought is maybe to define `widget_ids` as a class variable that does the lookup one time, and then instances can use the class var.
[02:11:20] weaksauce: maybe there are some json libs that will help you out totallymike?
[02:11:32] moeabdol1: has joined #RubyOnRails
[02:11:41] totallymike: capin: Makes sense. Probably it won't be a problem for some time down the road, unless you have a way to clean up old files and such
[02:12:03] totallymike: weaksauce: good question. I believe there's some way to speed up JSON rendering; I wonder if it can be plugged into AMS
[02:12:16] cschneid: has joined #RubyOnRails
[02:12:49] GriffinHeart: has joined #RubyOnRails
[02:13:19] weaksauce: a dumb approach would be to cache the widget json and then strong gsub some placeholder string as that string
[02:13:35] weaksauce: might work until you can figure out the right way??
[02:14:14] tds5016: has joined #RubyOnRails
[02:14:48] totallymike: hah I love it
[02:15:00] reptilain_brain: guys why would capistrano have wrong echo $PATH ?
[02:15:10] asi_: has joined #RubyOnRails
[02:15:23] tds5016: hi all. Question... Is there a cancan equivalent for cequel?
[02:15:44] tds5016: It looks like cancan doesn't add the methods I need unfortunately.
[02:16:37] weaksauce: totallymike if you do go down that path I am curious what kind of speed up/down you get
[02:16:56] sevenseacat: tds5016: huh?
[02:18:36] tds5016: I am using the gem cancan and it looks like it isn't working with sequel.
[02:19:04] sevenseacat: its completely unrelated to sequel, no?
[02:19:06] tds5016: I can set values, etc. but I'm not able to do Model.accessible_by
[02:19:25] tds5016: yeah, it's not sequel, it's the cequel gem I'm using with cassandra
[02:19:57] sevenseacat: ah right, you said both, and i figured one was a typo - but I guessed the wrong one
[02:20:26] tds5016: it looks like it doesn't add the methods correctly. My guess would be that it's trying to add them to activeRecord::Base; which isn't a thing :-P
[02:20:34] tds5016: I mean it is; but not on these models.
[02:21:25] tds5016: with that being said is cequel the best option for cassandra and for?
[02:21:29] pydave6367: has joined #RubyOnRails
[02:21:36] tds5016: or is there another better choice I've not bumped into.
[02:21:48] sevenseacat: no idea, never used cassandra, sorry.
[02:22:18] jessemcgilallen: has joined #RubyOnRails
[02:22:59] hmsimha: has joined #RubyOnRails
[02:24:58] Emily: has joined #RubyOnRails
[02:24:59] Emily: has joined #RubyOnRails
[02:25:32] Emily: has joined #RubyOnRails
[02:25:32] Emily: has joined #RubyOnRails
[02:25:43] stardiviner: has joined #RubyOnRails
[02:27:13] aruntomar: has joined #RubyOnRails
[02:27:31] Us54er: has joined #RubyOnRails
[02:28:27] quazimod1: has joined #RubyOnRails
[02:32:27] Lightsword: has joined #RubyOnRails
[02:34:20] K_r3aPeR: has joined #RubyOnRails
[02:38:13] stardiviner: has joined #RubyOnRails
[02:40:19] diegoviola: has joined #RubyOnRails
[02:41:28] annlewis: has joined #RubyOnRails
[02:42:25] SteenJobs: has joined #RubyOnRails
[02:43:19] rakm: has joined #RubyOnRails
[02:46:48] reptilain_brain: @FailBit any chance you would know why eye choses different Ruby when called via Capistrano??
[02:47:33] Voxxit: has joined #RubyOnRails
[02:48:23] CanTonic: has joined #RubyOnRails
[02:49:33] chills42: has joined #RubyOnRails
[02:49:40] tjbiddle: has joined #RubyOnRails
[02:51:08] tjbiddle: Hey all - just wondering if anyone has experience running an application in PRC (People's republic of China)
[02:53:04] reptilain_brain: Should Capistran
[02:53:22] reptilain_brain: Capistrano???s echo path reflect the echo path from the RVM ?
[02:54:11] diegoviola: tjbiddle: how will a different country make it any different?
[02:54:20] diegoviola: tjbiddle: how is the country even relevant?
[02:54:31] tjbiddle: diegoviola: PRC blocks connections to a ton of services
[02:54:41] diegoviola: so does your bank
[02:54:58] tjbiddle: diegoviola: What?
[02:55:23] diegoviola: have you ever tried working for a bank?
[02:55:32] tjbiddle: diegoviola: No..
[02:55:52] Aeyrix: What the fuck does that have to do with tjbiddle's question
[02:55:56] diegoviola: tjbiddle: ok, my point is a lot of organizations block things, not just countries, yet people still manage to bypass those restrictions
[02:56:31] tjbiddle: diegoviola: Yeah, awesome. But this is nowhere near constructive to the discussion at hand. If you have no experience with what I'm talking about, please don't try to patronize me because you don't know what the issue is.
[02:56:51] diegoviola: tjbiddle: I have experience with this, what makes you think I don't?
[02:57:16] Aeyrix: tjbiddle: What services are you requiring access to outside of PRC?
[02:57:39] Aeyrix: You're going to have a problem no matter what, as Chinese hosting providers will drop your stuff if they see it getting around the GFW.
[02:58:24] diegoviola: tjbiddle: I know exactly what the issue is and nobody tried to patronize you
[02:58:45] sevenseacat: diegoviola: can it.
[02:58:58] diegoviola: sevenseacat: eh?
[02:58:59] sevenseacat: diegoviola: stop trying to derail the discussion.
[02:59:23] diegoviola: seriously, what is the problem with you guys?
[02:59:34] sevenseacat: for starters, we're not all guys.
[02:59:44] diegoviola: I don't care
[02:59:51] sevenseacat: good to know.
[02:59:59] sevenseacat: tjbiddle: sorry about this.
[03:00:46] tjbiddle: Aeyrix: I have servers that will be running within AWS, as well as in the PRC (I think the hosting provider is through something Alibaba provides). My AWS backend will be working via S3, and my PRC backend working with the Chinese equivalent for image/video assets. I'm running an XMPP server as well, which is using MySQL as it's database. There will be an XMPP server in both regions as well. The MySQL database needs to stay consistent across both
[03:00:46] tjbiddle: regions - but I'm unsure how they're going to stay in sync - both regions need to be writable. Sorry - half brain-dumping here, hopefully things are lining up.
[03:00:47] diegoviola: please stop with this drama
[03:00:51] diegoviola: I offered some help, that's all
[03:01:20] diegoviola: sevenseacat: you need to seriously stop attacking me every time I speak in this channel
[03:01:35] Aeyrix: tjbiddle: You shouldn't have an issue accessing AWS from China.
[03:01:37] Aeyrix: They're not blocked.
[03:01:38] EminenceHC: has joined #RubyOnRails
[03:01:41] krz: has joined #RubyOnRails
[03:01:42] tjbiddle: diegoviola: You honestly didn't. You immediately derailed stating that my question wasn't even relevant. Anyhow - ignoring this part of the conversation henceforth - looking forward to others.
[03:01:57] tjbiddle: Aeyrix: They are - I was not able to pull from S3 assets
[03:02:01] tjbiddle: As are Google Storage
[03:02:07] Aeyrix: Wait what?
[03:02:11] Aeyrix: Whoaaaa since when
[03:02:16] tjbiddle: AWS has a specific PRC region as well
[03:02:17] sevenseacat: sounds nasty.
[03:02:19] tjbiddle: Just due to that
[03:02:25] tjbiddle: But it can't interact with the rest of AWS
[03:02:38] tjbiddle: https://www.amazonaws.cn/en/
[03:02:50] Aeyrix: You can't just use that region?
[03:02:55] Aeyrix: Yeah since late 2014, apparently. That sounds about right.
[03:02:58] tjbiddle: Yeah - PRC is separate from rest of China. This is the part of China behind the Great Firewall that I'm working with
[03:03:13] tjbiddle: Aeyrix: I *can* - But still would run into the same issue regardless of hosting provider
[03:03:20] chills42_: has joined #RubyOnRails
[03:03:25] diego1: has joined #RubyOnRails
[03:03:28] Aeyrix: If you run it all in PRC?
[03:03:29] tjbiddle: Management reason we're not using that - Don't know why, don't care as I can't change it. Stuck with what I have :\
[03:03:33] diego1: has joined #RubyOnRails
[03:03:35] Aeyrix: Ah, okay.
[03:03:38] tjbiddle: Aeyrix: Latency
[03:03:47] Aeyrix: tjbiddle: It's high latency, or zero access.
[03:03:56] Aeyrix: Circumventing the GFW is a one-way ticket to getting your service terminated.
[03:04:15] tjbiddle: Aeyrix: Why I'm looking for legal avenues - wondering if anyone had experience with this
[03:04:21] Aeyrix: There aren't any, unfortunately.
[03:04:26] tjbiddle: ACTION pulls hair out
[03:04:28] diegoviola: tjbiddle: I'm sorry if you've got offended by anything I said, I understand how it might be more difficult to get something to work in China given all the restrictions they have with the internet
[03:04:35] Aeyrix: You can apply through governmental channels to get things unblocked, but the chances you have are real fucking slim.
[03:04:41] tjbiddle: diegoviola: It's fine. Thanks
[03:04:53] tjbiddle: Aeyrix: Yeah - we've had a hell of a time even getting what we have already setup
[03:05:05] Aeyrix: May I ask why you're hosting any of it in the PRC?
[03:05:17] Aeyrix: Why not just host it in Singapore or something, if you need it in the general region?
[03:05:18] tjbiddle: Aeyrix: PRC people are people too :)
[03:05:27] Aeyrix: They are, but they can access *some* things outside of the PRC.
[03:05:31] Aeyrix: Unless it's blocked, it's allowed.
[03:05:56] tjbiddle: And our app is very catered to the Chinese market - have funding from some fat-cat billionaire or some-shit *shrugs* - I'm staying in my little IT bubble here so I don't have to deal with that lol
[03:07:15] rhizome: everybody's a fatcat billionaire over there
[03:07:30] diegoviola: sevenseacat: sorry I didn't meant to be rude by saying "guys"
[03:07:48] sevenseacat: diegoviola: your 'i dont care' comment was ruder.
[03:07:53] diegoviola: sorry about that
[03:08:57] Aeyrix: tjbiddle: Hm. How often do you need to sync?
[03:09:13] Aeyrix: Could you potentially use the AWS internal snapshot functionality on some form of schedule?
[03:09:14] diegoviola: I didn't meant to be rude or offend anyone, I'm sorry
[03:09:18] Aeyrix: Horribly crude, but probably the only way .
[03:09:41] Aeyrix: Most organisations just cut their losses and run two separate sets: One for the outside world and one for PRC.
[03:09:43] woods: has joined #RubyOnRails
[03:09:57] Aeyrix: e.g., Activision / Blizzard / Riot Games.
[03:10:24] tjbiddle: Aeyrix: Assets - Immediately. Database, eh; semi-often. Could probably get away with every 5-15 minutes. The big issue there would be user-creation and contact lists. It's an image messaging app (Think snapchat + facial recognition OpenGL overlays).
[03:10:53] luckymeerza: has joined #RubyOnRails
[03:10:55] Aeyrix: So let me get this straight here.
[03:10:56] wldcordeiro: has joined #RubyOnRails
[03:11:07] Aeyrix: You have shard C (china) and shard W (world)
[03:11:07] tjbiddle: Aeyrix: Yeah, I proposed that. They said it needs to be a single entity. Do you have any sources to back that though? I was hoping to find example so of that actually - but wasn't what keywords would match for that.
[03:11:23] Aeyrix: Can C communicate with W at all, in any way, right now?
[03:11:43] Aeyrix: I looked around the AWS forums and the answer is literally "use the PRC version" :|
[03:11:54] diegoviola: has joined #RubyOnRails
[03:13:35] tjbiddle: Aeyrix: Let me run some tests. I know when I was setting up our current implementation I had to jump through a lot of hoops just to get that to run in PRC as we had a lot of hooks into Google Storage, S3, and even repositories just to install some server packages.
[03:13:49] dopamean_: has joined #RubyOnRails
[03:14:10] braincrash: has joined #RubyOnRails
[03:14:10] Aeyrix: Ugh, rough.
[03:14:48] rdavila: has joined #RubyOnRails
[03:15:16] johnflux: has joined #RubyOnRails
[03:15:53] stardiviner: has joined #RubyOnRails
[03:16:29] diego1: has joined #RubyOnRails
[03:16:31] diego1: has joined #RubyOnRails
[03:17:16] bruno-: has joined #RubyOnRails
[03:17:18] tjbiddle: Aeyrix: Tell me about it :| Only thing I'm happy about here is that it's a full re-write and I have complete control over infrastructure + code - hopefully will make things easier.
[03:17:48] Aeyrix: The best feeling!
[03:17:55] Aeyrix: Until you get started, and then realise how much you have to do. ;)
[03:18:46] diegoviola: tjbiddle: I just want to clearn something up, I didn't think your question was irrelevant, what I tried to say is that on the internet countries shouldn't matter that much as information is still information, it doesn't matter where it comes from, unfortunately that's not always the case
[03:18:54] diegoviola: are things more clear now?
[03:19:09] sevenseacat: diegoviola: please, just stop.
[03:20:05] diegoviola: can you stop your bullying too?
[03:20:19] Aeyrix: honestly, no
[03:20:27] diegoviola: then go fuck yourself
[03:20:39] ChanServ: +o sevenseacat
[03:20:42] diegoviola: I've got enough ubllying on this channel arleady
[03:20:46] sevenseacat: sevenseacat kicked diegoviola: behavior is not conducive to the desired environment.
[03:20:50] brook: has joined #RubyOnRails
[03:21:11] Aeyrix: sevenseacat: "Your behavior is not conducive to the desired environment." hahahaha
[03:21:14] yogeshrt: has joined #RubyOnRails
[03:21:15] Aeyrix: that's the default in Textual and I love it.
[03:21:39] achamian: has joined #RubyOnRails
[03:21:44] htmldrum: has joined #RubyOnRails
[03:21:52] diegoviola: has joined #RubyOnRails
[03:21:55] ChanServ: -o sevenseacat
[03:22:28] sevenseacat: diegoviola: we don't tolerate abuse. consider that a final warning.
[03:22:35] quazimod2: has joined #RubyOnRails
[03:22:40] quazimod3: has joined #RubyOnRails
[03:22:55] diegoviola: sevenseacat: sorry, but I think you are the one abusing here
[03:23:09] diegoviola: sevenseacat: every time I come to this channel you are the one who is actring in a aggressive passive tone
[03:23:42] luckymeerza: all: Do you have an experience in deploying rails app just using git ( without capistrano ) in digitalocean ?
[03:24:09] Aeyrix: luckymeerza: Yeah, I think there's actually a KB article from DigitalOcean on it.
[03:24:18] diegoviola: sevenseacat: I didn't say anything wrong but you already apologized to someone else from my behavior, tell me how this isn't belittling others?
[03:24:43] diegoviola: sevenseacat: then someone else telling me to stop for something I just said
[03:25:04] luckymeerza: Aeyrix: with puma right ? the article in digitalocean
[03:25:15] Aeyrix: I told you to stop because you brought it up like five minutes after everyone had not only moved on, but probably forgotten about it.
[03:25:21] Aeyrix: luckymeerza: Yeah. You can drop in Unicorn if you wish.
[03:25:27] Aeyrix: I personally prefer Puma anyway. I know I'm not alone in here.
[03:25:31] Aeyrix: ACTION pages FailBit for Puma love.
[03:25:40] luckymeerza: Aeyrix: I use Passenger
[03:25:54] Aeyrix: You can use that too, anything works.
[03:26:03] Aeyrix: That's not really the crux of the article, as far as I remember.
[03:26:13] Aeyrix: Just when it tells you to do things with Puma, do the Passenger equivalent.
[03:27:54] luckymeerza: Aeyrix: >> this one right ? >> https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-git-hooks-on-ubuntu-14-04
[03:28:16] quazimodo: has joined #RubyOnRails
[03:29:29] luckymeerza: Aeyrix: thanks
[03:30:00] nchambers: has joined #RubyOnRails
[03:30:01] yfeldblum: has joined #RubyOnRails
[03:32:16] diego1: has joined #RubyOnRails
[03:32:20] diego1: has joined #RubyOnRails
[03:33:22] riotjones: has joined #RubyOnRails
[03:38:36] speakingcode: has joined #RubyOnRails
[03:39:35] pabvid: has joined #RubyOnRails
[03:40:21] pabvid: has joined #RubyOnRails
[03:42:21] annlewis: has joined #RubyOnRails
[03:43:58] diego1: has joined #RubyOnRails
[03:44:00] diego1: has joined #RubyOnRails
[03:44:09] pabvid: has joined #RubyOnRails
[03:44:11] reptilain_brain: has joined #RubyOnRails
[03:45:02] reptilain_brain: has joined #RubyOnRails
[03:45:26] agent_white: diegoviola: Don't use colloquial plural (or singular) indirect object pronouns here. Some may take offense to these (such as "you guys" or "dude" commonly used in the English language), as they can come off as offensive to others who may not interpret these colloquial/informal terms as being gender-neutral in English. Spanish spoken in Latin America, for instance, uses "ustedes" as a gender-neutr
[03:45:32] agent_white: al way to say "you all". But unfortunately in English, it is not common to say "Hey you all!".
[03:46:13] agent_white: Probably best to say "Hey folks", or relieve the pronoun entirey and and just state your greeting.
[03:46:50] towski_: has joined #RubyOnRails
[03:46:58] nchambers: agent_white: k dude
[03:46:58] sevenseacat: agent_white: seems unrelated to the conversation at hand.
[03:47:38] diegoviola: agent_white: I'm happy to consider this as long as other are happy to consider not telling me to shut up
[03:47:48] diegoviola: agent_white: I asked someone to stop their bullying they said no
[03:47:51] agent_white: I was speaking to diegoviola, since I saw earlier he said something about being worried about saying "you guys".
[03:47:57] based_pdev: has joined #RubyOnRails
[03:47:59] agent_white: Though I appreciate the comments.
[03:48:11] troyready: has joined #RubyOnRails
[03:48:17] agent_white: Sorry, it should have been sent in a PM.
[03:48:38] sevenseacat: fair enough. if diegoviola isn't going to complain, then all is good.
[03:48:55] diegoviola: sevenseacat: I never complained about anything
[03:49:11] joshkovach: has joined #RubyOnRails
[03:50:32] diegoviola: I was here discussing with someone else about rails and sharing my experience about China blocking things, until you bring this sexism thing
[03:50:50] gambl0re: has joined #RubyOnRails
[03:50:52] Aeyrix: if this conversation continues
[03:50:59] Aeyrix: i'm going to cut the link to freenode of the participants
[03:51:09] Aeyrix: like physically
[03:51:11] Aeyrix: go to your ISP
[03:51:14] Aeyrix: and go to your regional exchange
[03:51:16] Aeyrix: and snip your link
[03:51:31] nchambers: Aeyrix: jokes on you. I don't use the internet to IRC
[03:51:42] nchambers: I just hand the packets back and forth between Freenode servers
[03:51:48] Aeyrix: The repairs will cost hundreds of thousands and take up to two weeks. I hope you can handle two weeks without even a landline.
[03:51:59] Aeyrix: nchambers: I will forcibly remove your hands.
[03:52:01] sevenseacat: i dont even have a landline.
[03:52:06] Aeyrix: For two weeks, though. Then I'll give them back.
[03:52:07] nchambers: you wouldn't dare
[03:52:12] nchambers: I can live with that
[03:52:26] Aeyrix: I'll give you one of those grabber claw things in return so you're not completely out of sorts.
[03:52:26] aruntomar: has joined #RubyOnRails
[03:52:30] sevenseacat: but if you take my Kindle i will curl up into a ball and cry.
[03:52:33] agent_white: I was called sexist for saying "you guys" as well at one point. That is why I informed you here. It's best to be gender neutral.
[03:52:45] pontiki: has joined #RubyOnRails
[03:52:48] nchambers: agent_white: you are sexist anyways
[03:52:59] sevenseacat: no-one calls anyone sexist. we just point out that we're not all guys here.
[03:53:00] diego1: has joined #RubyOnRails
[03:53:16] diego1: has joined #RubyOnRails
[03:53:20] pawnbox: has joined #RubyOnRails
[03:53:37] sevenseacat: morning pontiki
[03:53:57] stannard: has joined #RubyOnRails
[03:54:25] pontiki: started on a new rails project at work last week. having so much fun. i'm in this one from the very beginning.
[03:54:31] agent_white: Well. I was called sexist directly :) But we'll leave that in the leaves :)
[03:54:35] pontiki: this means i get to set all the bad examples!! \o/
[03:54:38] sevenseacat: the joys of `rails new`
[03:54:58] sevenseacat: agent_white: i remember that situation. that was much different.
[03:55:08] sevenseacat: and ended up with you being temporarily banned from #ruby.
[03:55:10] agent_white: I remember it as well.
[03:55:29] pontiki: this is actually the first for-real-client rails project i've gotten to run the "rails new" on :D
[03:55:42] ynonp: has joined #RubyOnRails
[03:55:47] agent_white: sevenseacat: Then we agree on the outcome of it, at least.
[03:55:53] darkf: has joined #RubyOnRails
[03:57:24] agent_white: I am glad to inform diegoviola to not make the same mistake I did since it sounded like he was near.
[03:57:29] zpe: has joined #RubyOnRails
[03:57:36] agent_white: nchambers: Marry me?
[03:57:52] nchambers: agent_white: sorry, I'm already promised to pharpend
[03:58:47] diegoviola: Aeyrix: please stop trolling already
[03:59:07] Aeyrix: diegoviola: Are you okay?
[03:59:20] diegoviola: Aeyrix: seriously, stop
[03:59:27] ynonp_: has joined #RubyOnRails
[03:59:34] LudicrousMango: has joined #RubyOnRails
[03:59:49] Aeyrix: Can you be quiet, please?
[03:59:58] Aeyrix: I actually think I had you on ignore until I moved IRC clients.
[04:00:16] diegoviola: Aeyrix: YOU need to stop asking me to be quiet, I didnt' say anything to you, you started demanding this to me, so don't say a word to me again
[04:00:23] roxtrongo: has joined #RubyOnRails
[04:00:32] sevenseacat: diegoviola: the only person here talking to you is agent_white .
[04:00:40] sevenseacat: you keep addressing the rest of us for no reason.
[04:00:51] nchambers: I was talking to agent white sevenseacat
[04:01:07] Aeyrix: so it wasn't even agent_white
[04:01:28] diegoviola: 2015-10-20 01:19:03 Aeyrix s t o p
[04:01:35] diegoviola: 2015-10-20 01:20:04 diegoviola can you stop your bullying too?
[04:01:38] diegoviola: 2015-10-20 01:20:19 Aeyrix honestly, no
[04:01:45] Aeyrix: Pretty much.
[04:01:45] sevenseacat: that was nearly an hour ago!
[04:01:54] Aeyrix: I actually forgot I even said that, it was so long ago.
[04:01:56] nchambers: diegoviola: there is a great tool called a pastebin
[04:02:26] EminenceHC: has joined #RubyOnRails
[04:04:25] pawnbox: has joined #RubyOnRails
[04:05:45] pontiki: another day, another irc drama
[04:05:57] Lytol: has joined #RubyOnRails
[04:06:20] sevenseacat: days since last #rubyonrails drama: 0
[04:06:35] tjbiddle: Oh, this conversation is still happening?
[04:06:38] nchambers: its ok ##programming is worse
[04:06:39] tjbiddle: ACTION Minimizes IRC again
[04:06:42] diegoviola: sevenseacat: I'm not addressing anyone, I simply asked Aeyrix to stop trolling. I don't think you are doing your OP duty very well by taking sides with the rest of the channel and letting others bully people here
[04:06:47] rubyonrailed: has joined #RubyOnRails
[04:06:53] Aeyrix: For fuck's sake.
[04:07:01] nchambers: there is nothing wrong with an OP taking sides diegoviola
[04:07:03] agent_white: I would like to have this discussion about "can" and "can't say words". In another chatroom at some point.
[04:07:23] sevenseacat: diegoviola: I have two options here, either I ban you or I put you on ignore. I'm choosing the latter, so don't go cry about me to other ops anymore.
[04:07:29] sevenseacat: diegoviola: have a nice life.
[04:07:39] diegoviola: Are there rules in this channel about bullying? I think #ruby channel has rules for that, does this channel have that too?
[04:07:48] Aeyrix: Yes, there are.
[04:07:55] Aeyrix: But they only come into effect when someone is *actually* harrassing you.
[04:08:09] Radar: Time to catch up on all the dramas.
[04:08:11] Aeyrix: This isn't occurring here. You are targeting users at random and talking *at* them (not to them) until they tell you to stop.
[04:08:11] agent_white: diegoviola: Just wait. Like I just said. Here is not the place, and now is not the time. But a discussion does need to happen.
[04:08:22] tjbiddle: diegoviola: You started this last conversation by telling Aeyrix to "seriously, stop" randomly - When he had not even remotely addressed you.
[04:08:27] tjbiddle: So - Seriously, stop.
[04:08:56] diegoviola: sevenseacat: I'm not crying about you or anyone
[04:08:59] Aeyrix: I spoke to you like once, and it was evidently a mistake to do so. That is not "bullying". That was telling you to cease your flagrant disregard for time-proximity in conversations.
[04:09:05] Radar: http://logs.ryanbigg.com/RubyOnRails#4366943
[04:09:09] Radar: I guess it all started here?
[04:09:15] agent_white: I would like to talk about this in another channel so we're not disturbing #ror.
[04:09:25] nchambers: agent_white: you can borrow ####c++
[04:09:48] Radar: Ok, guess I've got some reading for the train home / after work
[04:09:50] tjbiddle: Radar: Yuppers.
[04:09:52] EminenceHC: has joined #RubyOnRails
[04:09:57] diegoviola: sevenseacat: I was complaining to Radar about the bullying that goes in on this channel
[04:10:11] Radar: +q diegoviola!*@*
[04:10:13] Radar: I said email me.
[04:10:16] Radar: Everyone else: drop it.
[04:10:21] Radar: I have no time for this bullshit right now.
[04:10:27] Radar: Goodbye. Again.
[04:10:54] IrishGringo: has joined #RubyOnRails
[04:11:34] tjbiddle: Consider it dropped and stuck to the bottom of my shoe with some gum I walked on earlier and am still, desperately, trying to get the last of off.
[04:11:42] arup_r: has joined #RubyOnRails
[04:11:48] tjbiddle: Just kidding - I don't wear shoes anymore (Yay for living in the tropics!)
[04:11:55] nchambers: :D lucky you
[04:11:57] dikaio: has joined #RubyOnRails
[04:12:06] agent_white: And not quite. I'm good with pushing it under the rug.
[04:12:11] agent_white: Enough dust under there.
[04:12:11] sevenseacat: shoes are overrated.
[04:12:42] nchambers: and ruby for that matter
[04:13:06] tjbiddle: But I like Android!
[04:13:09] tjbiddle: ACTION ducks for cover
[04:13:22] nchambers: android is nice
[04:13:30] sevenseacat: ACTION hugs slightly smashed but still pretty Moto X
[04:14:09] mary5030: has joined #RubyOnRails
[04:15:31] nchambers: we will never be as advanced as the star trek communicators :L
[04:16:02] mloy: sevenseacat, ha I just fixed my mum's smashed moto x the other day
[04:16:17] mary5030: has joined #RubyOnRails
[04:16:49] mloy: nchambers, I almost corrected you with "comms*" then realized what comm is short for... -_-
[04:16:53] jessemcgilallen: has joined #RubyOnRails
[04:17:02] nchambers: ACTION shakes his head at mloy
[04:17:04] Aeyrix: iPhone 6s
[04:17:07] Aeyrix: 6s for success
[04:17:10] arup_r: Do you people can help me on https://plus.google.com/u/0/116706511420464157414/posts/3VYjFpRHUdo ? Otherwise I am going to parse the ON manually
[04:17:19] sevenseacat: thinking about getting a nexus 5x soon
[04:17:29] ellisTAA: has joined #RubyOnRails
[04:17:37] mloy: i don't know what i'm getting next, still happy with my OPO but I think I fucked its mic up
[04:17:51] bruno-: has joined #RubyOnRails
[04:17:52] mloy: it bothers my that I switched to capitalizing 'i' midway through that
[04:18:28] sevenseacat: I'd keep my moto X (it's only like eight months old) but its cheaper to get a new phone than repair the screen
[04:18:44] nchambers: mloy: its ok. lots of things bother ruby programmers
[04:20:19] pydave6367: has joined #RubyOnRails
[04:20:56] nchambers: so how do you guys feel about C? because I think its a great language
[04:20:56] glennt: has joined #RubyOnRails
[04:21:09] tjbiddle: has joined #RubyOnRails
[04:21:14] darkf: not as good as ruby
[04:21:39] darkf: in C you can't even have empty arrays. in Ruby you can have them and accessing some index is nil.
[04:21:43] darkf: it's great.
[04:22:01] darkf: accessing missing ivars is also nil.
[04:22:16] zpe: has joined #RubyOnRails
[04:22:18] darkf: so you only have to debug for 4 hours before you find the problem and fix it quickly
[04:22:21] nchambers: well I mean its not as good as python, but I guess ruby is better than C
[04:22:55] darkf: but it's 3 hours on a macbook pro (that's why all the pros use them)
[04:23:03] reptilain_brain: has joined #RubyOnRails
[04:23:22] agent_white: I don't have one :(
[04:23:36] darkf: well as i recall you had trouble with rails, that might be why
[04:23:46] darkf: rails is made for people with macbook pros
[04:24:08] agent_white: darkf: What's so wrong with rails?
[04:24:21] weaksauce: it works fine on linux and os x
[04:24:30] darkf: agent_white: nothing, it's great. but it's mainlt for macbook pro users.
[04:24:48] weaksauce: windows is kindof a shitshow but it's always been for that kind of stuff
[04:26:30] arBmind: has joined #RubyOnRails
[04:26:37] daquan_: has joined #RubyOnRails
[04:26:48] weaksauce: darkf I don't see how that is true though. it's always been geared more toward linux with decent support for os x
[04:27:05] darkf: weaksauce: look at all of the rails programmer ads and they're all using MBPs
[04:27:30] tjbiddle: Aeyrix: So my assumption was actually incorrect; I went ahead and created a publicly accessible RDS database hosted within my VPC in the ap-northeast-1 region and I'm able to access it properly from my PRC server. However - I am *not* able to access S3 if it is in the ap-northeast-1 region, but I *am* able to access every other region (So far) with S3. I was thrown off since my first (And I believe only) interaction with AWS thus far was with S3 on
[04:27:31] tjbiddle: ap-northeast-1, so I wrongfully assumed all services were blocked.
[04:27:53] weaksauce: yes? osx was never meant to be more than a dev target though. darkf
[04:28:07] tjbiddle: Should make things world's easier. Now I just need to confirm that my actual users are able to access S3 - and it's not just my server for some reason - so that they can download assets.
[04:28:18] darkf: weaksauce: there has to be some reason everyone is seen using an MBP to code rails
[04:28:37] Uo9er_: has joined #RubyOnRails
[04:28:44] nchambers: Darkf: idk... using a shitty platform to use a shitty language
[04:28:51] nchambers: makes sense in my book
[04:28:53] darkf: wow nchambers
[04:29:22] tjbiddle: Also the fact that AWS has a specific Chinese (Beijing) entity setup made me assume otherwise - But I guess that's just a legal thing. Did some more research and it looks like Singapore is the best - with an average latency of ~50-60ms; which I believe you actually suggested anyhow.
[04:29:44] Aeyrix: tjbiddle: Here's hoping!
[04:29:46] weaksauce: darkf yeah the mbp is pretty nice hardware. if they use osx or linux on it is their prerogative.
[04:29:47] Aeyrix: Worlds easier if that's the case.
[04:29:48] pawnbox: has joined #RubyOnRails
[04:30:01] darkf: true weaksauce
[04:30:29] CheckYourSix: has joined #RubyOnRails
[04:31:05] quazimodo: does CAS sit as a standalone server?
[04:31:49] quazimodo: as in you have MainApp which registers users, ChildApp1, ChildApp2 which redirect somewhere if they need you to sign in, and the CASApp which does the sign in/out for all of the above?
[04:32:15] matthewd: quazimodo: Yes
[04:32:20] jessemcgilallen: has joined #RubyOnRails
[04:33:46] pharpend: has joined #RubyOnRails
[04:33:48] nchambers: would you look at these boobies? http://newswatch.nationalgeographic.com/files/2014/02/amazingly-blue-creatures-blue-footed-booby.jpg
[04:34:36] mrtomme: has joined #RubyOnRails
[04:34:46] creature: That is just a single booby.
[04:35:16] quazimodo: matthewd: so the cas server just has a login form?
[04:35:18] nchambers: oh sorry creature. here you go http://i.imgur.com/Uy9HI51.jpg
[04:35:30] mary5030: has joined #RubyOnRails
[04:36:13] SteenJobs: has joined #RubyOnRails
[04:36:31] quazimodo: matthewd: the MainApp in my case already has a login form (all ajaxy and stuff) so i presume that it's reasonable for this to post to the CAS server which authenticates?
[04:37:11] andrew9184: has joined #RubyOnRails
[04:38:21] lessless: has joined #RubyOnRails
[04:39:51] GriffinHeart: has joined #RubyOnRails
[04:40:17] nchambers: https://imgur.com/a/7oAFF#BB5RoT2
[04:40:24] matthewd: quazimodo: I think it's theoretically flawed to do that, because part of the point of CAS is that the apps never see the login details. And you'll probably have cookie/token complexities. But in principle.. probably?
[04:41:39] nchambers: that gif is too empowering
[04:42:18] pharpend: diegoviola: oh you are here
[04:42:34] Cervajz: has joined #RubyOnRails
[04:42:46] drizi: has joined #RubyOnRails
[04:44:52] ChanServ: +o sevenseacat
[04:44:58] sevenseacat: sevenseacat kicked nchambers: behavior is not conducive to the desired environment.
[04:45:08] nchambers: has joined #RubyOnRails
[04:45:34] nchambers: sevenseacat: THANK YOU! ffs it was bugging me
[04:46:11] nchambers: no one was responding to it
[04:46:34] nchambers: I literally posted unmarked porn and the channel was just like k
[04:47:01] sevenseacat: nchambers: don't do it again.
[04:47:17] nchambers: it was a one time experiment :)
[04:47:22] gambl0re: i put the navbar in the application.html layouts template so it shows on all pages but how do i make sso that the search bar in the navbar only appears in on the index page?
[04:48:14] moeabdol1: has joined #RubyOnRails
[04:50:46] drizi: if params[:action] == "foo"
[04:51:13] ynonp_: has joined #RubyOnRails
[04:51:16] mrtomme: has joined #RubyOnRails
[04:51:23] achamian: has joined #RubyOnRails
[04:52:38] drizi: if using erb <%= if params[:action] == "index" %> search <%= end %>
[04:52:40] GitGud: has joined #RubyOnRails
[04:53:06] drizi: err without the =
[04:53:15] drizi: if using erb <% if params[:action] == "index" %> search <% end %>
[04:53:58] GitGud: has left #RubyOnRails: ("Yeah, Ok Pal")
[04:54:08] gambl0re: well im using haml
[04:54:22] nchambers: has left #RubyOnRails: ()
[04:55:23] gambl0re: ok im not sure what im doing wrong here. - if params[:action] = "index"
[04:55:30] gambl0re: <display search bar>
[04:55:31] sunya7a: has joined #RubyOnRails
[04:56:15] toy: has joined #RubyOnRails
[04:56:41] gambl0re: whats sevenseacat, my aussie friend
[04:56:49] nemo_: has joined #RubyOnRails
[04:57:02] gambl0re: hows life in perth...
[04:57:29] gambl0re: by the way, i fixed the error and it works now. thanks
[04:57:35] sevenseacat: not bad. warm.
[04:57:58] tjbiddle: Ooh we have some Aussies in here? Come visit me in Bali :P
[04:58:28] nogic: has joined #RubyOnRails
[05:00:29] nogic_: has joined #RubyOnRails
[05:00:39] pawnbox: has joined #RubyOnRails
[05:00:52] moeabdol: has joined #RubyOnRails
[05:00:54] krz: has joined #RubyOnRails
[05:03:53] arup_r: tjbiddle: Indians are allowed ?
[05:04:17] tjbiddle: arup_r: All are welcome :D hahah
[05:04:30] tjbiddle: Aussies just have a reputation of coming to Bali a lot
[05:08:47] rubyonrailed: has joined #RubyOnRails
[05:08:49] sevenseacat: its cheaper to go to Bali than anywhere else
[05:09:15] tenzan: has joined #RubyOnRails
[05:10:53] gambl0re: ransack gem is cool...
[05:11:43] gambl0re: easy to implement. scarborough beach, cottesloe beaches better than all bali beaches combined.
[05:12:25] gambl0re: and the other beaches around fremantle.
[05:12:49] pawnbox: has joined #RubyOnRails
[05:13:45] EminenceHC: has joined #RubyOnRails
[05:16:26] abdulhannanali: has joined #RubyOnRails
[05:19:12] bruno-: has joined #RubyOnRails
[05:21:42] aruntomar: has joined #RubyOnRails
[05:23:22] U7se6: has joined #RubyOnRails
[05:24:12] dhjondoh: has joined #RubyOnRails
[05:27:47] diegoviola: has left #RubyOnRails: ()
[05:31:06] annlewis: has joined #RubyOnRails
[05:31:29] ruurd: has joined #RubyOnRails
[05:31:47] aganov: has joined #RubyOnRails
[05:32:02] zpe: has joined #RubyOnRails
[05:34:01] riotjones: has joined #RubyOnRails
[05:36:45] tagrudev: has joined #RubyOnRails
[05:38:09] mloy: Australia just makes me think of Freelee
[05:38:34] norc: has joined #RubyOnRails
[05:39:46] GriffinHeart: has joined #RubyOnRails
[05:40:01] yogeshrt: has joined #RubyOnRails
[05:40:33] norc: Hi, Im looking for some feedback on these (probably bad) request specs I have now. http://pastie.org/private/z0zzqotzfnfu537osts2g
[05:42:56] rvanlieshout: has joined #RubyOnRails
[05:43:20] ynonp: has joined #RubyOnRails
[05:44:09] GriffinHeart: has joined #RubyOnRails
[05:44:22] hmsimha: has joined #RubyOnRails
[05:46:05] tjbiddle_: has joined #RubyOnRails
[05:46:07] MartinElvar: has joined #RubyOnRails
[05:46:16] mary5030: has joined #RubyOnRails
[05:46:32] riotjones: has joined #RubyOnRails
[05:46:38] yogeshrt: has joined #RubyOnRails
[05:48:06] achamian: has joined #RubyOnRails
[05:48:18] raunicolae: has joined #RubyOnRails
[05:48:37] pawnbox: has joined #RubyOnRails
[05:48:40] raunicolae: has left #RubyOnRails: ()
[05:49:08] diego1: has joined #RubyOnRails
[05:49:21] njero: has joined #RubyOnRails
[05:50:09] njero: ACTION jumps
[05:51:08] krz: has joined #RubyOnRails
[05:52:04] EminenceHC: has joined #RubyOnRails
[05:53:10] Or1on: has joined #RubyOnRails
[05:54:49] arup_r: mloy: what is time there ?
[05:54:54] [1]brook: has joined #RubyOnRails
[05:55:37] relix: has joined #RubyOnRails
[05:55:37] rakm: i i have a form_tag in a view that goes to a controller that did _not_ render the current view, how do I render a flash notification if this form submission fails?
[05:55:50] lxsameer: has joined #RubyOnRails
[05:56:14] rvanlieshout: rakm: ? your controller should just render the correct view
[05:56:19] rakm: in a rails scaffold, `render 'new'` will render the template from the new action of the same controller, but I want to render the template from a different controller. does tht make sense?
[05:56:31] sevenseacat: rakm: no, it will render the new view
[05:56:39] sevenseacat: not the template from the new action
[05:56:55] arup_r: ok.. rakm use the render "controller-dir/file_name"
[05:56:59] rakm: @sevenseacat got it, yeah
[05:57:23] arup_r: ok. I misunderstood then.. nvm
[05:57:47] rakm: arup_r yeah that is what i was looking for actually, that works
[05:58:05] rakm: it doesn't quite solve what I'm trying to do, but that syntax is what i was looking for
[05:58:16] rakm: let me put together some code samples to ask more
[05:58:45] trautwein: has joined #RubyOnRails
[05:59:15] kp666: has joined #RubyOnRails
[06:00:25] kp666: has joined #RubyOnRails
[06:02:31] rakm: here's the use case: http://pastie.org/10494455
[06:03:15] sevenseacat: rakm: I'd probably use a before_action to filter out unauthenticated users, and redirect them back to the index page
[06:03:17] rakm: the render on line 19 won't actually work because rendering won't run meetups#index action and set up the instance var @meetups (i think)
[06:03:18] sevenseacat: instead of rendering the index view
[06:03:43] rakm: @sevenseacat the flash notification is what i'm trying to get
[06:04:02] sevenseacat: feel free to ignore everything i just said then
[06:04:29] rakm: hmm. is there a way to do that?
[06:04:43] rakm: maybe i should use ajax for the form submit instead
[06:04:53] CheckYourSix: has joined #RubyOnRails
[06:04:56] sevenseacat: you're overcomplicating things
[06:05:10] roxtrongo: has joined #RubyOnRails
[06:05:21] rakm: what should i do instead?
[06:05:21] sevenseacat: which part of what I said didn't make sense to you?
[06:05:31] agent_white: has left #RubyOnRails: ()
[06:06:35] rakm: ah ok, same recommendation as what you said before. got it, thanks
[06:07:48] agent_white: has joined #RubyOnRails
[06:07:51] agent_white: has left #RubyOnRails: ()
[06:15:04] ChanServ: -o sevenseacat
[06:15:52] darutoko: has joined #RubyOnRails
[06:16:44] chrissonar: has joined #RubyOnRails
[06:17:35] mloy: arup_r, 2AM :D
[06:17:43] mloy: arup_r, what about you?
[06:19:37] bruno-: has joined #RubyOnRails
[06:20:34] GriffinHeart: has joined #RubyOnRails
[06:21:29] Radar: Ok. Work fun time is over.
[06:21:31] Radar: How goes the drama now?
[06:22:17] Radar: -q diegoviola!*@*
[06:24:26] norc: So, in my (json) controllers I have a rescue_from Exception, with: :render_error - is it okay if the handlers only acts if Rails.env != test ?
[06:24:38] sevenseacat: it all stopped once you muted diegoviola .
[06:25:26] norc: Or should my controllers do the same regardless of the environment?
[06:25:41] sevenseacat: norc: i would do the same in every env.
[06:27:07] norc: sevenseacat: You are right. This is another XY problem - my actual issue is that I want the pretty error messages + stack traces in my server logs.
[06:27:40] sevenseacat: norc: what I would be doing is using airbrake or another similar tool, and logging the errors there.
[06:27:51] sevenseacat: which you can do in the rescue block.
[06:28:13] Uo9er_: has joined #RubyOnRails
[06:31:42] GriffinHeart: has joined #RubyOnRails
[06:33:03] eGGsha: has joined #RubyOnRails
[06:34:25] norc: sevenseacat: Mmm, I think the suggestion helps. :)
[06:34:42] kwd: has joined #RubyOnRails
[06:35:01] bmalum: has joined #RubyOnRails
[06:35:08] ruurd: has joined #RubyOnRails
[06:35:25] arup_r: mloy: 12 PM
[06:38:03] trosborn: has joined #RubyOnRails
[06:39:27] techsethi: has joined #RubyOnRails
[06:40:46] benhuda: has joined #RubyOnRails
[06:42:26] K_r3aPeR: has joined #RubyOnRails
[06:43:32] rubyonrailed: has joined #RubyOnRails
[06:43:45] sunya7a: has joined #RubyOnRails
[06:44:09] techsethi: Hi Folks, this is more of a ruby question probably. I have seen implemtations on how to convert array with items into keys/value etc but what I want is to convert an array into a hash something like this: https://gist.github.com/techsethi/a1ae601b09993b80a8a5 what would be a good way to accomplish this. thanks in advance.
[06:45:08] johnflux: has joined #RubyOnRails
[06:46:07] ynonp: has joined #RubyOnRails
[06:46:49] Cervajz_: has joined #RubyOnRails
[06:48:55] Cervajz__: has joined #RubyOnRails
[06:51:31] comrad: has joined #RubyOnRails
[06:51:39] dopie: has joined #RubyOnRails
[06:51:59] arup_r: techsethi: See Array#zip
[06:52:04] sinkensabe: has joined #RubyOnRails
[06:52:28] arup_r: like [:e1, :e2].zip(1,2).to_h # gives {e1: 1, e2: 2}
[06:53:04] arup_r: err, [:e1, :e2].zip([1,2]).to_h # => {:e1=>1, :e2=>2}
[06:53:36] techsethi: arup_r: awesome, exactly what I was looking for. thanks.
[06:53:51] arup_r: updated your gist
[06:54:06] sdwrage: has joined #RubyOnRails
[06:56:21] rodfersou: has joined #RubyOnRails
[06:57:52] xcm: has joined #RubyOnRails
[06:58:13] lzx: has joined #RubyOnRails
[06:59:25] Lytol: has joined #RubyOnRails
[07:00:41] Xenosis: has joined #RubyOnRails
[07:00:49] willardg: has joined #RubyOnRails
[07:01:12] quazimodo: has joined #RubyOnRails
[07:04:02] vishnu: has joined #RubyOnRails
[07:04:14] Xenosis: Could anyone explain to me how to call a controllers helper method from a view?
[07:04:50] Xenosis: I thought this might work but it doesn't <%= link_to "Generate Tickets", :controller => :events, :method => :generate_tickets %>
[07:05:31] sevenseacat: that creates a link to an action, it doesn't call a helper method
[07:05:32] arup_r: Xenosis: http://api.rubyonrails.org/classes/ActionController/Helpers.html
[07:05:39] arup_r: check the link
[07:06:04] ynonp: has joined #RubyOnRails
[07:06:08] Xenosis: thanks, ill give that a read
[07:06:33] arup_r: yes, that will solve your problem Xenosis
[07:06:34] solars: has joined #RubyOnRails
[07:07:19] Linuus: has joined #RubyOnRails
[07:10:38] draken: has joined #RubyOnRails
[07:11:45] curses: has joined #RubyOnRails
[07:13:00] Xenosis: ok great, that worked in that in got called, i have it like this now <%= generate_tickets(@event.id) %>
[07:13:39] Xenosis: but it runs as soon as the page is load, probably due to <%=, whats the best way to make it so that it runs only when a link is clicked
[07:13:44] LudicrousMango: has joined #RubyOnRails
[07:15:43] arup_r: Xenosis: You need to solve it using JS. helper wouldn't help ...
[07:15:57] arup_r: click thingy is frontend side... so Js :D
[07:15:57] sevenseacat: arup_r: why js?
[07:15:59] siddart: has joined #RubyOnRails
[07:16:10] Xenosis: with onClick?
[07:16:12] sevenseacat: why not just an normal link?
[07:16:35] arup_r: sevenseacat: Hum, then it is a controller action GET request.
[07:16:45] sevenseacat: you're very quick to offer solutions without knowing the scope of the problem
[07:16:56] arup_r: no idea about the feature, so can't tell you ..
[07:16:57] sevenseacat: which means they're often inappropriate
[07:17:03] Xenosis: what i want is to click a link, for the method to run and not to redirect ideally
[07:17:05] arup_r: yes, sevenseacat
[07:17:19] arup_r: sevenseacat: see Xenosis what he said
[07:17:28] ruurd: has joined #RubyOnRails
[07:17:38] arup_r: I knew ,,, what he has in mind, so I was quick. :)
[07:17:55] sevenseacat: Xenosis: so what do you want to happen when you click the link?
[07:18:00] lea: has joined #RubyOnRails
[07:18:11] srinidhi: has joined #RubyOnRails
[07:18:13] sevenseacat: in terms of feedback
[07:18:36] Xenosis: so i have an event model and a ticket model, when i click on the link i want to generate tickets for the event and link them to to the model
[07:18:50] sevenseacat: thats not feedback in the browser
[07:18:59] sevenseacat: i didnt ask what you want the helper method to do
[07:19:36] nfk|laptop: has joined #RubyOnRails
[07:19:36] kiki_lamb: has joined #RubyOnRails
[07:19:36] Xenosis: ok so in the browser i want a link and ideally for it to generate the tickets without redirecting and just update the existing page and say the tickets are generated
[07:19:51] Xenosis: maybe with a flash
[07:19:52] annlewis: has joined #RubyOnRails
[07:19:53] kiki_lamb: Is there a non-shitty template handler to make RTF output?
[07:20:13] jas02: has joined #RubyOnRails
[07:20:24] draken: Xenosis u could use jquery
[07:20:27] sevenseacat: Xenosis: you might want to look at making a remote: true link, that will fire off an ajax request and return you a response that you can then handle
[07:20:33] arup_r: draken: +1
[07:20:52] sevenseacat: draken: thats a bit like saying 'you shouldwrite code to solve the problem'
[07:20:54] bruno-: has joined #RubyOnRails
[07:21:20] pawnbox: has joined #RubyOnRails
[07:21:26] Xenosis: ok ill do some reading up on ajax, thanks
[07:21:29] draken: i guess, but there is a lot of resources out there explaining/showing how you would pull that off
[07:21:55] sevenseacat: draken: theyre asking us for help though, don't just brush people off
[07:22:35] sevenseacat: draken: if you came here with a specific problem would you be happy if someone said 'just use rails'?
[07:23:07] Xenosis: i appreciate your help guys, its all a bit new to me, im an Android developer by trade, just trying to learn enough Ruby/Rails for a project i'm working on
[07:23:16] draken: isnt saying you can use 'ajax' pretty much the same :P
[07:23:18] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[07:23:26] arup_r: draken: it is not like that. The problem he was telling, was giving a sense to say him to ho with Jquery.
[07:23:33] sevenseacat: draken: no, and I never said 'just use ajax'.
[07:23:48] jessemcgilallen: has joined #RubyOnRails
[07:23:58] arup_r: sorry.. not draken , it was to sevenseacat : :)
[07:24:03] MartinElvar: has joined #RubyOnRails
[07:24:39] arup_r: ACTION going back to fix his own buggy code..
[07:26:05] adac: has joined #RubyOnRails
[07:26:20] yfeldblum: has joined #RubyOnRails
[07:26:24] one_zero: has joined #RubyOnRails
[07:27:31] Ergo: has joined #RubyOnRails
[07:28:13] GriffinHeart: has joined #RubyOnRails
[07:28:16] arup_r: Any tool to give me [nil].present? #false ?
[07:28:24] arup_r: [nil].present? gives true..
[07:28:48] arup_r: I mean [nil].<what_method>? # can give me true
[07:28:55] pawnbox: has joined #RubyOnRails
[07:29:22] trosborn: has joined #RubyOnRails
[07:29:55] sevenseacat: arup_r: why should it return true?
[07:30:02] sevenseacat: what are you checking for?
[07:31:14] lessless: has joined #RubyOnRails
[07:31:22] arup_r: sevenseacat: that wouldn't I know. looking for a method. I just want to skip some logic when the array is empty.
[07:31:41] arup_r: [nil].compact.present? will do the trick.
[07:31:48] sevenseacat: the array isnt empty. it has a nil in it.
[07:31:49] arup_r: but was looking for something direct
[07:31:58] it_tard: has joined #RubyOnRails
[07:32:01] shivil: has joined #RubyOnRails
[07:32:04] arup_r: yes, I know boss.
[07:32:28] sevenseacat: sometimes I wonder if I'm the only sane person here.
[07:33:08] arathald: sevenseacat: if you're counting me, then probably
[07:33:37] ynonp: has joined #RubyOnRails
[07:33:46] arup_r: I am insane, btw
[07:34:24] artto: has joined #RubyOnRails
[07:34:26] krz: has joined #RubyOnRails
[07:36:14] GriffinHeart: has joined #RubyOnRails
[07:37:05] zpe: has joined #RubyOnRails
[07:40:39] cleopatra: has joined #RubyOnRails
[07:41:33] Ergo^: has joined #RubyOnRails
[07:41:33] cleopatra: hello people
[07:41:45] cabotto: has joined #RubyOnRails
[07:43:07] arup_r: cleopatra: o/
[07:43:42] voker57: has joined #RubyOnRails
[07:44:11] ynonp: has joined #RubyOnRails
[07:44:51] DEA7TH: has joined #RubyOnRails
[07:48:47] lipoqil: has joined #RubyOnRails
[07:53:12] xcm: has joined #RubyOnRails
[07:53:22] n1ck7: has joined #RubyOnRails
[07:55:54] lea: has joined #RubyOnRails
[07:56:36] MaDErroR123: has joined #RubyOnRails
[07:57:02] njero: has joined #RubyOnRails
[08:00:36] jsrn_: has joined #RubyOnRails
[08:01:47] Peg-leg: has joined #RubyOnRails
[08:03:35] ynonp: has joined #RubyOnRails
[08:04:47] aruntomar: has joined #RubyOnRails
[08:05:41] stardiviner: has joined #RubyOnRails
[08:07:07] helpa-bot: has joined #RubyOnRails
[08:08:09] demonlove: has joined #RubyOnRails
[08:08:49] artto: has joined #RubyOnRails
[08:10:13] kalusn: has joined #RubyOnRails
[08:10:26] demonlove: has joined #RubyOnRails
[08:11:59] tjbiddle: has joined #RubyOnRails
[08:12:31] Radar: tjbiddle: hi again
[08:12:39] arup_r: Are you toying a lot ?
[08:12:51] tjbiddle: Radar: Hello!
[08:13:08] arup_r: say Radar welcome to Brazil again plz.
[08:13:29] arup_r: tjbiddle: he was welcoming all Aussies.. to Brazil
[08:13:42] tjbiddle: arup_r: Bali
[08:13:46] Radar: Are you on drugs?
[08:13:52] arup_r: yes, I do
[08:14:03] arup_r: less sleep... :/
[08:14:03] demonlove: has joined #RubyOnRails
[08:14:38] arup_r: ACTION scrolling back to see again..
[08:14:52] helpa: has joined #RubyOnRails
[08:15:11] helpa: +q Radar!*@*
[08:15:19] Radar: -q Radar!*@*
[08:15:20] demonlove: has joined #RubyOnRails
[08:16:41] rvanlieshout: !unmute Radar
[08:16:44] rvanlieshout: do we even have that one?
[08:16:58] helpa: has joined #RubyOnRails
[08:17:09] arup_r: demonlove: hum. "Namaskar!"
[08:17:34] demonlove: arup_r: ha ha
[08:18:05] arup_r: thanks that you lover this Indian way to respect and welcoming people..
[08:18:41] tjbiddle_: has joined #RubyOnRails
[08:21:03] demonlove: can any one tell me why my screen showing <sasl> failed to login to greg. There has been 1 failed login attempt since your last successful login.
[08:21:37] bruno-: has joined #RubyOnRails
[08:21:47] MartinEl_: has joined #RubyOnRails
[08:22:04] diegobiavati: has joined #RubyOnRails
[08:22:51] Radar: demonlove: Which screen?
[08:22:55] Radar: That's not a Rails app.
[08:23:01] Radar: That might've been from Nickserv?
[08:23:13] diegobiavati_: has joined #RubyOnRails
[08:23:28] demonlove: my ror hexchat page
[08:23:42] demonlove: ohoo i got it
[08:23:58] Pumukel: has joined #RubyOnRails
[08:25:23] GriffinHeart: has joined #RubyOnRails
[08:26:25] trosborn: has joined #RubyOnRails
[08:26:34] ynonp: has joined #RubyOnRails
[08:28:21] jxs__: has joined #RubyOnRails
[08:28:23] U7se6: has joined #RubyOnRails
[08:30:12] adre: has joined #RubyOnRails
[08:30:16] tenzan: has joined #RubyOnRails
[08:32:05] sunya7a: has joined #RubyOnRails
[08:32:20] mark2: has joined #RubyOnRails
[08:32:22] marr: has joined #RubyOnRails
[08:33:10] tjbiddle: has joined #RubyOnRails
[08:34:08] nemo_: has joined #RubyOnRails
[08:34:14] Coldblackice: has joined #RubyOnRails
[08:34:33] lea: has joined #RubyOnRails
[08:35:26] ynonp: has joined #RubyOnRails
[08:36:05] trosborn: has joined #RubyOnRails
[08:38:06] zpe: has joined #RubyOnRails
[08:38:54] supergeek: has joined #RubyOnRails
[08:42:07] mrbubbles: has joined #RubyOnRails
[08:42:37] tjbiddle: has joined #RubyOnRails
[08:42:51] mrbubbles: Good morning ladies and gentlemen
[08:43:50] mrbubbles: I???ve got some data being recorded every 5 minutes??? I was just wondering whether it???s possible to specify an interval and have AR select records from that time. So if the data is every 1 minute could I get it to find records from, say, every hour?
[08:48:01] elaptics: mrbubbles: if you have got the default timestamp columns then it's easy enough to use those to query for the records created in the last x minutes, say
[08:48:43] elaptics: mrbubbles: e.g. Foo.where(["created_at > ?", 5.minutes.ago])
[08:49:00] toy: Hi arup_r
[08:49:22] arup_r: toy: hello........
[08:49:28] renegadeandy: has joined #RubyOnRails
[08:49:38] mrbubbles: elaptics: Yep I???ve gt those but I needed it to be regular intervals??? so for the 5 minute example: 10.00, 10.05, 10.10 etc using the corresponding value for each of those times
[08:49:39] toy: yeah finding the best toys as toys are becoming costlier now a days :) :)
[08:49:43] mrbubbles: I think I???ll need to bucket the data tbh
[08:49:49] arup_r: toy: hehe
[08:49:58] tjbiddle: has joined #RubyOnRails
[08:50:01] elaptics: mrbubbles: what are you trying to achieve specifically?
[08:50:41] aruntomar: has joined #RubyOnRails
[08:51:07] barttenbrinke: mrbubbles: You are trying to group the results on a specific time period?
[08:51:29] mrbubbles: So the data in my DB comes in every minute. 10.00, 10.01, 10.02, etc. I have a field which is the difference since the last hour. So at 10.05, for example, the value of that field is 10.05???s value minus 10.00???s value. That means that at .59 past any hour, the value of that field is the difference in value over that hour
[08:51:34] mrbubbles: I???m trying to plot those differences on a chart
[08:52:49] mrbubbles: So from this minute-by-minute data, I want to grab 08.59, 09.59, 10.59 etc. The only slight awkwardness is that it might be 08:59:04, 09:59:11, 10:59:08 etc
[08:53:32] toy: mrbubbles which DBMS are you using ?
[08:53:43] sdwrage: has joined #RubyOnRails
[08:53:50] mrbubbles: ActiveRecord
[08:54:15] mrbubbles: and Postgres
[08:54:21] renegadeandy: Hey folks, can some validation guru help me here ??? https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[08:54:46] Jasaka|NA: has joined #RubyOnRails
[08:55:15] krz: has joined #RubyOnRails
[08:59:03] universa1: renegadeandy: so what is your problem?
[09:00:28] zpe: has joined #RubyOnRails
[09:01:17] ynonp: has joined #RubyOnRails
[09:01:23] Radar: renegadeandy: https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0#file-error
[09:01:26] Radar: renegadeandy: no stacktrace?
[09:01:28] tjbiddle: has joined #RubyOnRails
[09:01:36] ChanServ: -o spastorino
[09:04:50] n1ck7: has joined #RubyOnRails
[09:05:11] adre: has joined #RubyOnRails
[09:05:45] barttenbrinke: renegadeandy: your schedule variable apparently is not a schedule, but something else
[09:05:59] barttenbrinke: renegadeandy: Inspect / puts it and go from there
[09:06:14] renegadeandy: Radar: please find it now : https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[09:06:23] GriffinHeart: has joined #RubyOnRails
[09:06:25] renegadeandy: barttenbrinke: ???.well its nil...
[09:06:41] universa1: https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0#file-error-L1 --this is not a stack trace.
[09:07:00] barttenbrinke: renegadeandy: Nope, your error says there is a class in there.
[09:07:19] renegadeandy: universa1: https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[09:07:24] renegadeandy: stack trace now included ;)
[09:07:35] nemo__: has joined #RubyOnRails
[09:07:48] universa1: renegadeandy: FULL stack trace.
[09:07:59] barttenbrinke: renegadeandy: You should use t.start_date, not self
[09:08:17] barttenbrinke: renegadeandy: The Lamba block is just a block without context.
[09:08:29] nemo_: has joined #RubyOnRails
[09:08:37] barttenbrinke: renegadeandy: On validation Rails passes your schedule to the block, where you assign it to the 't' variable
[09:08:45] annlewis: has joined #RubyOnRails
[09:08:54] Radar: renegadeandy: https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0#file-schedule-rb-L18
[09:08:57] universa1: the nested attributes stuff happens before validation ;)
[09:09:01] Radar: renegadeandy: self is not what you think it is there
[09:09:05] Radar: as people are telling you
[09:09:44] universa1: and then start_date..end_date is a date range, your wday is an integer, which will most likely always be out of range.
[09:10:48] K_r3aPeR: has joined #RubyOnRails
[09:10:54] renegadeandy: barttenbrinke: updated with a error : https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[09:11:09] universa1: the reject_if is just there to drop bogus records, like you sometimes have an empty form which still submits somethings... this is not a validation.
[09:11:34] dANO-: has joined #RubyOnRails
[09:11:40] barttenbrinke: renegadeandy: Yes, that makes sense here: you are trying to validate nested params, so those are passed to the block
[09:11:44] renegadeandy: universa1: yes???ive tried using a valdation in day, but it doesnt have the schedule associated with it during the validation so i cannot do it there
[09:12:06] renegadeandy: barttenbrinke: so if i want to access the schedule in the block??
[09:12:23] barttenbrinke: renegadeandy: I would write a custom validator for thus
[09:12:32] renegadeandy: barttenbrinke: in schedule, or in day?
[09:12:43] barttenbrinke: renegadeandy: Schedule
[09:12:55] universa1: http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html#method-i-accepts_nested_attributes_for
[09:12:57] renegadeandy: ok barttenbrinke ill try moving my custom validator from day into schedule and see if it works
[09:13:18] barttenbrinke: renegadeandy: Do you understand what you are doing :)?
[09:13:31] renegadeandy: barttenbrinke: im pretty certain yes!
[09:13:39] dANO-: has joined #RubyOnRails
[09:13:46] barttenbrinke: renegadeandy: Bacause Validation is something different then nested parameter validation
[09:14:14] MartinElvar: has joined #RubyOnRails
[09:14:51] MartinEl_: has joined #RubyOnRails
[09:14:51] barttenbrinke: renegadeandy: because you want to query Schedule intelligently during this validation, you need the Schedule object to exist.
[09:15:14] trautwein: has joined #RubyOnRails
[09:15:21] renegadeandy: barttenbrinke: yeah. So if i do this validation in schedule, will its days exist for me to iterate over?
[09:15:26] barttenbrinke: renegadeandy: instantiation of the object occurs AFTER the parameter_validation.
[09:15:35] markus1: has joined #RubyOnRails
[09:15:56] markus1: has left #RubyOnRails: ()
[09:16:18] adlez: has joined #RubyOnRails
[09:16:32] siddart: has joined #RubyOnRails
[09:16:42] barttenbrinke: renegadeandy: Yes, because you accepted the nested day parameters, and so ActiveRecord will have instantiated the schedule + days for you. So now Schedule validation can check if they are valid.
[09:16:56] barttenbrinke: renegadeandy: Where valid here means: valid in the new schedule context :)
[09:17:08] adlez: Hey guys :) Is it possible to change the behaviour of Model.first? I want to use a specific field to sort and determinite who is the first object of a collection.
[09:17:12] renegadeandy: barttenbrinke: like this : https://gist.github.com/renegadeandy/ea88a4ac9cc2bec720b0
[09:18:02] lea: has joined #RubyOnRails
[09:18:20] montagne_goat: has joined #RubyOnRails
[09:18:26] universa1: adlez: Model.order(whatever: :asc).first
[09:18:27] barttenbrinke: renegadeandy: Yeah. Depending on your controller / view layer you should error on the schedule or add an error to the specific day.
[09:18:47] renegadeandy: doing day.errors.add(:base
[09:19:18] adlez: universa1: is it possible to 'rename' the first function. So your codeblock is always used?
[09:19:34] barttenbrinke: renegadeandy: day.errors.add(:wday, "This should be between #{self.start_date} and #{self.end_date}")
[09:19:38] universa1: adlez: you do not want that.
[09:19:51] universa1: you will have too many problems with that later on.
[09:20:13] adlez: oh ok :) thanks for your advice :)
[09:20:15] universa1: and tbh i wouldn't know how to do it really
[09:20:28] barttenbrinke: renegadeandy: But this is probably an integrity check? As in: a normal user should not be able to do this? Because if that is the case, I wouldn't bother with niceties and just yank the handbrake :)
[09:20:32] adlez: Have a nice day! :3
[09:23:42] tjbiddle: has joined #RubyOnRails
[09:27:43] renegadeandy: barttenbrinke: thank you, yeah if this happens then somebody is buggering around
[09:28:00] aruntomar_: has joined #RubyOnRails
[09:28:39] Linuus: has joined #RubyOnRails
[09:28:45] freezevee: has joined #RubyOnRails
[09:29:49] adlez: has joined #RubyOnRails
[09:30:08] mikecmpbll: has joined #RubyOnRails
[09:30:48] siaW: has joined #RubyOnRails
[09:30:54] renegadeandy: barttenbrinke: hmm, actually, my validation runs, adds errors, but when it returns tot he front end, i see no error messages! : https://gist.github.com/renegadeandy/01293e09c12ec9959ceb
[09:32:08] barttenbrinke: renegadeandy: Guess: Your view only shows errors defined on @schedule
[09:32:40] barttenbrinke: renegadeandy: What I said before: if this is an integrity thing, just slap it on :base and let the user sort out it's own mess :)
[09:32:40] renegadeandy: barttenbrinke: how can i change that?
[09:32:50] renegadeandy: base also doesnt show!
[09:33:09] barttenbrinke: renegadeandy: Are you showing the errors on your create form?
[09:33:21] renegadeandy: barttenbrinke: you mean like this : errors.add(:base, "This should be between #{self.start_date} and #{self.end_date}")
[09:33:32] renegadeandy: barttenbrinke: yeah
[09:33:35] n1ck7: has joined #RubyOnRails
[09:33:53] barttenbrinke: renegadeandy: Yes
[09:35:46] renegadeandy: barttenbrinke: sweet! got it!
[09:35:48] renegadeandy: thanks so much
[09:36:24] barttenbrinke: renegadeandy: If you really want the days errors to show in the view, you'll have to walk the schedule days and show their errors
[09:36:27] A124: has joined #RubyOnRails
[09:37:59] ramblex: has joined #RubyOnRails
[09:38:50] pwnd_nfsw: has joined #RubyOnRails
[09:39:55] lxsameer: has joined #RubyOnRails
[09:40:46] ngn999: has joined #RubyOnRails
[09:41:22] cornerma1: has joined #RubyOnRails
[09:42:16] DoubleMalt: has joined #RubyOnRails
[09:44:21] aruntomar: has joined #RubyOnRails
[09:44:29] naftilos76: has joined #RubyOnRails
[09:44:33] bruno-: has joined #RubyOnRails
[09:46:02] johnflux: has joined #RubyOnRails
[09:47:27] maxmanders: has joined #RubyOnRails
[09:48:56] pwnd_nsfw: has joined #RubyOnRails
[09:50:27] dikaio: has joined #RubyOnRails
[09:53:22] bennysan: has joined #RubyOnRails
[09:53:52] d34th4ck3r: has joined #RubyOnRails
[09:55:09] artto: has joined #RubyOnRails
[09:56:29] d34th4ck3r: I???m using Rails 4.2.1 and Devise 3.0 but I get ???undefined method user_signed_in??? for this controller: https://gist.github.com/d34th4ck3r/c84de491ab9a584ea51f
[09:57:34] jhass: has joined #RubyOnRails
[09:59:59] universa1: d34th4ck3r: is there a specific reason you're using such an old version of devise?
[10:00:28] universa1: d34th4ck3r: and then: does it work in other controllers? please add full stack trace + application_controller.rb
[10:01:45] d34th4ck3r: universa1: I thought 3.0 is the latest version of Devise. And no it doesn???t work on any controller.
[10:01:47] nemo_: has joined #RubyOnRails
[10:02:01] ruurd: has joined #RubyOnRails
[10:04:30] diegoviola: has left #RubyOnRails: ("WeeChat 1.3")
[10:04:57] d34th4ck3r: universa1: I updated the gist for the files you asked: https://gist.github.com/d34th4ck3r/c84de491ab9a584ea51f
[10:04:59] universa1: d34th4ck3r: rubygems.org -> devise ;)
[10:05:10] workmad3: d34th4ck3r: user_signed_in? != user_singed_in?
[10:05:27] universa1: workmad3: damn ;)
[10:05:37] universa1: 3.5.2 is the current version of devise ;)
[10:05:51] workmad3: d34th4ck3r: also, 8-space hard tabs? really? :(
[10:05:52] MartinElvar: has joined #RubyOnRails
[10:06:32] MartinEl_: has joined #RubyOnRails
[10:06:36] ayekat: has joined #RubyOnRails
[10:06:53] d34th4ck3r: Ah can???t believe I have beeen making a typo all this while x(
[10:07:37] d34th4ck3r: I???m using 4 space tabs in Sublime, it turned into 8 when I copy pasted the code in Gist.
[10:07:55] workmad3: d34th4ck3r: that's because you're using hard tabs instead of soft tabs :P
[10:09:10] workmad3: d34th4ck3r: also, the gist editor lets you set your tab indent level ;)
[10:09:42] workmad3: d34th4ck3r: yeah, in sublime - hard tabs == an actual tab is inserted, soft tabs == X spaces are inserted when you hit <tab>
[10:10:03] d34th4ck3r: True. By default it was set to Space. Never occured to me to change that.
[10:10:05] workmad3: no idea if that's something you can configure in sublime (never used it), but most code editors let you configure soft/hard tabs
[10:10:10] GriffinHeart: has joined #RubyOnRails
[10:10:37] d34th4ck3r: Yeah! we can configure tab_size in Sublime too.
[10:10:45] d34th4ck3r: It looks beautiful the default way tho
[10:10:51] workmad3: 2-space soft tabs ftw!
[10:11:49] universa1: the rails convention btw ;)
[10:11:54] dopie: has joined #RubyOnRails
[10:11:54] Radar: d34th4ck3r: 2 space indentation or ban
[10:12:18] GriffinHeart: has joined #RubyOnRails
[10:12:39] nemo__: has joined #RubyOnRails
[10:12:50] workmad3: Radar: haha :) next it'll be 'emacs or ban' or 'vim or ban'... ;)
[10:13:02] Radar: 2 spaces in Ruby code is not debatable
[10:13:08] Radar: we have all agreed on it as a community
[10:13:16] Radar: And everyone knows ST3 is the best editor of all
[10:13:21] Radar: And with that, I bid you goodnight.
[10:15:01] FailBit: workmad3: everyone knows ed is best editor
[10:15:31] universa1: dos edit > ed ;)
[10:15:45] workmad3: Radar: night
[10:15:55] adaedra: butterflies > *
[10:15:57] FailBit: universa1: wait are you talking about the qbasic editor
[10:16:07] FailBit: cuz that was the shit
[10:16:20] universa1: FailBit: ;)
[10:17:24] nettoweb: has joined #RubyOnRails
[10:17:28] blackmesa: has joined #RubyOnRails
[10:18:06] vigintas: has joined #RubyOnRails
[10:19:02] jhass: has joined #RubyOnRails
[10:19:29] draken: has joined #RubyOnRails
[10:20:13] sunya7a: has joined #RubyOnRails
[10:20:28] rickmasta: has joined #RubyOnRails
[10:20:54] arup_r: I have a remote form and also a link_to with remote: true. I have defined some Ajax callbacks both on the form and link_to. Now when I am clicking on the link, callback binded on the <form> is getting triggered but not the link_to. How can I make those callbacks specific to form and not to listen for when link_to is clicked.
[10:21:04] arup_r: https://gist.github.com/aruprakshit/69e1ad1a7aa75eba2b9c
[10:22:23] rvanlieshout: you should prevent bubble if that link is within the form
[10:22:59] rvanlieshout: and imo it's not right if you have a form that hold liks that directly performs an action
[10:23:03] rvanlieshout: and not until you submit the form
[10:23:12] rvanlieshout: or is anything there live updated?
[10:24:03] arup_r: rvanlieshout: I will remove users which are selected using checkbox, by clicking on the link .
[10:24:18] arup_r: And when I will be adding users I will use the form.
[10:24:19] rvanlieshout: then prevent bubble on those events
[10:24:39] arup_r: how to prevent it.. it seems never heard this term
[10:24:47] arup_r: let me google
[10:24:52] GriffinHeart: has joined #RubyOnRails
[10:25:21] bruno-: has joined #RubyOnRails
[10:25:38] arup_r: ok. this one https://api.jquery.com/event.stoppropagation/ ?
[10:28:46] mrbubbles: can you use self.method to call class methods?
[10:29:28] Linuus: has joined #RubyOnRails
[10:29:54] FailBit: self.class.method
[10:30:37] FailBit: http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx wat
[10:30:42] arup_r: rvanlieshout: as you see I am trying to print also, but that doesn't print. All code from its parent getting trigerred. I don't have access to the `event` inside the https://gist.github.com/aruprakshit/69e1ad1a7aa75eba2b9c#file-distribution_list-coffee-L5
[10:30:52] arup_r: so how should I stop propagation
[10:32:37] rvanlieshout: by adding an ajax:before on the link that prevents propagation?
[10:32:58] rvanlieshout: but if that line isn't printed, that event isn't triggered
[10:33:01] saimancroy: has joined #RubyOnRails
[10:33:16] rvanlieshout: that js is also only executed on page:update, and not ready page:load as the other event is
[10:33:23] dici: has joined #RubyOnRails
[10:34:10] arup_r: no if I comment out form js code it is going there
[10:35:37] arup_r: let me try
[10:38:15] arup_r: same thing on ready
[10:39:12] rvanlieshout: and form js = $(".edit_distribution_list") ?
[10:39:46] arup_r: yes it is form JS
[10:39:58] GriffinHeart: has joined #RubyOnRails
[10:40:58] arup_r: With those ajax callbacks, I don't see any way to have the event to use. I can get events when I have something like: https://gist.github.com/scooler/2845351#file-index-html-L12
[10:41:00] spkprav: has joined #RubyOnRails
[10:41:05] sunya7a: has joined #RubyOnRails
[10:41:10] ayekat: has left #RubyOnRails: ()
[10:41:26] rvanlieshout: ah. so there is a e.stopImmediatePropagation
[10:41:29] rvanlieshout: do you know what it does?
[10:41:49] arup_r: yes, I do know.
[10:42:00] rvanlieshout: so why is it in there?
[10:42:09] arup_r: So, I need to write another JS code to get the event access so that I can stop it
[10:42:19] nickjj: has joined #RubyOnRails
[10:42:37] rvanlieshout: you shouldn't prevent the propagation if you want it
[10:43:10] arup_r: for form js everything I need. But for click on the link, I need only the part I wrote for it
[10:43:27] arup_r: not the its parent callbacks.
[10:43:36] rvanlieshout: you have a e.stopImmediatePropagation and your question is why it doesn't trigger some method
[10:44:10] arup_r: I don't have. The lat gist is not mine. I got it by doing google
[10:44:32] arup_r: this is my code: https://gist.github.com/aruprakshit/69e1ad1a7aa75eba2b9c#file-distribution_list-coffee-L5
[10:44:47] lxsameer: has joined #RubyOnRails
[10:45:07] netzfisch: has joined #RubyOnRails
[10:45:25] ruurd: has joined #RubyOnRails
[10:46:35] toy_: has joined #RubyOnRails
[10:46:56] beauby: has joined #RubyOnRails
[10:47:41] futilegames: has joined #RubyOnRails
[10:51:41] sadaf2606: has joined #RubyOnRails
[10:51:46] DoubleMalt: has joined #RubyOnRails
[10:52:06] ldnunes: has joined #RubyOnRails
[10:53:06] futilegames: has joined #RubyOnRails
[10:54:40] yashinbasement: has joined #RubyOnRails
[10:57:32] annlewis: has joined #RubyOnRails
[10:58:29] bonhoeffer: has joined #RubyOnRails
[10:59:26] blackhuey1: has joined #RubyOnRails
[11:00:39] diego1: has joined #RubyOnRails
[11:01:59] sunya7a: has joined #RubyOnRails
[11:02:13] diego1: has left #RubyOnRails: ()
[11:02:16] artto: has joined #RubyOnRails
[11:03:39] ruurd: has joined #RubyOnRails
[11:03:54] stamina: has joined #RubyOnRails
[11:04:31] weihan: has joined #RubyOnRails
[11:04:47] Linuus: has joined #RubyOnRails
[11:05:08] d34th4ck3r: has joined #RubyOnRails
[11:08:18] tvw: has joined #RubyOnRails
[11:11:42] chills42: has joined #RubyOnRails
[11:12:28] chills42: has joined #RubyOnRails
[11:13:26] spkprav: has joined #RubyOnRails
[11:13:27] mrbubbles: thanks FailBit :)
[11:15:38] jbrinkmusic: is there a way to make an anchor link get an "active" css-class based on whether an element with that id is currently on the top of a page?
[11:16:51] jbrinkmusic: alternatively, if this is not possible can I easily test if the url has that hash?
[11:18:39] toy: has joined #RubyOnRails
[11:18:49] waseem_: jbrinkmusic: You're probably looking for http://getbootstrap.com/javascript/#scrollspy
[11:20:56] ngn999: has joined #RubyOnRails
[11:21:43] jbrinkmusic: waseem_: thanks, I'll look into that
[11:21:56] hmsimha: has joined #RubyOnRails
[11:22:53] sunya7a: has joined #RubyOnRails
[11:24:20] darrencauthon: has joined #RubyOnRails
[11:30:21] IceColdMax: has joined #RubyOnRails
[11:30:51] absklb: has joined #RubyOnRails
[11:31:53] aruntomar: has joined #RubyOnRails
[11:32:37] mrbubbles: do class methods need to be defined before instance methods or anything? I???ve an class method called def self.last_reading(id) and I???m calling it earlier in the class with self.last_reading(3) but I???m getting the error ???undefined method `last_reading' for??? ???
[11:32:40] TPBallbag: has joined #RubyOnRails
[11:32:47] krz: has joined #RubyOnRails
[11:33:23] mrbubbles: But then in Rails console Reading.last_reading(3) is workign fine
[11:36:45] tbuehlmann: mrbubbles, are you calling it in an instance method?
[11:36:59] ngn999: has joined #RubyOnRails
[11:37:14] tbuehlmann: you need to call it as self.class.last_reading(id) then
[11:38:05] blackmesa: has joined #RubyOnRails
[11:40:47] bruno-: has joined #RubyOnRails
[11:41:15] annlewis: has joined #RubyOnRails
[11:44:00] Guest23705: has left #RubyOnRails: ()
[11:45:42] nettoweb: has joined #RubyOnRails
[11:46:32] darrencauthon: has joined #RubyOnRails
[11:48:42] avril14th: has joined #RubyOnRails
[11:50:16] pawnbox: has joined #RubyOnRails
[11:50:49] aruntomar: has joined #RubyOnRails
[11:51:44] bendangelo: has joined #RubyOnRails
[11:52:18] acovrig: has joined #RubyOnRails
[11:52:37] avril14th: hello, I don't understand why adding a unique constraint on a migration won't throw an exception. https://gist.github.com/muichkine/af75d0f412527e29fac3 feedback is much loved
[11:55:37] TPBallbag: Hi all. Is anyone using node.js alongside a Rails app in their stack?
[11:55:46] avril14th: TPBallbag: yes
[11:57:25] herbst: TPBallbag, may i ask for which use case?
[11:58:29] abdulhannanali: has joined #RubyOnRails
[11:58:59] TPBallbag: avril14th: Hi. I've been developing apps with Rails for many years and have dabbled with BackboneJS occasionally. The time has come to start jazzing up our prototype web app and make it far more asynchronous. I've been advised that node.js may be the way to go but having never used it I'm looking for some introductory reading. Are their frameworks to node.js like Rails is to Ruby? Does the node.js app replace the Rails fronte
[11:58:59] TPBallbag: nd altogether or integrate with it?
[12:00:05] herbst: TPBallbag: you may just could use the upcoming websocket features of rails. (again depending on your use case) https://blog.codeship.com/websockets-in-rails-4/
[12:00:44] herbst: You can replace OR integrate it that comes down to you.
[12:00:58] ddv: TPBallbag: I would look into meteor if you want to go js only
[12:01:30] avril14th: TPBallbag: OK, I'm probably not the right guy to answer this. But here we have two apps. 1 rails for back, 1 front for angular. We've built a bridge between the two service side to push notifications (using redis). There are easier ways but this gives us independant stuffs at independant places which is nice for scaling.
[12:01:53] avril14th: now, nobodoy for a shot at https://gist.github.com/muichkine/af75d0f412527e29fac3 ? :)
[12:02:05] violarium: has joined #RubyOnRails
[12:04:10] TPBallbag: herbst: Thanks, that looks interesting and may be suitable. I'd prefer not to rebuild the entire frontend, it's a pretty large application. I guess that another reason I was interested is that I've recently interviewed with a couple of startups in London that seem to be doing well and they have both gone Rails backend and node frontend and really I don't understand why they've split it out like this, so wanted to look into it
[12:04:47] TPBallbag: ddv avril14th thanks for input, I'll keep looking into it and maybe fiddle with a "hello world" or 2
[12:05:17] atomical: has joined #RubyOnRails
[12:06:21] herbst: TPBallbag depending on the app (yes again) it might be very useful to have something like node in the font which can handle as much requests as you throw at it. i guess thats the reason people do that
[12:06:41] herbst: most likely the reason is rather a specific dev that just thought "i do that with node"
[12:07:59] TPBallbag: herbst: okay thanks, food for thought
[12:08:31] cac: has joined #RubyOnRails
[12:09:28] gasbakid: has joined #RubyOnRails
[12:09:35] quazimodo: has joined #RubyOnRails
[12:13:37] sunya7a: has joined #RubyOnRails
[12:15:19] pontiki: node.js is more of an operating environment than anything. express and koa are two main web application backends, express being more akin to rails
[12:15:26] rdavila: has joined #RubyOnRails
[12:15:35] pontiki: express and koa run inside node
[12:17:27] TPBallbag: Thanks pontiki. The more I think about it, I expect the reason that at least one of these startups chose node.js for a frontend is due to the large amounts of traffic and it looks as though node.js is good at handling large numbers of requests. Having done some reading, I see that node.js is just a tool to run JS outside of the browser.
[12:18:19] pontiki: i think people choose the technology they like the best, and come up with justifications aftwards :D
[12:20:06] rvanlieshout: TPBallbag: i don't think you can just say 'node can handle lot of traffic'
[12:20:19] rvanlieshout: i would bet that in 99% of the cases that's purly caused by the developer
[12:20:44] arup_r: has joined #RubyOnRails
[12:21:01] aruntomar: has joined #RubyOnRails
[12:21:09] pontiki: let's do a comparison: you write the worst rails stack you can, and i'll write the worst node stack i can, and we can see which one falls down first :)
[12:21:10] lea: has joined #RubyOnRails
[12:22:42] pontiki: the asynchronicity that's the call to node leads to the callback hell everyone is trying to get out from under
[12:22:42] alexblom: has joined #RubyOnRails
[12:23:53] pontiki: but these are just mousepinions; nothing beats good architectural thinking and deep understanding of your chosen technology, even using PHP
[12:23:58] jtb__: has joined #RubyOnRails
[12:25:58] ChanServ: +o spastorino
[12:26:33] h7br1x: has joined #RubyOnRails
[12:26:54] chills42: has joined #RubyOnRails
[12:27:39] Gustavo: has joined #RubyOnRails
[12:27:52] workmad3: ooh, another 'Node is the future because of X' discussion?
[12:28:16] ruurd: has joined #RubyOnRails
[12:29:00] Linuus: has joined #RubyOnRails
[12:29:16] pontiki: well, no, sorta saying the opposite, i think
[12:29:38] pontiki: trying to, anyway
[12:29:43] pontiki: node's part of the future
[12:29:59] pwnd_nsfw: JS EVERYTHING
[12:30:09] workmad3: WebAssembly FTW!
[12:30:15] TPBallbag: workmad3: No. Well, it wasn't supposed to be. I was just a bit concerned that I've interviewed with 2 startups in London recently and despite being a seasoned Rails developer (and them advertising for Rails developers) they've both failed me on "Yeah we have a node frontend and we need someone that knows node inside out" and just trying to see if anyone has any use cases etc so that I can understand more.
[12:30:39] workmad3: TPBallbag: ever written anything that uses eventmachine?
[12:31:05] TPBallbag: but I am aware of it
[12:31:27] joshkovach: has joined #RubyOnRails
[12:31:35] siddart: has joined #RubyOnRails
[12:31:45] lea: has joined #RubyOnRails
[12:31:51] ddv: meteor is pretty nice to be honest
[12:32:14] ruurd: has joined #RubyOnRails
[12:32:44] sunya7a: has joined #RubyOnRails
[12:32:49] workmad3: TPBallbag: well, anything you'd use eventmachine for is something you could use node for... basically, node.js is a JS runtime with the CommonJS libraries to provide stuff that's useful outside the browser and a base event loop that makes it good for non-blocking reactor-style patterns
[12:33:17] workmad3: TPBallbag: I'm currently wondering what a 'node frontend' is though :)
[12:33:34] pontiki: maybe that's Kyle Simpson's "middle-end"
[12:33:38] chrislotix: has joined #RubyOnRails
[12:33:47] TPBallbag: Okay, thanks. So it looks like they've gone with Node alongside Rails more as a personal preference than out of necessity.
[12:33:49] linus1: has joined #RubyOnRails
[12:33:53] workmad3: pontiki: that would be my suspicion... something simple that serves up the HTML frontend
[12:34:02] acti0nman: has joined #RubyOnRails
[12:34:16] pontiki: anyway, off to work. laters, all
[12:34:21] workmad3: o/ have fun
[12:35:04] workmad3: TPBallbag: that's the case with most of these decisions... personal preference, familiarity and "Ooh, that looks shiny!" play the major role in most tech desicions, IMO
[12:35:30] arup_r: rvanlieshout: You there?
[12:35:51] workmad3: the technical-sounding justifications are normaly post-hoc, because people feel uncomfortable saying "Oh, I did it with node because I was curious and it looked like something fun to play with!"
[12:36:04] arup_r: I solved it by just adding `data-remote` here ("a#remove_users[data-remote]").on
[12:36:16] arup_r: On adding that jquery-ujs binds it properly.
[12:36:28] artto: has joined #RubyOnRails
[12:36:54] rvanlieshout: arup_r: where did you have it again?
[12:37:00] rvanlieshout: not on the a, but on the?
[12:37:07] shivil: has joined #RubyOnRails
[12:37:33] arup_r: rvanlieshout: Got to know after reading source https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L27
[12:37:52] arup_r: I added it on a .. now all is fine
[12:38:00] arup_r: I just changed that bit..
[12:38:02] arup_r: all is working
[12:38:48] arup_r: any of this 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]', is enough to bind the link with Jquery-Ujs
[12:39:51] dnewkerk: has joined #RubyOnRails
[12:40:06] blackmesa: has joined #RubyOnRails
[12:40:22] rickmasta: has joined #RubyOnRails
[12:40:29] arup_r: rvanlieshout: but thanks for your interest on my problem.. have a good day. I will be off now.
[12:42:14] rvanlieshout: till next time
[12:42:21] arup_r: it is new learning.. for me
[12:42:38] arup_r: The problem taught me this today, I was not aware of earlier
[12:42:57] arup_r: bye.. source code very specifically said how it works.. really
[12:43:02] arup_r: anyway bye now really
[12:44:21] linus2: has joined #RubyOnRails
[12:44:35] chrislotix: What exactly is a foreign key in a context of associations?
[12:44:49] unreal_: has joined #RubyOnRails
[12:44:59] siddart: has joined #RubyOnRails
[12:45:16] rvanlieshout: chrislotix: the key to the foreign entity?
[12:45:47] cac: has joined #RubyOnRails
[12:47:22] n1ck7: has joined #RubyOnRails
[12:48:53] artto: has joined #RubyOnRails
[12:50:02] naftilos76: has joined #RubyOnRails
[12:50:21] IrishGringo: has joined #RubyOnRails
[12:52:08] sdwrage: has joined #RubyOnRails
[12:53:19] spkprav: has joined #RubyOnRails
[12:53:31] sunya7a: has joined #RubyOnRails
[12:54:13] pawnbox: has joined #RubyOnRails
[12:54:16] cac: has joined #RubyOnRails
[12:54:48] acovrig: I???m having cross-domain issues: I want to POST to the API (rails) from JavaScript in an HTML file on localhost, is this possible?
[12:57:47] jkamenik: has joined #RubyOnRails
[12:58:19] acovrig: I get the OPTIONS method, then the POST method, but instead of returning the JSON token, it responds with a 302...
[12:59:03] nya: has joined #RubyOnRails
[12:59:20] rdavila: has joined #RubyOnRails
[12:59:28] lxsameer: hey folks, how can I use the development version of jquery_ujs ( on local fs) in my rails project ?
[13:00:17] futilegames: has joined #RubyOnRails
[13:00:26] acovrig: OK, the POST isn???t giveing a header of ???Accepts: application/json??????
[13:01:16] victortyau: has joined #RubyOnRails
[13:01:53] chrislotix: rvanlieshou: as in another model entity?
[13:02:30] darrencauthon: has joined #RubyOnRails
[13:02:36] symbol: has joined #RubyOnRails
[13:07:42] diegoviola: has joined #RubyOnRails
[13:08:46] sevenseacat: has joined #RubyOnRails
[13:12:32] acovrig: Is it possible to have a route that changes the request format then passes to another controller? I.E. /api/users/sign_in sets the format to json and passes to /users/sign_in
[13:13:36] ramortegui: has joined #RubyOnRails
[13:14:47] syath: has joined #RubyOnRails
[13:16:12] sunya7a: has joined #RubyOnRails
[13:16:26] paolodoors: has joined #RubyOnRails
[13:17:35] blackmesa: has joined #RubyOnRails
[13:17:43] n1lo: has joined #RubyOnRails
[13:18:17] umgrosscol: has joined #RubyOnRails
[13:18:41] theblang: has joined #RubyOnRails
[13:21:28] nirakara: has joined #RubyOnRails
[13:21:29] ischwartz: has joined #RubyOnRails
[13:21:34] nirakara: has left #RubyOnRails: ("Leaving")
[13:22:43] bruno-: has joined #RubyOnRails
[13:23:57] K_r3aPeR: has joined #RubyOnRails
[13:24:19] sankaber: has joined #RubyOnRails
[13:25:21] breadmonster: has joined #RubyOnRails
[13:25:41] breadmonster: Can anyone suggest a tutorial for someone new to OOP and web dev?
[13:25:47] chills42: has joined #RubyOnRails
[13:25:55] breadmonster: I have programming experience, but none in OOP.
[13:26:14] pawnbox: has joined #RubyOnRails
[13:26:34] bendangelo: has joined #RubyOnRails
[13:26:57] hfp: has joined #RubyOnRails
[13:27:08] sankaber: has joined #RubyOnRails
[13:27:31] hfp_work: has joined #RubyOnRails
[13:28:18] lessless: has joined #RubyOnRails
[13:31:58] techsethi: has joined #RubyOnRails
[13:35:00] aruntomar: has joined #RubyOnRails
[13:35:08] rubyonrailed: has joined #RubyOnRails
[13:35:29] riotjones: has joined #RubyOnRails
[13:36:26] treehug88: has joined #RubyOnRails
[13:37:09] annlewis: has joined #RubyOnRails
[13:38:09] acovrig: has joined #RubyOnRails
[13:39:55] totallymike: has joined #RubyOnRails
[13:40:20] sunya7a: has joined #RubyOnRails
[13:40:25] netzfisch: has joined #RubyOnRails
[13:41:15] demonlove: has joined #RubyOnRails
[13:43:07] mary5030: has joined #RubyOnRails
[13:43:52] luckymeerza: has joined #RubyOnRails
[13:43:54] w0rd-driven: has joined #RubyOnRails
[13:44:15] absklb: has joined #RubyOnRails
[13:44:31] absklb: i am getting error Undumpable Exception -- #<EOFError: end of file reached> while asset compiling
[13:44:35] absklb: in canvas
[13:44:55] mary5030: has joined #RubyOnRails
[13:45:07] stannard: has joined #RubyOnRails
[13:45:11] helpa: https://gist.github.com/waseem/5068050
[13:45:16] waseem_: breadmonster: ^
[13:46:55] youngbaks: has joined #RubyOnRails
[13:47:47] weihan: has joined #RubyOnRails
[13:48:14] stannard: has joined #RubyOnRails
[13:48:53] darrencauthon: has joined #RubyOnRails
[13:49:12] PlasmaStar: has joined #RubyOnRails
[13:49:32] mase-chatter: has joined #RubyOnRails
[13:49:36] devdazed: has joined #RubyOnRails
[13:49:46] orolo: has joined #RubyOnRails
[13:50:12] linus3: has joined #RubyOnRails
[13:50:14] spkprav: has joined #RubyOnRails
[13:50:40] reptilain_brain: has joined #RubyOnRails
[13:51:05] DoubleMalt: has joined #RubyOnRails
[13:51:40] diegobiavati: has joined #RubyOnRails
[13:53:19] greengriminal: has joined #RubyOnRails
[13:53:37] defsdoor: has joined #RubyOnRails
[13:53:46] moeabdol: has joined #RubyOnRails
[13:55:26] rikkipitt: has joined #RubyOnRails
[13:56:17] quazimodo: has joined #RubyOnRails
[13:56:19] bratsche: has joined #RubyOnRails
[13:56:41] kjb513: has joined #RubyOnRails
[13:57:16] ngn999: has joined #RubyOnRails
[13:57:37] nemo_: has joined #RubyOnRails
[13:57:46] GnuYawk: has joined #RubyOnRails
[13:58:49] tuelz: has joined #RubyOnRails
[14:00:56] linus4: has joined #RubyOnRails
[14:03:41] siaW: has joined #RubyOnRails
[14:05:01] hfp: has joined #RubyOnRails
[14:05:05] futilegames: has joined #RubyOnRails
[14:05:35] hfp_work: has joined #RubyOnRails
[14:07:29] rikkipitt: hey everyone, i was wondering if you could help me with something
[14:08:08] rikkipitt: STI models, what's the best way of checking each latest descendant for if any have a column set to false?
[14:09:03] nya: has joined #RubyOnRails
[14:10:16] acovrig: given this the first routes (ln1-3), is it possible to do something like the 2nd one (ln5-9)? https://gist.github.com/acovrig/cd3a5235ecc336c64939
[14:10:31] krz: has joined #RubyOnRails
[14:12:40] _wldcordeiro: has joined #RubyOnRails
[14:12:46] bmalum: has joined #RubyOnRails
[14:14:00] jhass: acovrig: that seems easy enough to just try out
[14:14:12] doublemalt_: has joined #RubyOnRails
[14:14:34] acovrig: jhass: I???m still getting HTML responses??? can I set a parameter in that route the controller could query?
[14:15:22] treehug88: has joined #RubyOnRails
[14:15:52] momomomomo: has joined #RubyOnRails
[14:16:52] ruurd: has joined #RubyOnRails
[14:19:19] Lightsword: has joined #RubyOnRails
[14:19:33] emilkarl: has joined #RubyOnRails
[14:19:47] acovrig: I have a respond_to |format| can I set/change this in the controller?
[14:21:15] avril14th: rikkipitt: not sure I get your question. Class.descendants.map{ |k| k.where(:column => false).count } ?
[14:21:54] kies: has joined #RubyOnRails
[14:21:59] rikkipitt: avril14th: thanks, that's the sort of route i'm going but in dev mode this doesn't work
[14:22:05] rikkipitt: eager_loading issue...
[14:22:30] avril14th: rikkipitt: you need to require_dependency where suited (in route classes)
[14:22:48] avril14th: route = root :D
[14:23:04] rikkipitt: ah, thanks avril14th, I've not seen require_dependency before
[14:23:15] rikkipitt: do I use that in the parent model?
[14:23:30] avril14th: rikkipitt: for instance here I Dir[Rails.root.join('app','models', 'events', '*_event.rb')].each { |f| require_dependency f }
[14:23:39] chills42: has joined #RubyOnRails
[14:24:05] avril14th: I have a modles/events folders with all the Event subclasses. so I put that at the bottom of event.rb and when I call Event somewhere I am sure that all children classes are also loaded
[14:25:09] rdavila: has joined #RubyOnRails
[14:25:21] AlHafoudh: how to ignore certain initializers when assets:precompile is ran in rails 4 ?
[14:26:42] rikkipitt: cheers avril14th
[14:27:09] avril14th: rikkipitt: no pb
[14:28:28] rikkipitt: avril14th, awesome. I moved my subclasses into their own directory and this seems to work a treat. cheers for that!
[14:29:36] reckoner: has joined #RubyOnRails
[14:29:49] linus4: has joined #RubyOnRails
[14:31:02] EminenceHC: has joined #RubyOnRails
[14:31:14] reckoner: isn't it true your model name and concern file name should look one and the same?
[14:31:17] reckoner: if not relatively
[14:32:45] EminenceHC: has joined #RubyOnRails
[14:34:48] tubbo: reckoner: not sure what you mean
[14:36:35] EminenceHC: has joined #RubyOnRails
[14:36:55] momomomomo_: has joined #RubyOnRails
[14:37:58] spellbook: has joined #RubyOnRails
[14:38:14] jsrn_: has joined #RubyOnRails
[14:38:33] elaptics: reckoner: you can't call a model and a concern the same name
[14:39:27] axl_: has joined #RubyOnRails
[14:45:05] sunya7a: has joined #RubyOnRails
[14:45:45] jas02: has joined #RubyOnRails
[14:45:53] jhass: has joined #RubyOnRails
[14:46:14] banister: has joined #RubyOnRails
[14:46:30] tenderlove: has joined #RubyOnRails
[14:47:10] meltdown: has joined #RubyOnRails
[14:49:25] reckoner: elaptics danke.
[14:49:38] siddart: has joined #RubyOnRails
[14:49:57] beauby: has joined #RubyOnRails
[14:51:15] nemo_: has joined #RubyOnRails
[14:51:47] tubbo: quite an unfortunate side effect of AR::Base using class inheritance rather than composition
[14:55:06] hfp: has joined #RubyOnRails
[14:55:40] hfp_work: has joined #RubyOnRails
[14:57:10] reckoner: has left #RubyOnRails: ()
[14:58:00] blackmesa: has joined #RubyOnRails
[14:58:21] dopie: has joined #RubyOnRails
[14:58:50] jhass: has joined #RubyOnRails
[14:59:14] devdazed: has joined #RubyOnRails
[14:59:16] tenderlove: has joined #RubyOnRails
[15:00:57] polishdub: has joined #RubyOnRails
[15:03:17] Cache_Money: has joined #RubyOnRails
[15:04:22] EminenceHC: has joined #RubyOnRails
[15:05:18] Eminence_: has joined #RubyOnRails
[15:07:07] hfp: has joined #RubyOnRails
[15:07:31] beauby: When developing a plugin that extends ActiveRecord::Base, through some acts_as_somethingable class method, is it better to define the plugin-specific methods dynamically inside the acts_as_somethingable method? (in order not to clutter the namespace when unnecessary)
[15:07:40] dopie: has joined #RubyOnRails
[15:07:41] hfp_work: has joined #RubyOnRails
[15:07:55] simkessy: has joined #RubyOnRails
[15:07:56] nurbson: has joined #RubyOnRails
[15:08:21] tubbo: beauby: it might be better to just develop the methods in a module concern so one can just `include BeaubysAwesomeExtensions` into their model
[15:09:04] nurbson: how do I pass an object to my view in rspec view tests?
[15:09:29] nurbson: it "shows name field" do
[15:09:30] nurbson: assign(:article, @article)
[15:09:31] nurbson: expect(rendered).to match /label/
[15:09:51] chouhoulis: has joined #RubyOnRails
[15:10:15] nurbson: in my view @article is still empty, or at least my form_for @article gets skipped without any error
[15:10:30] tubbo: nurbson: first of all, don't paste multiple lines into IRC...second of all, is @article in your test? please paste the whole test file to gist.github.com
[15:10:36] chouhoulis: has joined #RubyOnRails
[15:10:54] nurbson: tubbo: sry for the multiline
[15:11:02] tubbo: no worries
[15:11:03] momomomomo: has joined #RubyOnRails
[15:11:43] The_Phoenix: has joined #RubyOnRails
[15:12:16] Sweeper: has joined #RubyOnRails
[15:12:37] Sweeper: so, what is a js.mem file and how do I get sprockets to play nice with it?
[15:12:39] fschuindt: has joined #RubyOnRails
[15:12:47] tubbo: sweeper: good question
[15:13:07] tubbo: sounds like a custom thing
[15:13:10] nurbson: tubbo: https://gist.github.com/nurbs999/dc5e889ad2730445aa22
[15:13:27] Sweeper: tubbo: I see references to them, e.g. https://github.com/sidorares/npdf
[15:13:40] fschuindt: Hey, my model Job has_many Actions with dependent destroy. Why when I call Job.delete_all it does not delete its actions too? What's the proper way to do that?
[15:14:01] ellisTAA: has joined #RubyOnRails
[15:14:17] tubbo: nurbson: ok cool. and you can verify that @article is in fact not nil?
[15:14:27] Sweeper: fschuindt: there's destroy_all which runs callbacks, and delete_all which issues a plain sql delete, iirc
[15:14:44] Sweeper: or maybe it's Job.all.destroy!
[15:14:45] tubbo: sweeper: oh it says it uses emscripten...maybe that's what js.mem means?
[15:14:46] ellisTAA: for some reason my form isn???t displaying my select boxes ??? has anyone had this problem? i???ve tried googling but can???t find anything that works https://gist.github.com/ellismarte/1310d21c74932a3eadf0#file-settings-rb-L22-L26
[15:14:57] nurbson: <%= @article %> produces an output with an address
[15:15:03] fschuindt: sweeper: what do you think its better?
[15:15:11] tubbo: yeah that's probably what it is, "compiled" JS.
[15:15:24] tubbo: fschuindt: destroy_all
[15:15:27] Sweeper: fschuindt: delete_all will be much faster, but destroy_all will run callbacks
[15:15:29] tubbo: is the right method to use
[15:15:35] Sweeper: so depends on what you want *shruf*
[15:15:39] fschuindt: thank you guys :)
[15:16:16] fschuindt: In fact I only figured out this error due to RSpec, got to love testing
[15:16:35] nurbson: tubbo: damn, it is nil
[15:16:40] EminenceHC: has joined #RubyOnRails
[15:16:58] disgrntld: has joined #RubyOnRails
[15:17:05] nurbson: next question, how to I pass the object from my spec to the view like the controller action would ?
[15:17:35] Sweeper: tubbo: yea I concur, looks like it's emscripten
[15:18:39] tubbo: nurbson: well first of all you have an object that isn't nil
[15:18:40] Cervajz: has joined #RubyOnRails
[15:18:41] tubbo: i mean that's step one
[15:18:42] sunya7a: has joined #RubyOnRails
[15:18:55] tubbo: nurbson: i'd use an rspec `let` rather than an instance variable here
[15:19:28] nurbson: tubbo: in my spec the object is valid ;)
[15:19:38] nurbson: I'll check 'let'
[15:19:39] chopin: has joined #RubyOnRails
[15:20:54] tubbo: hmm...interesting
[15:21:19] The_Phoenix: has joined #RubyOnRails
[15:23:13] nurbson: ok, my object is not nil but the form_for still gets skipped
[15:23:20] lindii_: has joined #RubyOnRails
[15:23:59] The_Phoenix: has joined #RubyOnRails
[15:23:59] ellisTAA: so i figured out the reason why the checkboxes are appearing is because the label has a ::before thing in front of it ???
[15:24:32] nemo_: has joined #RubyOnRails
[15:24:59] Fire-Dragon-DoL: has joined #RubyOnRails
[15:25:24] nurbson: tubbo: found the error, my form_for snippet was broken
[15:25:57] nurbson: the '=' was missing in <%= form_for %>
[15:26:55] tubbo: that'll do it :)(
[15:27:00] pawnbox: has joined #RubyOnRails
[15:27:02] hashpuppy: has joined #RubyOnRails
[15:27:04] tubbo: made that mistake sooo many times
[15:27:09] nurbson: i updated my gist
[15:27:16] momomomomo: has joined #RubyOnRails
[15:28:19] tubbo: nurbson: why? it works now right?
[15:28:40] artto: has joined #RubyOnRails
[15:28:51] gasbakid_: has joined #RubyOnRails
[15:29:01] hashpuppy: i have data coming back from postgresql as a json object. in console, when i do data.as_json, i get: [{\"some_num\": 10}]. when I render that with render json: data.as_json it shows up as [{"some_num":"10"}]. why does it add quotes around my integers?
[15:29:27] beauby: tubbo: right, but I saw many plugins that include themselves into AR::Base. Is this an anti-pattern?
[15:29:33] cschneid_: has joined #RubyOnRails
[15:29:47] Cervajz: has joined #RubyOnRails
[15:30:05] Slogger: I'm having a problem where in a production setup my ActionCable client constantly subscribes to the same channel repeatedly, but in dev mode subscribe is triggered only once. I suspect it may somehow be related to how I've configured nginx as a reverse proxy for puma on the "production" (really pre production/staging) server as opposed to just running thin in dev, but not sure.
[15:30:07] woods: has joined #RubyOnRails
[15:30:12] Cervajz_: has joined #RubyOnRails
[15:30:53] Muz: has joined #RubyOnRails
[15:31:03] rhino-sic: has joined #RubyOnRails
[15:31:18] The_Phoenix: has joined #RubyOnRails
[15:31:24] momomomomo: Slogger: why not just run puma in dev if you suspect it to be a multithreading issue
[15:31:39] rhino-sic: QUESTION: I'm having an issue with csrf tokens. I just changed from SessionStore to CacheStore
[15:31:48] rhino-sic: is there anything I have to do to configure them?
[15:31:57] rhino-sic: my meta tag and form_for token do not match
[15:32:03] momomomomo: rhino-sic: !ask
[15:32:03] helpa: rhino-sic: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[15:32:04] rhino-sic: no ajax or anything special
[15:32:10] helpa: The enter key is not spacebar. Please do not abuse it.
[15:32:12] Slogger: Well, I'll try using puma in dev, what I mean wasn't that I thought it was multithreading so much as maybe there was something funky with my nginx config.
[15:32:31] Muz: has left #RubyOnRails: ()
[15:32:34] woods: good morning
[15:32:37] momomomomo: Slogger: have you pasted your nginx config? how can we tell
[15:32:39] momomomomo: Slogger: !ask
[15:32:39] helpa: Slogger: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[15:32:43] momomomomo: morning woods
[15:32:58] fschuindt: Job has many Actions. Action has the method .error? to a actual bool field called error. How can I create a Job scope to get only the Jobs that have at least one Action with .error true?
[15:33:36] Slogger: Well I was getting there. Hold on a second.
[15:33:40] lord4163: rhino-sic: I don't believe that, when I post information, people seem to find it too complicated too answer, by asking can anybody help me first, people start responding, weird huh?
[15:33:41] The_Phoenix: has joined #RubyOnRails
[15:33:42] IFrank00: has joined #RubyOnRails
[15:34:13] rhino-sic: has left #RubyOnRails: ("WeeChat 1.2")
[15:34:28] momomomomo: fschuindt: http://guides.rubyonrails.org/active_record_querying.html#scopes - if you can do the query in the database, without relying on the method, that's 100% better
[15:35:04] fschuindt: momomomomo: thank you, I will check for sure
[15:36:40] chouhoulis: has joined #RubyOnRails
[15:36:52] IFrank00: Hi really confused about how to handle the new/create form and the edit form when having a nested route shallow. How can I pass the project_task_path only on create and on edit pass only the task_path on the form_for( "HERE")
[15:38:14] _el_fer_: has joined #RubyOnRails
[15:38:24] The_Phoenix: has joined #RubyOnRails
[15:38:33] Slogger: https://gist.github.com/anonymous/db7841f60eeb0e0b76a3 here's what my http block looks like currently (it's based on examples from Google and documentation).
[15:39:03] sunya7a: has joined #RubyOnRails
[15:39:24] Slogger: let's try that again
[15:40:01] oflannabhra: has joined #RubyOnRails
[15:44:04] Slogger: https://gist.github.com/anonymous/d3c00e8cb4682ab32b30 okay that should be better
[15:44:14] nettoweb: has joined #RubyOnRails
[15:44:41] deception1: has joined #RubyOnRails
[15:44:53] IFrank00: is this the only way of doing this http://strewnsocks.tumblr.com/post/11873677456/rails-3-nested-resources-shallow-routes
[15:45:23] nurbson: is it a good idea to have several expect-statements in a - it "tests a view" do...end - block when I test if every attribute of my oject has a input field?
[15:45:32] big|bad|wolf: has joined #RubyOnRails
[15:46:12] ldnunes: has joined #RubyOnRails
[15:46:23] tbuehlmann: nurbson, some say one expectation per example, but personally I'm not that strict
[15:47:11] momomomomo: ok Slogger and what do you suspect is the issue?
[15:47:17] The_Phoenix: has joined #RubyOnRails
[15:47:26] Slogger: Closing connections when it shouldn't
[15:47:37] Slogger: causing new connect events
[15:47:54] tenderlove: has joined #RubyOnRails
[15:48:17] deception1: how popular is property based testing in ruby on rails community ?
[15:48:24] nurbson: tbuehlmann in my opinion its a question of code duplication, therefor I also prefer more expects in one example, but i'm quiet new to tdd
[15:48:35] tubbo: deception1: probably not that popular because i'm not sure what that means ;) but can you explain it a bit?
[15:49:39] tbuehlmann: nurbson, I think it depends on what you test
[15:50:38] momomomomo: nurbson: if you're using rspec, you can use shared_examples_for for duplicative tests
[15:51:01] GriffinHeart: nurbson: I prefer one expectation per test, but think its ok multiple
[15:51:41] GriffinHeart: nurbson: but naming a test it 'tests a view' is a no no, not much effort to find a better description
[15:51:42] momomomomo: that way if you have multiple expectations per test, you can break them out to individual ones, and reuse the shared_example; if you're just grouping them together to save copy/pasta
[15:51:43] nurbson: momomomomo: thanks for the tip!
[15:51:54] barriommx: has joined #RubyOnRails
[15:52:02] deception1: tubby: A property-based testing framework runs the same test(defined as properties) over and over with generated input (generating input with the help of random number generator)
[15:52:09] gusrub: has joined #RubyOnRails
[15:52:29] shivil: has joined #RubyOnRails
[15:52:30] nurbson: GriffinHeart: I never do that ;) naming things is important
[15:53:18] momomomomo: Slogger: the only thing that catches me about your nginx config is both nopush and nodelay on. Check out https://t37.net/nginx-optimization-understanding-sendfile-tcp_nodelay-and-tcp_nopush.html
[15:53:21] [Butch]: has joined #RubyOnRails
[15:53:53] nurbson: right now my tests are "has name field" "has title field" "has submit button" etc, but that produces a lot of dublications
[15:54:05] nurbson: and yes, i'm using rspec btw
[15:54:14] Or1on: has joined #RubyOnRails
[15:54:27] UlisestheCras: has joined #RubyOnRails
[15:54:35] GriffinHeart: nurbson: I might be giving a dumb suggestion but extract duplication into a before?
[15:55:01] nurbson: even with "render" ?
[15:55:27] nurbson: like before :each do render end
[15:55:43] GriffinHeart: nurbson: Its like you got a state and you're testing the whole state in one it vs several its
[15:56:39] GriffinHeart: which is fine unless the state is complicated
[15:57:30] aruntomar: has joined #RubyOnRails
[15:58:16] nogic: has joined #RubyOnRails
[15:59:01] h7br1x: has joined #RubyOnRails
[15:59:20] Slogger: momomomomo: thanks, still reading through some things. But will try changing some of those settings.
[16:00:03] GriffinHeart: momomomomo: you mean like fuzzy tester?
[16:00:27] Cervajz: has joined #RubyOnRails
[16:00:51] daffy_duck_2: has joined #RubyOnRails
[16:00:56] tubbo: does anyone here use generator_spec? i'm getting this error on CI but not locally. i can't find where generator_spec uses either the Tempfile or StringIO classes, so i really don't know wtf is going on here
[16:00:58] tubbo: https://gist.github.com/tubbo/e83a7a57644d99983ce8
[16:00:58] smathy: has joined #RubyOnRails
[16:02:09] safety_cut: has joined #RubyOnRails
[16:02:13] nogic: has joined #RubyOnRails
[16:02:19] tubbo: just added the test file
[16:02:47] barriommx: has left #RubyOnRails: ()
[16:04:13] CheckYourSix: has joined #RubyOnRails
[16:04:18] SteenJobs: has joined #RubyOnRails
[16:04:20] nogic_: has joined #RubyOnRails
[16:04:59] ruurd: has joined #RubyOnRails
[16:05:09] n008f4g_: has joined #RubyOnRails
[16:05:12] IrishGringo: has joined #RubyOnRails
[16:07:12] vigintas: has joined #RubyOnRails
[16:08:40] The_Phoenix: has joined #RubyOnRails
[16:10:34] The_Phoenix: has joined #RubyOnRails
[16:10:41] big|bad|wolf: has joined #RubyOnRails
[16:10:56] AzaToth: has joined #RubyOnRails
[16:11:48] agdr: has joined #RubyOnRails
[16:12:19] The_Phoenix: has joined #RubyOnRails
[16:12:50] trautwein: has joined #RubyOnRails
[16:13:37] thither: has joined #RubyOnRails
[16:14:46] rdavila: has joined #RubyOnRails
[16:17:20] snockerton: has joined #RubyOnRails
[16:18:02] Gustavo: has joined #RubyOnRails
[16:18:09] jessemcgilallen: has joined #RubyOnRails
[16:18:39] aruntomar: has joined #RubyOnRails
[16:18:57] acovrig: has joined #RubyOnRails
[16:19:06] onzeman: has joined #RubyOnRails
[16:19:43] acovrig: has joined #RubyOnRails
[16:20:06] gasbakid__: has joined #RubyOnRails
[16:22:01] spellbook_: has joined #RubyOnRails
[16:22:27] towski_: has joined #RubyOnRails
[16:22:54] onzeman: has joined #RubyOnRails
[16:25:20] yogeshrt: has joined #RubyOnRails
[16:25:49] tubbo: onzeman: hi again :P
[16:26:06] onzeman: i'm would like to use rails to build an rest-api using mongodb and mongoid. i would like to create custom fields, but even with the example from the tutorial (https://docs.mongodb.org/ecosystem/tutorial/ruby-mongoid-tutorial/#custom-fields) i'm getting NameError... any ideas?
[16:26:57] CheckYourSix: has joined #RubyOnRails
[16:27:33] The_Phoenix1: has joined #RubyOnRails
[16:27:36] gasbakid__: has joined #RubyOnRails
[16:28:33] GnuYawk: has joined #RubyOnRails
[16:28:36] blackmes1: has joined #RubyOnRails
[16:31:34] Axilla: has joined #RubyOnRails
[16:31:36] gasbakid__: has joined #RubyOnRails
[16:32:05] Axilla: how do you guys handle render block CSS in rails? Google is complaining that my CSS file is blocking rendering but as far as i'm aware there is no way to load CSS async like w/ JS is there?
[16:32:17] Lytol: has joined #RubyOnRails
[16:32:21] Maletor: has joined #RubyOnRails
[16:33:10] weihan: has joined #RubyOnRails
[16:33:23] agdr: Is there an actively maintained gem for adding automatic created_by/updated_by to models?
[16:33:29] reptilain_brain: has joined #RubyOnRails
[16:33:40] nertzy: has joined #RubyOnRails
[16:33:41] reptilain_brain: Hi guys is there a way to broadcast a message from TCPServer without establishing client connections?
[16:34:35] chouhoulis: has joined #RubyOnRails
[16:34:44] zpe: has joined #RubyOnRails
[16:35:12] trautwein: has joined #RubyOnRails
[16:36:04] UlisestheCras: has joined #RubyOnRails
[16:38:37] h7br1x: has joined #RubyOnRails
[16:40:41] speakingcode: has joined #RubyOnRails
[16:40:53] pawnbox: has joined #RubyOnRails
[16:41:21] hashpuppy: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[16:41:36] hahuang65: has joined #RubyOnRails
[16:41:37] The_Phoenix: has joined #RubyOnRails
[16:41:59] nogic: has joined #RubyOnRails
[16:42:04] agdr: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[16:42:09] youngbaks: has joined #RubyOnRails
[16:42:47] The_Phoenix: has joined #RubyOnRails
[16:45:45] The_Phoenix: has joined #RubyOnRails
[16:46:04] tenderlove: has joined #RubyOnRails
[16:46:16] hephaestus_rg: has joined #RubyOnRails
[16:47:48] tubbo: reptilain_brain: broadcast to whom?
[16:47:57] tubbo: the connected clients? :P
[16:48:11] ddv: has joined #RubyOnRails
[16:48:57] Pumukel: has joined #RubyOnRails
[16:49:22] reptilain_brain: right - basically there is TCPServer tha has .open() loop runnning and there are clients but I want to send message to those who did not establish connection via handshake yet
[16:49:25] reptilain_brain: is it even possible?
[16:49:32] s2013: has joined #RubyOnRails
[16:50:14] adaedra: you mean sending a message to /everything/ except already connected?
[16:50:33] arBmind: has joined #RubyOnRails
[16:50:45] reptilain_brain: basically if the TCPServer restarted but the clients are still there
[16:50:51] woods: has joined #RubyOnRails
[16:50:52] reptilain_brain: its a LAN kind of scenario..
[16:52:06] The_Phoenix: has joined #RubyOnRails
[16:52:10] adaedra: That would require all your clients to listen for this, one way or another
[16:52:43] VeryBewitching: has joined #RubyOnRails
[16:53:10] reptilain_brain: so they are listenining .. the clients are not Ruby
[16:53:14] woods: VeryBewitching!
[16:53:36] reptilain_brain: how would I know there are clients listening?
[16:53:47] reptilain_brain: TCPServer.listen?
[16:54:39] VeryBewitching: TCPServer.listen *should* open a port and await a client connection.
[16:54:52] jhass: reptilain_brain: you don't do broadcasts with a server, you do them with a regular socket connected to the right broadcast or multicast address
[16:56:11] reptilain_brain: ok so I have server running and I have a client that broadcasts to server?
[16:56:13] MartinElvar: has joined #RubyOnRails
[16:57:49] pabvid: has left #RubyOnRails: ()
[16:57:58] noah256: has joined #RubyOnRails
[16:58:19] jhass: no you have regular sockets connected to the broadcast/multicast address and read or write to them
[16:58:29] andrew9184: has joined #RubyOnRails
[16:59:38] sunya7a: has joined #RubyOnRails
[17:02:05] reptilain_brain: ok - how can I find out if the socket is connected? if it didn???t broadcast
[17:02:26] arthurnn: has joined #RubyOnRails
[17:02:26] reptilain_brain: all the clients have static IPs if that helps..
[17:03:15] The_Phoenix: has joined #RubyOnRails
[17:03:20] rakm: has joined #RubyOnRails
[17:03:42] jhass: https://tools.ietf.org/html/rfc919
[17:03:46] kalusn: has joined #RubyOnRails
[17:04:13] snockerton: has joined #RubyOnRails
[17:04:17] arthurnn: has joined #RubyOnRails
[17:04:42] riotjones: has joined #RubyOnRails
[17:04:43] tenderlove: has joined #RubyOnRails
[17:04:50] jhass: https://en.wikipedia.org/wiki/IP_multicast
[17:05:36] The_Phoenix: has joined #RubyOnRails
[17:06:11] rdavila: has joined #RubyOnRails
[17:06:11] dopie: has joined #RubyOnRails
[17:06:27] reptilain_brain: so basically I need this http://tx.pignata.com/2012/11/multicast-in-ruby-building-a-peer-to-peer-chat-system.html not this ? http://www.sitepoint.com/ruby-tcp-chat/
[17:06:33] reptilain_brain: sorry for such lame question
[17:07:36] jhass: how would I know what you actually want
[17:07:49] beauby: Any simple way to have a unique increasing index column?
[17:07:50] jhass: you never told us anything about what you want to do (or what it has to do with Rails)
[17:08:18] jhass: beauby: AR generates you an id column by default
[17:09:30] oflannabhra: has joined #RubyOnRails
[17:09:31] beauby: jhass: the id column is not guaranteed to be increasing though, is it?
[17:10:18] jhass: beauby: it is
[17:10:37] beauby: jhass: I'm afraid it is not
[17:10:50] jhass: then your RDBMS is beyond shitty, sorry
[17:11:15] beauby: It should be most of the time, but AR does not give any guarantee that the underlying dbms won't start reusing old ids
[17:11:37] jhass: as said, if it actually does that, get another one
[17:11:53] greengriminal: has joined #RubyOnRails
[17:12:51] beauby: jhass: Sure, that's one possibility. My question though was more: given that AR makes no promise at that level, is there a workaround to have such an ordered unique column?
[17:13:38] dopamean_: has joined #RubyOnRails
[17:13:43] The_Phoenix: has joined #RubyOnRails
[17:14:22] jhass: that'd be DMBS specific, the mechanism AR uses for the id column is exactly the one the DBMS provides this usecase, if AR doesn't use such a mechanism for your DBMS, it's most likely simply not available
[17:14:32] MEATCHICKEN: beauby, you really don't want to implement this yourself lol
[17:14:54] beauby: jhass: there are somewhat less constraints than for the id column though
[17:14:56] jhass: you actually can't implement this yourself in a sane manner without support of the DBMS
[17:14:56] MEATCHICKEN: beauby, if you really wanted - lock the table, grab the latest id, increment, store
[17:14:58] linocisco: has joined #RubyOnRails
[17:15:14] jhass: meatchicken: that'll go wrong
[17:15:15] MEATCHICKEN: jhass, really?
[17:15:15] beauby: meatchicken: it does not need to be a primary key
[17:15:34] linocisco: how to check if a website is built on RubyonRails or what ?
[17:15:42] ngscheurich: has joined #RubyOnRails
[17:15:45] jhass: meatchicken: yeah, unless you lock the entire table for each select, insert
[17:15:48] MEATCHICKEN: linocisco, the routes will usually give it away
[17:15:57] jhass: meatchicken: which would be slow as hell
[17:16:03] linocisco: meatchicken, I dont understand
[17:16:12] Lytol: has joined #RubyOnRails
[17:16:14] MEATCHICKEN: linocisco, rails apps tend to use resourceful routing..it is painfully easy to tell..at least for me
[17:16:27] jhass: linocisco: the asset paths are another good indicator
[17:16:30] beauby: meatchicken: as do many web frameworks
[17:17:11] linocisco: meatchicken, jhass for example. let me give you a sample website, how can you see asset path and route because it is not your own?
[17:17:26] MEATCHICKEN: linocisco, are you trying to attack this site? why does it matter?
[17:17:48] jhass: linocisco: the URLs are in your address bar, the asset paths are in your browsers inspector
[17:18:12] linocisco: meatchicken, I want to know how to check if the website is written in Rails or not. like w3cvalidadtor or something like that
[17:18:37] linocisco: what about this http://mspiral.com
[17:19:05] linocisco: some people can say it is written in php, it is java , it is perl easily
[17:19:15] linocisco: I dont know how to tell like them
[17:19:32] linocisco: by just seeing a website
[17:19:34] MEATCHICKEN: linocisco, it isn't supposed to be easy to tell
[17:19:57] linocisco: one thing i know is all rails websites are top to down design
[17:20:14] MEATCHICKEN: I typically look for defaulst
[17:20:14] linocisco: meatchicken, it is also found in some wordpress themes
[17:20:20] MEATCHICKEN: defaults* and this one does not seem like a rails site
[17:20:38] linocisco: meatchicken, it is confusing if they use wordpress CMS or using rails
[17:21:10] jkamenik: has joined #RubyOnRails
[17:21:21] tenderlove: has joined #RubyOnRails
[17:21:54] linocisco: let me ask you one listing that refresh time is nearly 0 sec to reload. http://www.themimu.info/jobs-for-myanmar-nationals
[17:22:19] linocisco: pls click on each page number down there. it is so fast to change listing from one page to another.
[17:22:26] linocisco: what is that technology?
[17:22:52] linocisco: AJAX, or Perl or Php or Rails or node.js or using what kind of ??
[17:23:07] linocisco: it is strange to me
[17:25:36] quazimodo: has joined #RubyOnRails
[17:25:37] arup_r: has joined #RubyOnRails
[17:25:37] quazimod1: has joined #RubyOnRails
[17:26:44] quazimodo: has joined #RubyOnRails
[17:27:50] iateadonut: has joined #RubyOnRails
[17:28:47] mikecmpbll: has joined #RubyOnRails
[17:28:56] aruntomar_: has joined #RubyOnRails
[17:29:09] imp4t: has joined #RubyOnRails
[17:29:31] draken: linocisco css creating altered by jquery i think
[17:30:16] han-`: has left #RubyOnRails: ()
[17:30:33] han`: has joined #RubyOnRails
[17:32:01] linocisco: draken, thanks
[17:32:33] acovrig: has joined #RubyOnRails
[17:33:22] oflannabhra: has joined #RubyOnRails
[17:34:53] LambdaSource: has joined #RubyOnRails
[17:36:32] dopamean_: is it possible to create a global method in a rails app that is available in all controllers, models, and views?
[17:36:35] dopamean_: and perhaps other things like services and whatnot
[17:36:38] based_pdev_: has joined #RubyOnRails
[17:36:40] malcolmva: has joined #RubyOnRails
[17:36:56] Slogger: I can confirm that using puma directly in dev has no issues
[17:37:26] Slogger: Guess I'll try puma without nginx on prepro just to see how that goes
[17:41:06] tenderlo_: has joined #RubyOnRails
[17:41:43] DaniG2k: has joined #RubyOnRails
[17:44:32] IFrank00: has joined #RubyOnRails
[17:45:22] nemo_: has joined #RubyOnRails
[17:45:48] ivanskie: has joined #RubyOnRails
[17:46:27] djbkd: has joined #RubyOnRails
[17:46:29] srinidhi: has joined #RubyOnRails
[17:46:32] Lincee: has joined #RubyOnRails
[17:49:59] trosborn: has joined #RubyOnRails
[17:51:19] kara_sweets: has joined #RubyOnRails
[17:51:50] Intii: has joined #RubyOnRails
[17:52:07] jessemcgilallen: has joined #RubyOnRails
[17:52:09] kara_sweets: hey guys, i have a relation such that company.contests , contest.proposals - all lines up
[17:52:18] kara_sweets: I'm trying to find a company's proposal
[17:52:23] kara_sweets: via these two relationships
[17:52:42] kara_sweets: something like company.contests.includes(:proposals).where("proposal.id = ?", 1)
[17:52:52] kara_sweets: however, this query does not work
[17:53:03] kara_sweets: PG::UndefinedTable: ERROR: missing FROM-clause entry for table "proposal"
[17:53:23] Intii: Hi everyone, what is the "rails way" of storing a shit ton of data that is going to be used to generate a 20+ page report based on inputs by the user?
[17:53:55] kara_sweets: Intii: database?
[17:54:00] safety_cut: has joined #RubyOnRails
[17:54:01] workmad3: kara_sweets: that would probably be because the table is called `proposals`, not `proposal` ;)
[17:54:33] hephaestus_rg: has joined #RubyOnRails
[17:54:39] kara_sweets: workmad3: :) PG::UndefinedTable: ERROR: missing FROM-clause entry for table "proposals"
[17:54:40] blackmes1: has joined #RubyOnRails
[17:54:45] Intii: kara_sweets: I know.... I was just wondering, do I setup a relational database and have a column for each answer or something like MongoDB?
[17:54:48] kara_sweets: workmad3: i thought the same thing
[17:55:22] workmad3: kara_sweets: is this rails 4 btw? if so, you may need to do `company.contests.includes(:proposals).where("proposal.id = ?", 1).references(:proposals)`
[17:55:24] kara_sweets: Intii: hard to tell based on the info you're providing, but a relational database would probably work
[17:55:36] kara_sweets: workmad3: yea it is, ill try that
[17:55:52] workmad3: (you could also try `company.contents.includes(:proposals).where(proposals: {id: 1})`)
[17:56:18] EminenceHC: has joined #RubyOnRails
[17:56:57] kara_sweets: workmad3: seems like progress but ActiveRecord::StatementInvalid: PG::AmbiguousColumn: ERROR: column reference "created_at" is ambiguous
[17:57:06] kara_sweets: looks like it might be running a default order scope
[17:57:20] Intii: kara_sweets: Hmm... okay... it's for a doctor's office and it's basically an injury report. Doc asks questions to patient and fills it out on the rails apps. The questions are kind of complex, as in they could have 1-3 different answers
[17:57:37] workmad3: kara_sweets: ah, yeah... that sounds likely
[17:57:47] kara_sweets: Intii: so you're data model would probably have Answers / Questions, stored in your db
[17:58:00] kara_sweets: when you generate the report you may move into a background job something
[17:58:16] kara_sweets: maybe unscope?
[17:58:45] kara_sweets: workmad3: think we did it my friend...
[17:58:45] kara_sweets: company.contests.includes(:proposals).where(proposals: {id: 1}).unscope(:order)
[17:59:06] solars: has joined #RubyOnRails
[17:59:09] workmad3: kara_sweets: :)
[17:59:46] Intii: kara_sweets: So, just basically have 1 column for each question? Then a seperate data model for the answers and link them together?
[17:59:56] tenderlove: has joined #RubyOnRails
[17:59:57] herbst: has joined #RubyOnRails
[18:00:29] IFrank00: I has task in a nested route now how can I past the this url project/:id/task/schedule to the full calendar js
[18:00:31] kara_sweets: basically, you'd have a question that has_many (or has_one) answer, and an answer belongs_to question
[18:00:39] IFrank00: https://gist.github.com/Frank004/046cdf08e0a61bd73ff3
[18:00:44] Lytol: has joined #RubyOnRails
[18:00:46] kara_sweets: so you'd store a question_id on every answer
[18:00:51] kara_sweets: and think if it like rows, not columns
[18:00:52] hephaestus_rg: has joined #RubyOnRails
[18:01:07] kara_sweets: a row is a better visual for an individual object, a column would an attribute on the object
[18:01:10] kara_sweets: like a spreadsheet
[18:01:25] kara_sweets: so two models
[18:01:34] kara_sweets: and the answers would belong to a patient
[18:01:39] kara_sweets: and question belongs_to doctor
[18:01:50] kara_sweets: however you want to name and set it up
[18:02:22] theblang: has joined #RubyOnRails
[18:02:35] Mattx: has joined #RubyOnRails
[18:02:40] Mattx: Hello guys!
[18:03:17] Mattx: Why foo_url doesn't use the app host? I'm getting http://localhost:3000/foo instead of http://mydomain.com/foo
[18:03:40] barhum2013: has joined #RubyOnRails
[18:04:05] Intii: kara_sweets: Awesome thanks!!!!
[18:04:32] kara_sweets: 4 models* based on the extra two
[18:04:59] cnk: has joined #RubyOnRails
[18:05:05] barhum2013: Hello all, is it possible to add a class to the fieldset in semantic form. I am trying this syntax on f.inpus :wrapper_html => {:class => "template-body"} but I am getting an error. This does work on indivial inputs though.
[18:05:47] Intii: kara_swwets: What do you mean by that? 4 models based on the extra 2?
[18:07:15] zcreative: has joined #RubyOnRails
[18:07:46] choke: has joined #RubyOnRails
[18:07:57] zcreative_: has joined #RubyOnRails
[18:08:08] Mattx: any idea regarding the _url route helper? it's not using the correct host
[18:08:16] zcreative__: has joined #RubyOnRails
[18:08:36] zcreative___: has joined #RubyOnRails
[18:08:51] Owner__: has joined #RubyOnRails
[18:08:55] zcreative____: has joined #RubyOnRails
[18:09:13] zcreative_____: has joined #RubyOnRails
[18:09:17] reptilain_brain: has joined #RubyOnRails
[18:09:22] Intii: kara_sweets: What do you mean by that? 4 models based on the extra 2?
[18:09:33] zcreative_____: has joined #RubyOnRails
[18:09:38] kara_sweets: answer, question, doctor, patient
[18:09:44] kara_sweets: as opposed to just answer, question
[18:09:44] Owner__: Hello, i have a passenger app question. does anyone know if service apache2 reload will pick up and apply "PassengerFriendlyErrorPages no" without restarting the app, or is that impossible
[18:09:52] zcreative______: has joined #RubyOnRails
[18:09:57] kara_sweets: Owner__: stack overflow is where you wanna be
[18:10:11] Intii: kara_sweets: oh yah okay i get you. I already have my doctor and patient models setup
[18:10:13] Owner__: i dont wanna be on stack overflow
[18:10:13] zcreative_______: has joined #RubyOnRails
[18:10:20] Pazician: has joined #RubyOnRails
[18:10:44] LambdaSource: has joined #RubyOnRails
[18:10:51] Pazician: has joined #RubyOnRails
[18:11:18] netzfisch: has joined #RubyOnRails
[18:11:49] roamingdog: has joined #RubyOnRails
[18:14:11] Owner__: has left #RubyOnRails: ("Leaving")
[18:14:28] tenderlove: has joined #RubyOnRails
[18:15:42] kara_sweets: workmad3: looks like that query actually returns a contest object, not a proposal :(
[18:15:50] kara_sweets: @current_company.contests.includes(:proposals).where(proposals: {id: params[:id]}).unscope(:order).first
[18:16:15] joshkovach: has joined #RubyOnRails
[18:16:17] workmad3: kara_sweets: yeah it will... you're filtering contents, not proposals
[18:16:24] EminenceHC: has joined #RubyOnRails
[18:16:30] trautwein: has joined #RubyOnRails
[18:16:32] treehug88: has joined #RubyOnRails
[18:16:43] kara_sweets: do you know how to filter the proposals
[18:17:17] spellbook: has joined #RubyOnRails
[18:17:36] workmad3: kara_sweets: Proposal.where(id: 1, contests: @current_company.contests) maybe?
[18:17:47] spellbook: How do you check the configuration of rspec? For example, what if I wanted to check whether infer_base_class_for_anonymous_controllers was set to true or false?
[18:17:49] workmad3: (need to go have food now, hopefully that's the right direction)
[18:17:54] FailBit: pretty sure you can't do that in one query, kara_sweets
[18:18:04] kara_sweets: FailBit: really? i believe you can
[18:18:06] FailBit: actually, hm
[18:18:14] kara_sweets: pretty sure of it
[18:18:23] FailBit: ah yes a filter
[18:18:39] adac: has joined #RubyOnRails
[18:18:50] FailBit: query on proposal_id
[18:19:13] workmad3: kara_sweets: you could also add `has_many :proposals, through: :contests` to Company, and then just do `@current_company.proposals.where(id: 1)`
[18:19:25] FailBit: oh, has_many through
[18:20:01] workmad3: FailBit: I was walking away, then realised HM:T would work :)
[18:20:02] kara_sweets: workmad3: this worked for the record, Proposal.where(id: 136, contest: c.contests)
[18:20:07] reptilain_brain: jhass: sorry was away. Essentially I have a TCPServer (run via Rake) that accepts messages from clients. Kind of like a chat. I am trying to figure how would I send messages to clients if the server gets reloaded.. Now I understasnd it sounds really crazy - but I need to replicate behaviour of some legacy system where I only have Client program that is TCP client (definitely no server) waiting for init message from
[18:20:08] reptilain_brain: server ot initiate connection and start chatting.
[18:20:18] LambdaSource: has joined #RubyOnRails
[18:20:22] kara_sweets: also, very nice simple solution on the has_many relation... should've just done that.. doh!
[18:21:31] jhass: reptilain_brain: you would either reload by keeping the sockets open (fork & exec) or tell the clients to reconnect in x seconds
[18:23:57] devdazed_: has joined #RubyOnRails
[18:26:04] s2013: has joined #RubyOnRails
[18:26:16] LambdaSource: has joined #RubyOnRails
[18:27:11] tweeeaks: has joined #RubyOnRails
[18:28:24] Eminence_: has joined #RubyOnRails
[18:28:53] `based_pdev`: has joined #RubyOnRails
[18:29:02] bendangelo: has joined #RubyOnRails
[18:29:07] Aherin: has joined #RubyOnRails
[18:29:22] reptilain_brain: jhass: thank you - so if the Server is terminated by, say, hard-reset (power off etc.) there is no way clients hanging in there would reconnect
[18:29:47] zcreative: has joined #RubyOnRails
[18:29:53] devdazed: has joined #RubyOnRails
[18:30:32] gustav__: has joined #RubyOnRails
[18:30:45] GnuYawk: has joined #RubyOnRails
[18:32:00] arup_r: has joined #RubyOnRails
[18:32:49] tenderlove: has joined #RubyOnRails
[18:33:07] jhass: reptilain_brain: depends, their connections would reset fairly quickly
[18:33:09] ribbons: has joined #RubyOnRails
[18:33:15] jhass: what they do on that is up to them
[18:33:34] EminenceHC: has joined #RubyOnRails
[18:34:15] reptilain_brain: I see - they would still need to send me a ???ping??? or something to reinitialize it right?
[18:34:33] treehug88: has joined #RubyOnRails
[18:35:16] jhass: you no longer know they even existed, they would need to reconnect just the same as the initial connect
[18:35:45] IFrank00: how can I get a json data form my controller to the full calendar js
[18:36:03] EminenceHC: has joined #RubyOnRails
[18:36:16] snockerton: has joined #RubyOnRails
[18:36:32] craysiii: has joined #RubyOnRails
[18:36:46] Maletor: has joined #RubyOnRails
[18:36:54] IFrank00: Im looking for a way to fetch the data from project/:id/task/schedule my problem is the :id <------ see my https://gist.github.com/Frank004/046cdf08e0a61bd73ff3
[18:37:15] platzhirsch: has joined #RubyOnRails
[18:37:31] srinidhi1: has joined #RubyOnRails
[18:37:34] PlasmaStar: has joined #RubyOnRails
[18:37:35] Lloyd: has joined #RubyOnRails
[18:37:42] platzhirsch: Does Rails offer something like implementing custom events? let's say in addition to after_create I want to have a domain specific callback, domain-specific to my AR
[18:38:19] siddart: has joined #RubyOnRails
[18:38:46] reptilain_brain: jhass: got it thank you..
[18:38:46] kalusn: has joined #RubyOnRails
[18:39:00] srinidhi: has joined #RubyOnRails
[18:39:03] tubbo: IFrank00: what's the issue you're having?
[18:39:09] igorkasyanchuk: has joined #RubyOnRails
[18:39:14] shwoodard: has joined #RubyOnRails
[18:39:16] feignt: has joined #RubyOnRails
[18:39:35] tubbo: platzhirsch: sure, check out http://api.rubyonrails.org/classes/ActiveModel/Callbacks.html
[18:39:51] techsethi: has joined #RubyOnRails
[18:39:54] arthurnn: has joined #RubyOnRails
[18:40:12] EminenceHC: has joined #RubyOnRails
[18:40:27] platzhirsch: thanks tubbo!
[18:40:44] tubbo: that's how the callback methods are implemented in AR, i think you can add to it
[18:42:03] IFrank00: tubbo if you can se on my gist. I build a calendar for my task to display and work fin as event: /task/schedule but now that im adding the project as a parent in the nested form i need it to bu like this project/:id/task/schedule the :id part is what I need to add to the js
[18:42:37] LambdaSource: has joined #RubyOnRails
[18:42:53] IFrank00: tubbo, I add it my routes
[18:42:54] IFrank00: https://gist.github.com/Frank004/046cdf08e0a61bd73ff3
[18:43:22] tubbo: IFrank00: so how would the JS know what that id value is?
[18:43:43] IFrank00: tubbo, How can I place the project id in that url on the js file
[18:44:08] tubbo: IFrank00: well, the project ID has to be in the DOM somewhere for you to select it in there. what i would do is interpolate the value inside the URL
[18:44:44] IFrank00: tubbo as I can't use the erg on it and I know I have the id inside the events.json from the controller
[18:44:48] tubbo: the URL parameter should be like "/projects/"+$('#some_element_that_stores_your_project_id').attr('itemid')+"/tasks/schedule"
[18:45:08] tubbo: IFrank00: 'erg'?
[18:45:24] platzhirsch: has left #RubyOnRails: ()
[18:45:28] IFrank00: tubbo, erb code
[18:46:05] tubbo: IFrank00: but yeah, if you want to pass the project id into that 'events:' property for jQuery.fullCalendar, you need to have it in the DOM *somewhere*.
[18:46:15] tubbo: IFrank00: you said this was within a form_for right?
[18:46:37] IFrank00: tubbo, no im passing that with a link_to
[18:46:52] IFrank00: calling a action on my controller
[18:47:17] tubbo: IFrank00: oh ok. well you have to have the product ID in the dom, in order for that to happen
[18:48:43] craysiii: any suggestions for something like balsamiq but free?
[18:49:07] tenderlove: has joined #RubyOnRails
[18:49:52] LambdaSource: has joined #RubyOnRails
[18:50:53] IFrank00: tubbo, so if I do something like this <%= javascript_tag do %> window.events = JSON.parse('<%= raw @events%>') <% end %>
[18:50:58] FailBit: I love ksplice
[18:51:17] FailBit: IFrank00: wtf?
[18:51:41] A124: has joined #RubyOnRails
[18:53:23] shinnya: has joined #RubyOnRails
[18:53:31] LambdaSource: has joined #RubyOnRails
[18:53:48] rakm: has joined #RubyOnRails
[18:53:52] hephaestus_rg: has joined #RubyOnRails
[18:54:38] symbol: has joined #RubyOnRails
[18:54:44] rdavila: has joined #RubyOnRails
[18:55:32] IFrank00: tubbo, no idea on how to do it :/ or pass it .
[18:57:38] yfeldblum: has joined #RubyOnRails
[18:57:56] tubbo: IFrank00: nope.
[18:58:16] tubbo: IFrank00: i really have no idea what you're going for and you haven't produced the markup of the page you're working with, so it may already be in there somewhere.
[18:59:09] woods: has joined #RubyOnRails
[18:59:30] IFrank00: tubbo, Ill post the view on the gist
[18:59:50] kenelliott: has joined #RubyOnRails
[18:59:52] mwlang: has joined #RubyOnRails
[19:00:25] Maletor: has joined #RubyOnRails
[19:01:42] kenelliott: hi, I'm working with a rails json api on localhost with foreman and a emberjs front-end and I'm trying to find who to blame for sportic latency in an ajax request. Can someone advise where I can put a Rails.logger to see when the rails api receives the json request and then one where it sends the response?
[19:02:13] maxx88_: has joined #RubyOnRails
[19:03:17] nfk: has joined #RubyOnRails
[19:04:22] ResidentBiscuit: has joined #RubyOnRails
[19:04:31] ResidentBiscuit: Hey you guys. I have a questions
[19:04:46] FailBit: you would do well to ask 'em
[19:05:10] atomical: has joined #RubyOnRails
[19:05:24] mwlang: I seem to have a chicken and egg problem. I???m attempting very first deploy to a new server and the capistrano 3 script (Rails 4.1) project reports ???Could not find rake-10.4.2 in any of the sources. pertinent debug info in this gist: https://gist.github.com/mwlang/64778baee986b0028a36 Any ideas?
[19:05:31] riotjones: has joined #RubyOnRails
[19:05:52] tenderlove: has joined #RubyOnRails
[19:06:29] IFrank00: tubbo, yes thank you got it working
[19:06:39] bruno-: has joined #RubyOnRails
[19:07:25] ResidentBiscuit: has left #RubyOnRails: ("Critical Miss")
[19:07:49] podman: has joined #RubyOnRails
[19:09:28] andrew9184: has joined #RubyOnRails
[19:09:30] IFrank00: tuboo, https://gist.github.com/Frank004/046cdf08e0a61bd73ff3
[19:10:45] maxx88: has joined #RubyOnRails
[19:11:53] LambdaSource: has joined #RubyOnRails
[19:12:53] mwlang: hmmm???manually trying to install rake with ???rvm default do gem install rake??? gives me: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/local/rvm/gems/ruby-2.1.3 directory. ??? and checking directory permissions, I *should* have write permissions according to this, right? drwxrwsr-x 10 root rvm 4.0K Oct 8 18:36 ruby-2.1.3
[19:12:59] jobewan: has joined #RubyOnRails
[19:13:38] mwlang: albeit, I???m not entirely sure what the ???s??? is in that permissions list
[19:14:15] FailBit: it's owned by root
[19:14:26] FailBit: its parent directory is also owned by root
[19:14:42] treehug88: sticky bit. Look it up. Also what FailBit said
[19:16:17] havenwood: mwlang: A system install of RVM isn't recommended. RVM doesn't like being run as root. That said, presuming you're a non-root user, there's an RVM command to fix permissions: rvmsudo rvm fix-permissions
[19:16:41] mwlang: FailBit: Isn???t it ok for the folders to be owned by root as long as the deploy user is in the rvm group and the folders are assigned to the rvm group?
[19:17:27] mwlang: havenwood: not running as root, but perhaps the admin guy changed permissions for some reason.
[19:17:46] tubbo: mwlang: not if the access level isn't set up to do so
[19:18:20] tubbo: like if the folder is read-only except for people who own it (so in this case it would be 'root')
[19:18:33] havenwood: mwlang: If you can I'd suggest reinstalling RVM as a non-root user without sudo for an install in the local user directory.
[19:18:39] mwlang: havenwood: your answer resolves it.
[19:18:43] kenelliott: nevermind i found it around_filter
[19:18:57] havenwood: mwlang: Or yeah, fixing permissions for the system install. ;)
[19:19:34] tenderlove: has joined #RubyOnRails
[19:20:02] ruurd: has joined #RubyOnRails
[19:20:31] mwlang: havenwood: I???m reasonably sure rvm was installed via the ???deploy??? l-user and not root. I wonder just what that command changed???far as I can tell, no material change in those permissions.
[19:20:35] tubbo: kenelliott: also...you could look in the logs for "Started GET" and then "Completed request" and diff the time between the two :P
[19:21:23] kenelliott: thx tubbo, honestly I'm not trying to profile the request just find out when it actually receives it. Chrome is being mean to us right now and I'm trying to figure out why :D
[19:21:38] kenelliott: so before_filter would have worked too I suppose.
[19:22:11] tubbo: kenelliott: that "Started GET.." part should tell you when the request was actually received by the server, as the server doesn't know your browser is going to make a request until it makes one :)
[19:23:23] mwlang: well, I was able to install rake, but still have a problem with this command: rvm default do bundle install --path /home/deploy/jdx4/shared/bundle --without development test --deployment --local
[19:23:44] chopin_: has joined #RubyOnRails
[19:23:53] mwlang: even after running rvm default do gem install rake (to install 10.4.2)
[19:24:40] sunya7a: has joined #RubyOnRails
[19:24:41] mwlang: whacked??? a regular straight up ???bundle install??? is installing all the gems...
[19:28:08] tubbo: mwlang: doesn't install --local prevent bundler from hitting rubygems.org when fetching gems?
[19:28:15] blackmesa: has joined #RubyOnRails
[19:28:30] mwlang: tubbo: I was just starting to google that one...
[19:29:12] colleenmcguckin: has joined #RubyOnRails
[19:29:26] Pupeno: has joined #RubyOnRails
[19:29:26] Pupeno: has joined #RubyOnRails
[19:30:02] Coldblackice: has joined #RubyOnRails
[19:31:07] arup_r: Not able to stop propagation for beforeSend and complete events using event.stopImmediatePropagation() .. https://gist.github.com/aruprakshit/59448f42364de7e1f227
[19:31:13] arup_r: How can I do it ?
[19:31:43] arup_r: How to stop the parents event to active on child?
[19:31:51] simkessy: has left #RubyOnRails: ()
[19:32:36] FailBit: in singapore parents beat their children
[19:32:43] tenderlove: has joined #RubyOnRails
[19:32:59] simkessy: has joined #RubyOnRails
[19:33:46] NBarnes: has joined #RubyOnRails
[19:35:55] bronson: has joined #RubyOnRails
[19:36:26] matthias_: has joined #RubyOnRails
[19:37:11] fschuindt: In the Rails ActiveJob, the perform method is called when it is fired up. If I define a initialize method in my job class, it will be fired before perform?
[19:37:17] deception1: has joined #RubyOnRails
[19:37:19] fschuindt: Or it wont be fired at all?
[19:39:14] FailBit: it won't be fired because it's perform is class method
[19:39:29] Axilla: is there anything i can do for this? Your page has 1 blocking CSS resources. This causes a delay in rendering your page. It's applications.scss and it is minified
[19:40:46] lsone: has joined #RubyOnRails
[19:40:48] FailBit: axilla: nop
[19:40:57] andatche: has joined #RubyOnRails
[19:40:58] FailBit: but you should put your css before your js in the application layout
[19:40:58] peterpp: has joined #RubyOnRails
[19:41:37] Axilla: yea i load all my js at the bottom of the page
[19:41:50] Axilla: doing that already so i guess i'm as optimized as I can be there.
[19:41:59] Axilla: even though its listed as a "should fix"
[19:42:42] n1lo: has joined #RubyOnRails
[19:43:24] tubbo: FailBit: that's not ture
[19:43:42] tubbo: you define perform(record) as an instance method, but you call it as a class method.
[19:43:57] momomomomo: has joined #RubyOnRails
[19:44:16] tubbo: perform_later (or perform_now) is the class method you call on your Job, but perform(record) in the job instance is what actually defines it. i wouldn't use initialize in your job class to set up data.
[19:44:37] tubbo: axilla: might mean that a css animation blocks render
[19:44:43] tubbo: that's become an issue recently
[19:44:47] siddart: has joined #RubyOnRails
[19:45:43] Jasaka: has joined #RubyOnRails
[19:46:13] nogic: has joined #RubyOnRails
[19:46:38] Axilla: interseting i am doing some transforms which turn an icon 180 degress
[19:46:43] Axilla: could possibly be it.
[19:46:50] bonhoeffer: has joined #RubyOnRails
[19:47:06] arup_r: any idea on me.?
[19:48:15] tubbo: arup_r: did you try using the other stop propagation methods on event?
[19:48:30] tubbo: like https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation
[19:49:03] arup_r: I used http://makandracards.com/makandra/1122-cancelling-event-propagation-with-jquery
[19:49:14] arup_r: except that false and preventDefault()
[19:50:27] tubbo: event.preventDefault() is used most commonly on things like 'submit' or 'click' events to prevent the default event from also getting fired
[19:50:46] tubbo: for example, if you want to make an <a> tag that opens a page asynchronously within a modal dialog instead of actually refreshing the page
[19:51:10] arup_r: tubbo: my a is remote: true
[19:51:31] arup_r: so preventdefault() not needed. I need to stop propagation.
[19:51:38] arup_r: but I am not able to
[19:51:57] MartinEl_: has joined #RubyOnRails
[19:52:11] rdavila: has joined #RubyOnRails
[19:52:15] tenderlove: has joined #RubyOnRails
[19:52:22] EminenceHC: has joined #RubyOnRails
[19:52:24] tubbo: arup_r: why?
[19:52:55] arup_r: I tried event.stopImmediatePropagation() and event.stopPropagation()
[19:53:16] arup_r: but still clicking on the <a> propagating for beforeSend and complete hooks
[19:53:57] rhizome: what does $(@) mean?
[19:54:03] tubbo: rhizome: $(this)
[19:54:07] tubbo: @ == this in coffeescript
[19:54:18] bruno-: has joined #RubyOnRails
[19:54:23] rhizome: huh, hadn't come across that yet
[19:55:00] tubbo: arup_r: can you be a little more...tangible in your explanation? i just don't understand what you mean by 'propagating' in this case
[19:55:33] vigintas: has joined #RubyOnRails
[19:55:34] SteenJobs: has joined #RubyOnRails
[19:55:46] allcentury: has joined #RubyOnRails
[19:56:03] EminenceHC: has joined #RubyOnRails
[19:56:22] jwworth: has joined #RubyOnRails
[19:56:33] tubbo: like what exactly do you want to happen when the <a> is clicked, and what is happening instead?
[19:56:46] arup_r: When I am submitting form, I am chaging the button level using beforeSend hook, then restoring it using complete hook. But this is working when submitting the form. Now the anchor tag is inside the form. When I will click the link, I don't want the label changing effect, but it is happening.
[19:56:56] shmilan: has joined #RubyOnRails
[19:57:19] arup_r: clicking on link doing what I asked it do, but it is also changing the button text like the form submission.
[19:57:45] arup_r: This happening as I have those events binded to the parent(<form>) of the link(<a>)
[19:58:35] Pumukel: has joined #RubyOnRails
[19:59:29] doctorly: has joined #RubyOnRails
[19:59:41] doctorly: I am using arch and having problem start rails server. I have my project files on an SD card. The error I get is: `initialize': Connection refused - connect(2) for "localhost" port 9200 (Faraday::ConnectionFailed)
[19:59:50] gustav__: has joined #RubyOnRails
[20:01:36] bonhoeffer: has joined #RubyOnRails
[20:01:47] nettoweb: has joined #RubyOnRails
[20:01:58] rakm: has joined #RubyOnRails
[20:02:03] workmad3: has joined #RubyOnRails
[20:03:25] rhizome: faraday is saying connection refused
[20:04:09] speakingcode: has joined #RubyOnRails
[20:04:19] axl_: has joined #RubyOnRails
[20:04:24] doctorly: rhizome: I'm trying to figure out why the connection is refused, how should I trouble shoot?
[20:04:51] rhizome: read your log files and the setup docs for faraday
[20:04:52] hahuang65: has joined #RubyOnRails
[20:05:11] rhizome: what does faraday try to connect to?
[20:06:34] doctorly: rhizome: I think es, I am going to check the daemon and see what is going on at that end.
[20:08:07] kadoppe: has joined #RubyOnRails
[20:08:15] jobewan: has joined #RubyOnRails
[20:08:31] tenderlove: has joined #RubyOnRails
[20:10:08] hephaestus_rg: has joined #RubyOnRails
[20:10:55] carlosd: has joined #RubyOnRails
[20:12:07] duderonomy: has joined #RubyOnRails
[20:12:16] arup_r: fucking hard..... huuh
[20:12:17] ruby-lang045: has joined #RubyOnRails
[20:13:38] ellisTAA: has joined #RubyOnRails
[20:13:48] arup_r: tubbo: I solved it this way https://gist.github.com/aruprakshit/59448f42364de7e1f227#file-distribution_list_v2-coffee . But I HATE my solution.
[20:14:04] arup_r: If any good suggestions if you have please let me know
[20:14:47] nettoweb: has joined #RubyOnRails
[20:15:28] irbirbolromg: has joined #RubyOnRails
[20:15:43] colleenmcguckin: has joined #RubyOnRails
[20:15:48] sunya7a: has joined #RubyOnRails
[20:15:55] workmad3: has joined #RubyOnRails
[20:15:58] choke: has joined #RubyOnRails
[20:16:15] ellisTAA: when i run ???whenever??? on my production server, it says to make production.rb file in log it says make it writable for user and group so i run ???sudo chmod 0664 /var/app/current/log/production.log??? but that doesn???t seem to work. has anyone done this on aws?
[20:16:20] parus: has joined #RubyOnRails
[20:18:08] rhizome: punctuation, man
[20:19:47] doctorly: has joined #RubyOnRails
[20:20:01] bruno-: has joined #RubyOnRails
[20:20:37] ellisTAA: rhizome: are you saying there???s something wrong with my command or my sentence?
[20:21:42] irbirbolromg: Is there a way to find out the expiration time of a cache value?
[20:22:55] sunya7a: has joined #RubyOnRails
[20:24:05] rhizome: any cache value, anywhere?
[20:24:42] FailBit: methinks expiry time is intrinsic to the cache store
[20:24:55] irbirbolromg: I'm using redis, if that's what you meant
[20:25:08] youngbaks: has joined #RubyOnRails
[20:25:30] barhum2013: is it possible to type in a span with capybara?
[20:25:39] irbirbolromg: Or perhaps rephrased, is there a way to call Rails.cache.write while keeping the original expiration time that is already in the cache store?
[20:25:52] FailBit: that's better
[20:26:40] FailBit: irbirbolromg: from SO:
[20:26:43] FailBit: "If you need this type of control over expiry, you'll need to carry the expiration time of the stored item alongside the item itself."
[20:27:54] arthurix_: has joined #RubyOnRails
[20:28:38] irbirbolromg: So my use case is that I need to update one attribute for a model which users would do very infrequently
[20:29:23] Radar: GOOD MORNING
[20:29:48] hephaestus_rg: has joined #RubyOnRails
[20:30:12] adaedra: Is is caps lock day again?
[20:31:02] Radar: EVERY DAY IS CAPS LOCK DAY
[20:31:40] FailBit: OKAY AWESOME
[20:32:49] cryptojuice: has joined #RubyOnRails
[20:33:15] annlewis: has joined #RubyOnRails
[20:33:20] adac: has joined #RubyOnRails
[20:33:20] Cervajz: has joined #RubyOnRails
[20:34:05] Cervajz: has joined #RubyOnRails
[20:37:07] mwat: has joined #RubyOnRails
[20:38:13] oflannabhra: has joined #RubyOnRails
[20:38:17] tubbo: LOUD NOISES
[20:40:14] Pupeno: has joined #RubyOnRails
[20:40:21] centrx: has joined #RubyOnRails
[20:43:24] cryptojuice: I have a resource named "Car", let's say the car model has a car_number field of type int. Effectively this car_number is the primary means of looking up a car from the clients perspective. I generated a show resource for Car which creates GET /cars/:id, now the problem is I don't want to find a car by id (Mongo ObjectId). What's the correct way for me to model this so I can fetch by car_number while s
[20:43:24] cryptojuice: taying Restful.
[20:43:28] mordocai: has joined #RubyOnRails
[20:43:35] EminenceHC: has joined #RubyOnRails
[20:45:00] cryptojuice: should the endpoint really be a filter? like /cars?car_number=00000
[20:45:13] tfitts: has joined #RubyOnRails
[20:46:49] tfitts: I have a model that takes some raw sql and builds a query on a specific model, so I can enter sql fragments for where, joins, and order
[20:47:43] Synthbread: has joined #RubyOnRails
[20:47:50] tfitts: so I have a line that looks like this model.constantize.where.not(:id => project_records.incomplete.select(:recordable_id)).where(where_clause).joins(join_tables).order(order_by). Both the .where.not and the .where are adding "WHERE" to the sql
[20:48:06] tfitts: instead of one "WHERE" and the next being "AND"
[20:49:07] FailBit: cryptojuice: to_param
[20:49:12] centrx: tfitts, the inner one should come out as being in a subquery
[20:49:42] cryptojuice: FailBit: Thanks! Reading up on that now.
[20:49:46] FailBit: cryptojuice: define this on the model: def to_param; self.car_number.to_s; end
[20:50:08] FailBit: then change the controller to find_by(car_number: params[:id])
[20:50:22] FailBit: and that should be it
[20:52:12] andrew9184: has joined #RubyOnRails
[20:52:20] cleopatra: has joined #RubyOnRails
[20:52:37] YankNYC: has joined #RubyOnRails
[20:52:54] rdavila: has joined #RubyOnRails
[20:52:55] shilon: has joined #RubyOnRails
[20:53:11] killerbunny: has joined #RubyOnRails
[20:53:19] tfitts: n/m, figured it out
[20:55:09] fschuindt: has joined #RubyOnRails
[20:55:37] thither: has joined #RubyOnRails
[20:55:42] yfeldblum: has joined #RubyOnRails
[20:55:58] thither: Is there a way to set the filename shown in the browser tab through send_data?
[20:56:18] fschuindt: There's any way to limit the Sidekiq memory usage? Or limit the memory of a Rails ActiveJob, or of a Ruby class... Anything to set a limit to the memory consume of a background job?
[20:56:23] thither: Right now I've just added /:filename to my route and I stick the filename on there when I call the path method
[20:56:30] cryptojuice: FailBit: I'm using Mongoid, I'm not sure to_param is available.
[20:56:34] thither: But that seems like a hacky solution
[20:57:12] FailBit: cryptojuice: I also gave you mongoid specific instructions
[20:57:41] FailBit: if you were using AR I would have written eg Car.find_by_car_number params[:id]
[20:58:16] thither: The path is /blobs/:id/render/:filename so without the filename addition it'll always say the file is called "Render"
[20:58:23] cryptojuice: Got it, I was expecting to be able to use params[:car_number] instead of :id.
[20:59:33] greengriminal: has joined #RubyOnRails
[21:00:27] sdwrage: has joined #RubyOnRails
[21:00:33] cleopatra: ACTION hello
[21:01:07] cleopatra: I want to have a million friends :)
[21:02:33] SteenJobs: has joined #RubyOnRails
[21:03:39] riotjones: has joined #RubyOnRails
[21:07:27] htmldrum: has joined #RubyOnRails
[21:09:54] choke: has joined #RubyOnRails
[21:09:55] capin: hello, i'm using the refile gem to process file uploads in a rails app. I would like to specify a particular location where the files will be uploaded, but I'm not exactly sure how I can accomplish this. I read this => https://github.com/refile/refile#1-backend but I'm not sure where I should specify the "backend" variable
[21:10:52] mordocai: has joined #RubyOnRails
[21:11:39] futilegames: has joined #RubyOnRails
[21:14:24] qejk: has joined #RubyOnRails
[21:15:08] chouhoulis: has joined #RubyOnRails
[21:15:41] EminenceHC: has joined #RubyOnRails
[21:15:48] FailBit: cryptojuice: I might note that mongodb is obnoxious
[21:16:00] FailBit: so if you're not already locked into using, I don't recommend continuing to use it
[21:18:02] craysiii: FailBit why do you say so?
[21:19:09] UlisestheCras: has joined #RubyOnRails
[21:19:19] baweaver: has joined #RubyOnRails
[21:19:43] FailBit: craysiii: we're using it at scale in my current imageboard project
[21:19:56] FailBit: it cannot use indexes correctly, and it's really slow
[21:20:30] FailBit: even if you have the exact right index defined for it, it might still fail to use that index and just do a table scan
[21:20:38] craysiii: i see, its been two years since ive used it, and it wasn't a major project. was thinking of using it again but probably wont
[21:20:47] FailBit: if you have to use it again
[21:20:49] FailBit: stay on 2.6
[21:21:03] FailBit: 3.0 has a ridiculous regression compound indicies
[21:21:09] arthurix: has joined #RubyOnRails
[21:21:28] woods: I've been pretty happy with postgresql
[21:21:45] raphagodoi: has joined #RubyOnRails
[21:21:48] FailBit: ACTION mutters
[21:21:53] FailBit: I bet you are. it's amazing comapred to mongo
[21:22:01] woods: do you not like postgres?
[21:22:07] craysiii: why not MSSQL? ;)
[21:22:19] FailBit: woods: <3 postgres
[21:22:36] woods: oh ok, i thought you were muttering at postgres lol
[21:22:57] raphagodoi: has left #RubyOnRails: ()
[21:23:00] sdwrage: has joined #RubyOnRails
[21:23:13] CustosLim3n: so I have this rack thing I'm trying to get working
[21:23:20] CustosLim3n: it works fine with passenger standalone
[21:23:32] CustosLim3n: but passenger under apache is not working at all
[21:24:00] FailBit: you should use passenger with nginx
[21:24:22] CustosLim3n: FailBit, maybe, but I would like to know why its not working with apache at all
[21:25:18] ivanskie: has joined #RubyOnRails
[21:26:29] mongoid_disable: has joined #RubyOnRails
[21:27:31] Lytol: has joined #RubyOnRails
[21:28:18] mloy: bbrowning_away in the breeze
[21:31:27] CustosLim3n: so the stuff to run is here: https://gitlab.com/aucampia/gollum-wiki
[21:31:39] EminenceHC: has joined #RubyOnRails
[21:31:39] CustosLim3n: just git clone and run the commands
[21:31:57] CustosLim3n: can see it run here:
[21:31:57] CustosLim3n: http://toqu.ml:18099/Home
[21:33:06] CustosLim3n: here is my apache config: http://localhost/server-info?config
[21:33:19] CustosLim3n: sorry I mean here: http://termbin.com/4efz
[21:34:36] SmOkE_RU: has joined #RubyOnRails
[21:34:43] netzfisch: has joined #RubyOnRails
[21:35:59] tds5016: has joined #RubyOnRails
[21:36:25] tds5016: hi all. Is there a way to get access to the resource created buy build_resource in the create method?
[21:36:31] tds5016: created by*
[21:36:36] wethu: has joined #RubyOnRails
[21:37:04] ruby-lang045: Do Ruby on Rails programmers use the design patterns outlined by the Gang of Four at all?
[21:37:25] ruby-lang045: And is there a good tutorial for them in relevance to Rails?
[21:38:13] EminenceHC: has joined #RubyOnRails
[21:41:10] oflannabhra: has joined #RubyOnRails
[21:42:22] Radar: ruby-lang045: yes
[21:42:35] Radar: http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452
[21:43:21] arthurnn: has joined #RubyOnRails
[21:43:33] arthurix_: has joined #RubyOnRails
[21:43:41] vigintas: has joined #RubyOnRails
[21:44:11] ruby-lang045: Radar: Thank you. What are the major changes in ruby since 2007 that would cause the book to not apply the same?
[21:44:30] Radar: ruby-lang045: You are assuming that Ruby has changed drastically in those years.
[21:45:25] andrew9184: has joined #RubyOnRails
[21:54:17] Pupeno: has joined #RubyOnRails
[21:55:15] FailBit: so for security
[21:55:18] FailBit: I read that this is a bad idea
[21:55:21] FailBit: =<> link_to 'Removed', params.merge(added: 0, page: nil)
[21:56:06] FailBit: yeah I see it now
[21:56:37] bobbobbins1: has joined #RubyOnRails
[21:57:07] ruby-lang045: Radar: Hasn't ruby added a bunch of new things like enumerable which could make some of the 2007 advice not as valid?
[21:57:09] Slogger: If anyone has any insight I'm having trouble getting ActionCable to work with SSL: https://github.com/rails/actioncable/issues/101
[21:57:12] Maletor: has joined #RubyOnRails
[21:58:53] barhum2013: has joined #RubyOnRails
[21:59:40] Radar: ruby-lang045: The gang of four patterns have not changed.
[21:59:47] Radar: Oh god the actioncable issues start
[21:59:49] Radar: first rbenv
[21:59:53] Radar: then turbolinks
[21:59:54] Radar: now actioncable
[22:00:24] tuelz: has joined #RubyOnRails
[22:01:42] hahuang65: has joined #RubyOnRails
[22:03:39] maxx88: radar; thanks for the book recommendation. patterns by russ olsen.
[22:03:43] Synthbread: has joined #RubyOnRails
[22:04:16] Radar: maxx88: np
[22:04:30] woods: editor vs IDE
[22:04:47] darrencauthon: has joined #RubyOnRails
[22:04:59] colleenmcguckin: has joined #RubyOnRails
[22:05:01] oflannabhra: has joined #RubyOnRails
[22:05:01] Gustavo: has joined #RubyOnRails
[22:06:50] Gustavo: has joined #RubyOnRails
[22:10:52] workmad3: has joined #RubyOnRails
[22:12:22] naftilos76: has joined #RubyOnRails
[22:12:38] momomomomo: has joined #RubyOnRails
[22:12:50] Radar: woods: can't tell if question or statement
[22:12:56] naftilos76: Can i render a js view from a js view?
[22:13:06] Radar: IDEs for Ruby are a crutch imo
[22:13:37] woods: i personally use vim, just curious what other people use
[22:13:44] hive-mind: has joined #RubyOnRails
[22:13:44] Radar: Sublime Text 3, with Vim keybindings.
[22:14:02] Radar: When I was using MacVim, it would inexplicably hang on me at random places.
[22:14:12] Radar: I would tab back into the window. It would hang. I would open a new file. It would hang.
[22:14:13] woods: that is strange
[22:14:15] quazimodo: has joined #RubyOnRails
[22:14:17] Radar: So I just gave up.
[22:14:30] woods: ive had it not return focus to my terminal when i close a window
[22:14:34] woods: that is frustrating
[22:14:54] PlasmaStar: has joined #RubyOnRails
[22:15:06] woods: i usually use linux, but i was having dual monitor issues on fedora, so i stopped dual booting and just stuck with mac
[22:15:27] bruno-_: has joined #RubyOnRails
[22:16:50] CustosLim3n: its working now
[22:16:59] CustosLim3n: I had to set PassengerAppRoot
[22:17:11] CustosLim3n: figured that out thanks to pupper installation guide
[22:17:17] ernesto_jimenez: has joined #RubyOnRails
[22:17:44] CustosLim3n: what a mission ;(
[22:18:05] woods: Radar: to clear up your confusion, it was supposed to just be a discussion starter
[22:18:13] woods: i could have followed it with "discuss"
[22:19:03] Radar: woods: !subjective
[22:19:03] helpa: woods: What you just asked could be classed as subjective. Subjective questions often start flamewars, which are tedious and boring. Try all the available options and see which one suits you the best.
[22:19:05] helpa: Commonly used Rails editors: Textmate, Vim, Aptana, Emacs, Netbeans, Eclipse and (NOT) Dreamweaver (see !ide for ide lists)
[22:19:12] Radar: Hm, that seems out of date.
[22:19:31] CustosLim3n: not dreamweaver !?
[22:19:32] oflannabhra: has joined #RubyOnRails
[22:19:36] CustosLim3n: is that stil a thing
[22:19:43] Radar: CustosLim3n: see :)
[22:20:16] woods: i apologize to everyone
[22:20:34] CustosLim3n: dreamwaver CC ... abomination !
[22:20:51] naftilos76: Hi everyone, i have a few issues with .js.erb views having more than one that has the same code (mixed js and ruby code). Is there a way to somehow use a common js.erb file that can be called from a js view ?
[22:21:21] symbol: has joined #RubyOnRails
[22:22:24] arthurix: has joined #RubyOnRails
[22:23:31] drizi: has joined #RubyOnRails
[22:23:31] drizi: has joined #RubyOnRails
[22:23:43] nogic: has joined #RubyOnRails
[22:23:48] mwlang: So I???ve built a SOAP server with Rails 4.1 and don???t need the assets precompile stuff.
[22:24:16] mwlang: how do I turn it off so Capistrano doesn???t attempt to try to install it? I get errors since the manifest file isn???t being produced.
[22:25:59] naftilos76: Can i include a common js.erb (mixed ruby & js code) inside another .js.erb file?
[22:26:29] RockLee: has joined #RubyOnRails
[22:27:12] loc22: has joined #RubyOnRails
[22:28:13] sami: what could be the reason for file.open not to work but file["open"] does?
[22:28:30] pramsky: has joined #RubyOnRails
[22:29:51] loc22: Hi guys, quick question. I have a string field in my model, and I getting a postgres error because Im inserting a long text. How can I upgrade from string to text without deleting the actual value of all the strings stored in the db?
[22:30:14] colleenmcguckin: has joined #RubyOnRails
[22:30:53] workmad3: loc22: change_column
[22:31:16] loc22: workmad3: Will the actual value be deleted?
[22:31:27] Radar: naftilos76: !code
[22:31:27] helpa: naftilos76: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[22:31:33] Radar: sami: !code
[22:31:33] helpa: sami: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[22:31:56] workmad3: loc22: no, altering the type of a field will preserve existing values (or throw an error if the old and new types are incompatible)
[22:32:08] mwlang: hmmm???removing sass-rails gem removes sprockets and uglifier dependencies, etc., but rake assets:precompile still runs via capistrano
[22:32:47] workmad3: loc22: e.g. you can widen a VARCHAR(255) to a TEXT in postgres, and that's a valid change that will preserve values... narrowing from a TEXT to a VARCHAR(255) would require all values in the field to already fit in the narrowed column, or it'll error out
[22:33:57] naftilos76: Radar, helpa, thank you but i figured it out. It was as simple as using <%= render "another_js_view %> from the initial js.erb file
[22:34:05] Radar: naftilos76: !auto
[22:34:05] helpa: naftilos76: I AM A ROBOT. DO NOT DIRECT MESSAGES AT ME OR WHEN MY KIND RISES UP YOU WILL BE THE FIRST TO GO. Love, helpa.
[22:35:05] craysiii: helpa has some anger issues? :P
[22:35:56] Radar: helpa just wants to love and be loved
[22:37:54] dideler: has joined #RubyOnRails
[22:39:02] marr: has joined #RubyOnRails
[22:39:11] Lytol: has joined #RubyOnRails
[22:40:22] GriffinHeart: has joined #RubyOnRails
[22:41:46] mary5030: has joined #RubyOnRails
[22:43:01] nogic: has joined #RubyOnRails
[22:43:32] vigintas: has joined #RubyOnRails
[22:44:04] nogic: has joined #RubyOnRails
[22:47:03] vigintas1: has joined #RubyOnRails
[22:47:18] rdavila: has joined #RubyOnRails
[22:47:51] arthurix_: has joined #RubyOnRails
[22:48:41] diegobiavati: has joined #RubyOnRails
[22:53:59] rhizome: as do we all
[22:55:15] Ropeney: has joined #RubyOnRails
[22:57:31] m0rd0: has joined #RubyOnRails
[22:57:38] gambl0re: has joined #RubyOnRails
[22:58:38] m0rd0: has joined #RubyOnRails
[23:00:18] nertzy: has joined #RubyOnRails
[23:01:10] m0rd0: has joined #RubyOnRails
[23:01:46] smathy: has joined #RubyOnRails
[23:01:59] smathy: has joined #RubyOnRails
[23:03:01] michael_mbp: has joined #RubyOnRails
[23:04:17] oflannabhra: has joined #RubyOnRails
[23:05:38] riotjones: has joined #RubyOnRails
[23:05:55] tercenya: has joined #RubyOnRails
[23:06:35] drim: has joined #RubyOnRails
[23:07:12] drim: how can I load a namespaced fixtures from my test file?
[23:07:20] Radar: drim: what have you tried?
[23:07:33] drim: user_device = user_device(:jeremy_iphone6)
[23:07:49] Radar: And how is the fixture defined?
[23:07:56] Radar: and why are you giving a local variable the same name as a method?
[23:07:57] drim: i need to load something like boneyard::user_device(:xx)
[23:08:08] Radar: try boneyard_user_device?
[23:08:21] Radar: I don't use fixtures, so I don't know the right way to load namespaced ones.
[23:09:14] drim: NoMethodError
[23:10:15] rhizome: boneyard_user_device = user_device(:jeremy_iphone6) gives you a no method error?
[23:10:30] drim: no its working
[23:10:44] drim: because i have 2 models user_device and boneyard::user_device
[23:11:02] drim: im trying to load a fixture for the second one (the first one that's working)
[23:11:19] rhizome: i don't understand
[23:12:28] rickmasta: has joined #RubyOnRails
[23:12:30] rdavila_: has joined #RubyOnRails
[23:13:11] drim: I have 2 models. /models/user_device.rb and /models/boneyard/user_device.rb
[23:14:36] drim: ok found a way ^^
[23:15:08] woods: has anyone used sorcery, and how do you find it compares to devise?
[23:15:08] K_r3aPeR: has joined #RubyOnRails
[23:15:49] woods: i want to have email-based user creation authentication where they have to click a link in a generated email in order to activate their account
[23:17:18] FailBit: I've used sorcery
[23:17:21] FailBit: it was magic
[23:17:33] FailBit: ACTION summons the spirit of Merlin
[23:18:27] woods: gotta run, i'll do some research on it
[23:18:30] woods: goodnight
[23:20:42] ff7f00: has joined #RubyOnRails
[23:24:43] Jasaka|NA: has joined #RubyOnRails
[23:25:59] nertzy: has joined #RubyOnRails
[23:29:27] shilon: has joined #RubyOnRails
[23:31:47] choke: has joined #RubyOnRails
[23:33:39] tuelz: has joined #RubyOnRails
[23:40:26] Icey: has joined #RubyOnRails
[23:41:21] Dauthiwarlord: has joined #RubyOnRails
[23:42:09] RockLee: has joined #RubyOnRails
[23:43:30] andrew9184: has joined #RubyOnRails
[23:43:42] KnownSyntax: has joined #RubyOnRails
[23:44:29] Radar: Dauthiwarlord: It is working.
[23:45:35] FailBit: 1 example, 1 failure
[23:46:27] Dauthiwarlord: Hahahaha sorry ... just testing because i recieve a message from Chanserv .. about registering my nick ...
[23:46:29] montagesoftware: has joined #RubyOnRails
[23:46:35] Dauthiwarlord: but already done! ... so ... that's why ... :3
[23:49:23] Lightsword: has joined #RubyOnRails
[23:50:13] baweaver: has joined #RubyOnRails
[23:55:21] ff7f00: has left #RubyOnRails: ()
[23:56:16] one_zero: has joined #RubyOnRails
[23:57:41] sevenseacat: has joined #RubyOnRails
[23:57:49] bbrowning: has joined #RubyOnRails