« Back to channel list

#RubyOnRails - 15 December 2015

« Back 1 day Forward 1 day »
[00:00:32] ja: hopefully I can make it serialize it automatically without me having to manually write the `.to_i` and `Time.at` all over my existing code, hmm???
[00:00:52] jgt3: has joined #RubyOnRails
[00:01:38] ja: ??? I guess I???ll have to use GlobalID for that? which sees quite hacky to encode a DateTime in a GlobalID???
[00:02:15] tfitts: what's your use case that you're passing times into a job?
[00:03:13] ja: I???m synchronizing data in some select models to a third-party database (which is actually a web service)
[00:03:38] ja: so whenever I create, update or delete a record, I want to have HTTP calls happen async
[00:04:08] renegadeandy: has joined #RubyOnRails
[00:04:25] tfitts: so what is the date for? can't you just pass the id of the record to the job and have it sync?
[00:04:49] rubyonrailed: has joined #RubyOnRails
[00:04:51] ja: I have lots of fields/attributes which contain dates
[00:05:21] tfitts: so are you passing all of the attributes from the model?
[00:05:32] ja: yes, exactly
[00:05:52] ja: at least on create
[00:06:05] ja: like `after_create { Dynaccount::Resource::Create.perform_later self.class.name, attributes, id }`
[00:06:07] tfitts: are they going to be far delayed? would it not work to just pass the id of the model and then have your job load the model and send the data?
[00:06:24] Ropeney: has joined #RubyOnRails
[00:06:44] ja: hmm, I guess that could work?????I forgot why I scrapped that idea??? if I ever had a reason ^_^ thanks, tfitts!
[00:07:02] tfitts: no problem.
[00:07:41] maesitos: has joined #RubyOnRails
[00:08:06] ja: uh, yeah, wth was I thinking??? haha
[00:08:54] Jasaka: has joined #RubyOnRails
[00:10:33] nyaa: has joined #RubyOnRails
[00:11:11] sarink: has joined #RubyOnRails
[00:13:33] Jasaka|NA: has joined #RubyOnRails
[00:16:32] maxz: has joined #RubyOnRails
[00:17:51] qejk: has joined #RubyOnRails
[00:18:56] ascarter: has joined #RubyOnRails
[00:20:51] tfitts: ja: not sure, that's why I was wondering what you were trying to pass a date in for anyway.
[00:21:17] melonstorm: has joined #RubyOnRails
[00:24:11] hardtail: has joined #RubyOnRails
[00:24:41] shanemcd: has joined #RubyOnRails
[00:24:52] DavidDudson: has joined #RubyOnRails
[00:25:52] soahccc: I try to get started with capybara and I wonder if I can define default_url_options for the url helpers. Does anyone know if that is possible?
[00:26:13] kmckelvin: has joined #RubyOnRails
[00:27:08] rhizome: soahccc: what problem are you trying to solve?
[00:28:13] soahccc: rhizome: we decide the tenant based of the hostname+port and it appears to be a random port. I can pass a parameter to force a specific tenant but this was I have to do `visit root_url(__devt: "test")` all the time
[00:29:43] rhizome: it looks like maybe Capybara.server_port is what you want to set
[00:29:53] _Tariq: has joined #RubyOnRails
[00:30:30] rhizome: not a fan of the technique in general though :P
[00:30:43] Hazim: has joined #RubyOnRails
[00:31:00] soahccc: rhizome: changing the port or deciding stuff based on that? :)
[00:31:19] rhizome: well, the latter
[00:31:23] rhizome: "needing to"
[00:32:10] ElFerna: has joined #RubyOnRails
[00:32:34] shibabu: has joined #RubyOnRails
[00:33:14] soahccc: rhizome: well what else? We need a tenant and we don't want N instances of the app
[00:34:07] ornerymoose: has joined #RubyOnRails
[00:36:44] rhizome: a root path that takes :tenant_complex_name or something as a parameter, or subdomains
[00:37:04] pwnd_nsfw: has joined #RubyOnRails
[00:37:04] rhizome: i assumed you meant that each complex has a different port and not every tenant
[00:39:35] soahccc: rhizome: well in production it's subdomain but for development we have multiple ports on localhost. But this works and I guess it's fine.
[00:42:49] sarink: has joined #RubyOnRails
[00:46:32] threeminutemonta: has joined #RubyOnRails
[00:47:01] shock_one: has joined #RubyOnRails
[00:47:06] rhizome: there are ways of using subdomains in dev/test, but sure
[00:47:45] DLSteve: has joined #RubyOnRails
[00:48:03] AnoHito: has joined #RubyOnRails
[00:48:36] smathy: ACTION has many MANY mappings in /etc/hosts :)
[00:52:42] pawnbox: has joined #RubyOnRails
[00:53:27] ChrisVollink: has joined #RubyOnRails
[00:53:31] neanderslob: has joined #RubyOnRails
[00:54:17] jstransky: has joined #RubyOnRails
[00:54:25] ur5us: has joined #RubyOnRails
[00:54:26] ElFerna: has joined #RubyOnRails
[00:55:53] sevenseacat: has joined #RubyOnRails
[00:56:52] ElFerna: has joined #RubyOnRails
[00:58:06] ChrisVollink: anyone available to help a Rails newb such as myself?
[00:58:07] doodlehaus: has joined #RubyOnRails
[00:58:24] smathy: ChrisVollink, just ask.
[00:59:02] markh: do we have a bot in here
[00:59:05] markh: ACTION shrugs
[00:59:15] baweaver: it only responds to certain people
[00:59:40] markh: corporate america strikes again
[00:59:41] jstransky: has joined #RubyOnRails
[00:59:55] nyaa: has joined #RubyOnRails
[01:00:17] ChrisVollink: right. Well, I've been learning Rails, clearly, and my project is a super simple blog. I'm working on a post creation form so I no longer need to manually enter posts into the rails console. However, I wanted to block it off if no one is signed in (clearly).
[01:00:25] ChrisVollink: https://gist.github.com/KarmaLaBelle/7ad118d25ac6765b1685
[01:00:30] ChrisVollink: https://gist.github.com/KarmaLaBelle/f9dbdec93c7da0708725
[01:00:36] maesitos: has joined #RubyOnRails
[01:00:36] FailBit: ChrisVollink
[01:00:41] FailBit: don't roll your own authentication system
[01:00:43] FailBit: use devise :D
[01:01:08] ChrisVollink: im guessing this some magic cure-all gem for auth?
[01:01:13] FailBit: absolutely
[01:01:23] FailBit: it does everything right so that you don't have to
[01:01:47] FailBit: anyway with devise you can iirc use the require_user filter
[01:01:50] Hazim: has joined #RubyOnRails
[01:01:53] FailBit: let me see what it's called
[01:02:03] ChrisVollink: i see. I had no idea of its existence. I appreciate the guidance
[01:02:32] maesitos: has joined #RubyOnRails
[01:02:50] markh: ChrisVollink: alternatively, michael hartl's railstutorial.org does a good job of explaining and walking through a login system from scratch
[01:02:57] markh: if you'd prefer to learn
[01:02:58] markh: https://www.railstutorial.org/book/log_in_log_out
[01:03:35] FailBit: if you are new to programming, maybe that would help to get some more basic skills stretched out
[01:03:48] ChrisVollink: actually, funny you mention that. That's the book where the majority of my learning has taken place. Unfortunately, I moved away from the book quite a bit as I changed project direction. Perhaps a bad decision.
[01:03:55] FailBit: but you should really use devise in production apps
[01:04:28] ChrisVollink: alright. I'll take a look at the docs for devise, and figure it out. :)
[01:04:57] maesitos_: has joined #RubyOnRails
[01:06:53] markh: well, +1 for railstutorial
[01:07:08] helpa: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[01:07:19] baweaver: obligatory plug
[01:07:21] ChrisVollink: of course. in fact, my blog has a Thanks To link in the footer of every page linking to RailsTutorial. Great resource
[01:07:41] sevenseacat: I recommend R4IA :) but I'm a wee bit biased
[01:07:45] baweaver: ( sevenseacat - have I met my quota this month yet? )
[01:07:46] rubyonrailed: has joined #RubyOnRails
[01:07:56] sevenseacat: ( baweaver - no, keep plugging )
[01:08:10] baweaver: aye aye capitain
[01:08:13] ChrisVollink: im assuming you wrote it, @sevenseacat
[01:08:21] markh: one of the four, yes
[01:08:23] superlou: has joined #RubyOnRails
[01:08:24] sevenseacat: ChrisVollink: I did, I am one of the four authors :)
[01:08:31] markh: Radar is here too
[01:08:32] sevenseacat: Radar is another
[01:08:40] sevenseacat: (ding ding ding for Radar)
[01:08:42] markh: how's that for a ping
[01:08:45] baweaver: well that's one way to summon him
[01:09:10] markh: is yehuda in here?
[01:09:17] ChrisVollink: you guys are a bunch of geniuses. I'm just a student, but I love developers who take the time to teach others through writing, lectures, etc.
[01:09:36] baweaver: probably not
[01:09:58] markh: he's been in #emberjs in the past
[01:10:04] baweaver: we're just better at the Google than most, really.
[01:10:06] markh: oh, he's there now.
[01:10:20] markh: ACTION shrugs
[01:10:38] ChrisVollink: yet another thing i need to learn. MVC JS frameworks. :|
[01:11:03] markh: they can be fun
[01:11:08] sevenseacat: we're not geniuses, but we work hard :)
[01:11:37] jbrhbr: has joined #RubyOnRails
[01:14:24] markh: why not both? ??\_(???)_/??
[01:14:28] sevenseacat: yehuda is now at emberjs, and steve klabnik is now at rust, that leaves the two of us :)
[01:14:57] bigbob: has joined #RubyOnRails
[01:15:43] maesitos_: has joined #RubyOnRails
[01:15:47] baweaver: I'd focus on Rails first
[01:15:52] baweaver: leave the JS frameworks out for a bit
[01:15:55] Radar: seHi what
[01:15:56] baweaver: otherwise overload
[01:16:07] Radar: I'm taking today off work
[01:16:22] baweaver: oi, go enjoy yourself
[01:16:35] mchu: has joined #RubyOnRails
[01:16:55] ChrisVollink: ya, Rails is my main focus right now. MVC is generally a new concept to me, coming from a background of "Hello, World"ing my way through many languages, and super basic console development
[01:17:10] rdavila: has joined #RubyOnRails
[01:17:11] baweaver: Focus on Rails first for sure then
[01:17:16] baweaver: get a few basic apps out
[01:17:27] rakm: has joined #RubyOnRails
[01:17:28] baweaver: then consider how you could apply a JS MVC framework to it
[01:17:37] maesitos_: has joined #RubyOnRails
[01:17:48] baweaver: just make sure to put a responds_to json fork in your controller actions and you'll be fine.
[01:18:20] ChrisVollink: is this useful for a basic web app, not an API?
[01:18:31] orikremer: has joined #RubyOnRails
[01:18:54] baweaver: There's a difference?
[01:19:04] smathy: I think he meant when you start doing the JS MVC framework stuff.
[01:19:19] baweaver: yeah, that fork makes it substantially easier.
[01:19:21] sevenseacat: Radar: lucky sod
[01:19:33] baweaver: considering everything in that realm wants JSON responses.
[01:19:33] rakm_: has joined #RubyOnRails
[01:19:43] ChrisVollink: ah. because i don't forsee myself setting up my blog to accept JSON requests
[01:19:49] baweaver: Suggested reading (and shameless self plugs): http://baweaver.com/blog/2014/10/02/the-frivolous-frontend-framework/
[01:19:57] baweaver: http://baweaver.com/blog/2014/10/04/revelling-in-rest/
[01:20:30] sevenseacat: Radar: getting over the railscamp lurgy the easy way?
[01:20:57] baweaver: of course nowadays I would suggest strongly to evaluate whether or not you _really_ need one, because basic crud apps have little reason to bother other than "shiny new js"
[01:20:57] ChrisVollink: rails destroy model Users
[01:21:09] sevenseacat: *destroy all users*
[01:21:14] smathy: ACTION still hasn't had any need for a JS framework
[01:21:27] markh: i've found that people try to force JS frameworks where they don't need to be
[01:21:36] maesitos: has joined #RubyOnRails
[01:21:47] markh: your blog doesn't need react
[01:21:48] rhizome: resume-driven development
[01:21:48] baweaver: I do only because we have a huge API backend that needs to interface with Jenkins and other tools
[01:21:49] smathy: s/JS frameworks/shiny new trendy tech/
[01:22:13] ChrisVollink: i have a buddy trying to turn a static site into a Wordpress site. I think there's just a lot of overkill in a lot of sites, period.
[01:22:16] markh: if you need a js framework, then by all means :) they do cool stuff
[01:22:19] baweaver: and a ton of async that would make jQuery a pain on the frontend for notification systems among other things.
[01:23:01] ChrisVollink: by that, I mean his client has a static site, and no need for a CMS, and he wants to make it into a Wordpress site
[01:23:03] baweaver: then again this is also a project that runs deployments across most of $WORK
[01:23:32] tfitts: I wish wordpress could just die
[01:23:42] baweaver: ChrisVollink: what year of school?
[01:23:50] baweaver: and what area?
[01:24:14] nyaa: has joined #RubyOnRails
[01:24:17] ChrisVollink: i've just finished my first semester. Dropped out at 16, and 5 years later, finally started college, so I'm a bit behind the curve. Though I've practiced in my free time a lot over the years
[01:24:17] tfitts: rails needs a blog equivalent that is easy to install on every server out there (which just isn't the case) and a way to translate wordpress templates.
[01:24:31] rhizome: rails isn't a cms
[01:24:33] hardtail: has joined #RubyOnRails
[01:24:42] smathy: Wow, I'm SOOOOO glad Wordpress is out there.
[01:24:58] sucks: has joined #RubyOnRails
[01:25:06] tfitts: smathy: you do PHP support or something?
[01:25:10] ChrisVollink: ah, Central Savannah River Area. AKA, the area in and around Augusta, GA
[01:25:21] baweaver: I tend to know about internships that pop up around the SF area, though they tend to want CS Sophomore or higher (Typically Junior).
[01:25:34] maesitos_: has joined #RubyOnRails
[01:25:37] bigbob: has joined #RubyOnRails
[01:25:47] baweaver: probably others around have looser requirements.
[01:26:08] baweaver: admittedly ours on the Rails side are a bit insane, but there's only one team here
[01:26:12] nickenchuggets: has joined #RubyOnRails
[01:26:12] nickenchuggets: has joined #RubyOnRails
[01:26:17] smathy: tfitts, nope.
[01:26:34] ChrisVollink: im just going for an Associate's for now, since it's all my school offers. Might transfer afterwards, though I'd like to find a job before I seek higher education. What with how expensive and can be, and all
[01:26:55] kmckelvin: has joined #RubyOnRails
[01:27:20] baweaver: If you're willing to live in a smaller studio around here you can bank a lot on a typical starting salary of ~$90-100k
[01:27:39] sevenseacat: I am so in the wrong part of the world
[01:27:44] baweaver: ....then again they also tend to cost upwards of $3000 a month
[01:27:46] sevenseacat: starting salary of 90-100k
[01:27:49] maesitos: has joined #RubyOnRails
[01:27:54] baweaver: rent kills it
[01:27:58] baweaver: SF is horrid about it.
[01:28:03] FailBit: 20:09:17 ChrisVollink | you guys are a bunch of geniuses. I'm just a student, but I love developers who take the time to teach others through writing, lectures, etc.
[01:28:08] FailBit: we get better by teaching others
[01:28:16] FailBit: it is through that we see our own faults
[01:28:28] baweaver: outlying areas have ~$1500 or less rent if you're lucky.
[01:28:57] ChrisVollink: I'll be looking world-wide for jobs after the degree. Though, South Florida is my preferred area, as I have family there. Including an Uncle who may need a programmer. :P
[01:28:58] Mirry: has joined #RubyOnRails
[01:29:08] markh: baweaver: pretty expensive down here in LA, too
[01:29:16] sevenseacat: thats how I learnt most of what I know about Rails, just seeing people here with problems and either finding solutions or finding how other people come up with them
[01:29:25] tfitts: baweaver: how hard to move from 90-100k to > 200k?
[01:29:39] baweaver: won't happen 99% of the time
[01:29:46] baweaver: you have to be Staff at Google
[01:29:53] ChrisVollink: so many californians when it comes to programming. lol
[01:29:55] baweaver: most of it is stock or equity past 170
[01:30:08] K_r3aPeR: has joined #RubyOnRails
[01:30:10] markh: move from dev to upper management
[01:30:30] FailBit: I know someone in SF who got contacted by google out of the blue and turned it down
[01:30:34] maesitos: has joined #RubyOnRails
[01:30:37] baweaver: we're still looking for a Senior unicorn over here (shameless plug #2)
[01:30:55] baweaver: FailBit: now you know two.
[01:31:13] FailBit: a senior unicorn eh
[01:31:25] tfitts: I'd turn down google too, but they've never offered me :P
[01:31:27] baweaver: They want someone Senior but are being picky.
[01:31:27] viiralvx: has joined #RubyOnRails
[01:31:31] ChrisVollink: how can i drop a db table with rake?
[01:31:36] smathy: Plenty of people get contacted by google.
[01:31:39] FailBit: I sexually identify as an attack helicopter but I can manage a unicorn if I try
[01:32:04] smathy: ChrisVollink, make a migration then rake db:migrate
[01:32:06] sevenseacat: ChrisVollink: write a migration with a drop_table methon in it
[01:32:13] ChrisVollink: right. thanks
[01:32:19] baweaver: well if anyone is keen on details shoot me a message, SF relocation required though.
[01:32:33] maesitos: has joined #RubyOnRails
[01:32:44] sevenseacat: remote or gtfo
[01:32:57] K_r3aPeR: has joined #RubyOnRails
[01:33:19] Radar: baweaver: shame that senior unicorn jobbo is in SF
[01:33:21] baweaver: more upfront though: Sony Network Entertainment, PS4 Division. BaDASS (Build and Deployment Automation Support System) team
[01:33:34] rhizome: oh who came up with that
[01:34:08] baweaver: not me, but I still like being able to say I'm officially a badass developer :P
[01:34:18] Radar: "I have made you this chocolate mud cake with three different kinds of chocolate: white chocolate, normal chocolate, AND POOP" <- any job requiring SF relocation
[01:34:30] FailBit: >white chocolate
[01:34:32] baweaver: Radar: If I had remote I would :(
[01:34:32] FailBit: that's digusting
[01:34:39] Radar: hahahahaa
[01:34:44] baweaver: but corporate culture is only so easy to shift.
[01:34:58] baweaver: you should have seen the fights over open source and meetups earlier.
[01:35:01] smathy: As is the valley culture.
[01:35:59] shibabu: has joined #RubyOnRails
[01:36:46] maesitos_: has joined #RubyOnRails
[01:38:22] hardtail: has joined #RubyOnRails
[01:38:23] maesitos: has joined #RubyOnRails
[01:41:00] Lincoln: has joined #RubyOnRails
[01:41:22] doodlehaus: has joined #RubyOnRails
[01:42:06] chadhs: has joined #RubyOnRails
[01:42:27] jessemcgilallen: has joined #RubyOnRails
[01:42:36] Lincoln: has left #RubyOnRails: ()
[01:44:34] maesitos: has joined #RubyOnRails
[01:45:44] jessemcgilallen: has joined #RubyOnRails
[01:46:19] maesitos_: has joined #RubyOnRails
[01:46:19] Hazim: has joined #RubyOnRails
[01:48:05] pawnbox: has joined #RubyOnRails
[01:48:16] maesitos_: has joined #RubyOnRails
[01:49:10] one_zero: has joined #RubyOnRails
[01:49:13] goodcodeguy: has joined #RubyOnRails
[01:49:55] bronson: has joined #RubyOnRails
[01:49:57] maesitos: has joined #RubyOnRails
[01:52:01] maesitos: has joined #RubyOnRails
[01:54:00] maesitos_: has joined #RubyOnRails
[01:55:56] maesitos_: has joined #RubyOnRails
[01:55:57] colleenmcguckin: has joined #RubyOnRails
[01:56:12] _Tariq: has joined #RubyOnRails
[01:57:32] maesitos: has joined #RubyOnRails
[01:59:37] maesitos_: has joined #RubyOnRails
[02:00:21] workmad3: has joined #RubyOnRails
[02:01:26] maesitos: has joined #RubyOnRails
[02:03:17] maesitos: has joined #RubyOnRails
[02:05:18] maesitos_: has joined #RubyOnRails
[02:05:35] jpcody: has joined #RubyOnRails
[02:07:07] maesitos: has joined #RubyOnRails
[02:08:24] hardtail: has joined #RubyOnRails
[02:08:54] joshsmith_: has joined #RubyOnRails
[02:08:58] maesitos: has joined #RubyOnRails
[02:10:17] K_r3aPeR: has joined #RubyOnRails
[02:10:19] zz_timnovinger: has joined #RubyOnRails
[02:10:56] maesitos: has joined #RubyOnRails
[02:11:26] Sigma00: has joined #RubyOnRails
[02:11:59] doodlehaus: has joined #RubyOnRails
[02:12:46] maesitos: has joined #RubyOnRails
[02:12:56] _Tariq: has joined #RubyOnRails
[02:12:58] rubyonrailed: has joined #RubyOnRails
[02:13:24] machuga: has joined #RubyOnRails
[02:14:42] dandaman: has joined #RubyOnRails
[02:14:43] maesitos: has joined #RubyOnRails
[02:15:13] smathy: has joined #RubyOnRails
[02:16:34] maesitos: has joined #RubyOnRails
[02:18:45] maesitos: has joined #RubyOnRails
[02:19:36] goodcodeguy: has joined #RubyOnRails
[02:20:07] chipotle: has joined #RubyOnRails
[02:20:24] maesitos: has joined #RubyOnRails
[02:22:24] maesitos_: has joined #RubyOnRails
[02:22:49] wuwu: has joined #RubyOnRails
[02:24:10] maesitos: has joined #RubyOnRails
[02:24:26] K_r3aPeR: has joined #RubyOnRails
[02:25:10] K_r3aPeR: has joined #RubyOnRails
[02:26:10] maesitos_: has joined #RubyOnRails
[02:27:41] kmckelvin: has joined #RubyOnRails
[02:27:59] maesitos: has joined #RubyOnRails
[02:29:50] maesitos: has joined #RubyOnRails
[02:30:03] B1n4r10: has joined #RubyOnRails
[02:31:14] sonofdirt: has joined #RubyOnRails
[02:31:52] maesitos: has joined #RubyOnRails
[02:33:15] doodlehaus: has joined #RubyOnRails
[02:33:40] maesitos: has joined #RubyOnRails
[02:33:49] K_r3aPeR: has joined #RubyOnRails
[02:34:29] BlackCoyote: has joined #RubyOnRails
[02:34:46] s2013: has joined #RubyOnRails
[02:34:56] ElFerna: has joined #RubyOnRails
[02:35:17] sarink: has joined #RubyOnRails
[02:35:27] s2013: anyone has experience with payola gem? whats your thoughts? would you recommend it over just using stripe's sdk
[02:35:37] maesitos_: has joined #RubyOnRails
[02:37:33] maesitos_: has joined #RubyOnRails
[02:39:20] maesitos: has joined #RubyOnRails
[02:40:00] ascarter: has joined #RubyOnRails
[02:41:11] maesitos: has joined #RubyOnRails
[02:43:12] maesitos_: has joined #RubyOnRails
[02:44:48] K_r3aPeR: has joined #RubyOnRails
[02:44:57] maesitos: has joined #RubyOnRails
[02:45:40] doodlehaus: has joined #RubyOnRails
[02:45:47] goodcodeguy: has joined #RubyOnRails
[02:46:05] nocd: has joined #RubyOnRails
[02:46:59] maesitos_: has joined #RubyOnRails
[02:48:07] draig: has joined #RubyOnRails
[02:48:45] maesitos_: has joined #RubyOnRails
[02:49:48] goodcodeguy: has joined #RubyOnRails
[02:50:44] maesitos: has joined #RubyOnRails
[02:50:49] celly: has joined #RubyOnRails
[02:51:38] K_r3aPeR: has joined #RubyOnRails
[02:52:36] maesitos: has joined #RubyOnRails
[02:52:44] maxz: has joined #RubyOnRails
[02:52:48] nyaa: has joined #RubyOnRails
[02:53:50] StevenXL: has joined #RubyOnRails
[02:53:50] StevenXL: has joined #RubyOnRails
[02:54:27] goodcodeguy: has joined #RubyOnRails
[02:54:30] maesitos: has joined #RubyOnRails
[02:56:12] kegan_: has joined #RubyOnRails
[02:56:36] maesitos: has joined #RubyOnRails
[02:58:17] maesitos: has joined #RubyOnRails
[03:00:00] celly: good evening everyone
[03:00:10] maesitos: has joined #RubyOnRails
[03:00:15] celly: has anyone here used or is using hstore with simple_form?
[03:01:43] smathy: has joined #RubyOnRails
[03:02:05] maesitos: has joined #RubyOnRails
[03:03:56] maesitos: has joined #RubyOnRails
[03:04:39] HalcyonicStorm: has joined #RubyOnRails
[03:05:21] johnflux: has joined #RubyOnRails
[03:05:22] johnflux: has joined #RubyOnRails
[03:05:52] maesitos: has joined #RubyOnRails
[03:07:52] maesitos_: has joined #RubyOnRails
[03:08:09] owenjones: has joined #RubyOnRails
[03:08:16] ornerymoose: has joined #RubyOnRails
[03:08:53] htmldrum: has joined #RubyOnRails
[03:09:43] maesitos: has joined #RubyOnRails
[03:09:49] celly: anybody active tonight?
[03:10:59] celly: this might be the first night i've checked on here where this channel is so quiet
[03:11:31] sevenseacat: its a tuesday afternoon here, so, busy working :)
[03:11:34] maesitos: has joined #RubyOnRails
[03:12:18] sarink: has joined #RubyOnRails
[03:12:47] celly: ah, gotcha. it's Monday night where i am
[03:13:05] soahccc: Hmm if you do a manual transaction around AR stuff there won't be any "sub transactions" right? So after_commit callbacks run after the outermost transaction block ends?
[03:13:06] celly: understandable
[03:13:24] sonofdirt: has joined #RubyOnRails
[03:13:28] maesitos: has joined #RubyOnRails
[03:13:46] maxz: has joined #RubyOnRails
[03:14:33] matthewd: celly: !used
[03:14:33] helpa: celly: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[03:15:24] maesitos: has joined #RubyOnRails
[03:15:28] soahccc: Just switched from database_cleaner strategy "transaction" to "truncation" and my factories go bananas :(
[03:15:35] matthewd: soahccc: I'm pretty sure the answers there are no and yes, respectively
[03:15:51] kuroro: has joined #RubyOnRails
[03:16:00] dandaman: has joined #RubyOnRails
[03:16:55] ElFerna: has joined #RubyOnRails
[03:17:24] maesitos_: has joined #RubyOnRails
[03:18:38] soahccc: matthewd: well the factory is actually wrong but it was hidden due to the delayed execution of the after_commit callback due to the database_cleaner strategy :S
[03:18:45] shock_one: has joined #RubyOnRails
[03:19:13] maesitos: has joined #RubyOnRails
[03:19:48] DiCablo: has joined #RubyOnRails
[03:20:03] ewnd9: has joined #RubyOnRails
[03:20:42] bigbob: has joined #RubyOnRails
[03:21:06] Bloomer: has joined #RubyOnRails
[03:21:07] maesitos: has joined #RubyOnRails
[03:21:28] brunoalano: has joined #RubyOnRails
[03:23:00] StevenXL: has joined #RubyOnRails
[03:23:00] StevenXL: has joined #RubyOnRails
[03:23:01] maesitos: has joined #RubyOnRails
[03:23:58] celly: @matthewd & @helpa, thanks
[03:24:26] celly: well,t he issue i'm having is getting the time_select to work using poastgres' hstore with simpleform
[03:24:57] maesitos: has joined #RubyOnRails
[03:25:08] lessless: has joined #RubyOnRails
[03:25:13] Bloomer: how you guys to validate the input field?
[03:25:21] celly: following the documentation for simple_form using their time_picker, it doesn't work. without using hstore, it shows up fine, but with hstore, it just shows blank
[03:26:47] maesitos: has joined #RubyOnRails
[03:27:32] celly: i was able to find a gem datetimepicker-rails, but the css for it kind of takes over the whole screen, but still doesn't actually show properly
[03:27:46] celly: was hoping there was a more standard/default way of doing it so i wouldn't HAVE to use a gem
[03:28:24] kmckelvin: has joined #RubyOnRails
[03:28:43] maesitos: has joined #RubyOnRails
[03:29:04] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[03:30:37] maesitos: has joined #RubyOnRails
[03:31:02] bigbob: has joined #RubyOnRails
[03:32:30] celly: https://gist.github.com/msands/7421c27959da3e5c9eaa
[03:32:40] celly: if more information is needed in the gist, please let me know
[03:32:47] goodcodeguy: has joined #RubyOnRails
[03:32:58] celly: what's there is what i used using the gem i found
[03:34:06] matthewd: celly: Well, the first thing you said was "hstore", and I see nothing resembling hstore there
[03:34:36] celly: @matthewd: edit.html.slim, line 2
[03:34:38] nyaa: has joined #RubyOnRails
[03:34:52] celly: that's what is used to call hstore into simple_form
[03:35:34] celly: simple_fields_for tells simple_form that you'll be using hstore, as per http://stackoverflow.com/questions/21237427/integrating-hstore-column-with-simple-form-in-rails-4
[03:36:03] jbrhbr: has joined #RubyOnRails
[03:36:25] sevenseacat: I think we need to know abit more about your schema
[03:37:03] sevenseacat: you've also missed the value part from that question
[03:37:12] sevenseacat: eg. input_html: { value: whatever }
[03:38:04] matthewd: > simple_fields_for tells simple_form that you'll be using hstore
[03:38:10] matthewd: Inaccurate.
[03:38:21] owenjones: has joined #RubyOnRails
[03:38:46] celly: updated gist with schema.rb
[03:39:46] shibabu: has joined #RubyOnRails
[03:40:44] celly: my apologies. maybe i misworded what is going on in my head. based on what i was able to find, once you enable the hstore extension, to be able to store your hstore variables, i had to use simple_fields_for with simple_form
[03:44:44] rubyonrailed: has joined #RubyOnRails
[03:45:07] bronson: has joined #RubyOnRails
[03:45:47] deception1: has joined #RubyOnRails
[03:47:39] nocd: has left #RubyOnRails: ()
[03:50:45] ornerymoose: has joined #RubyOnRails
[03:52:23] rubyonrailed: has joined #RubyOnRails
[03:54:10] ascarter: has joined #RubyOnRails
[03:54:58] krz: has joined #RubyOnRails
[03:56:58] B1n4r10: has joined #RubyOnRails
[03:57:13] ewnd9_: has joined #RubyOnRails
[04:00:53] shanemcd: has joined #RubyOnRails
[04:02:52] djbkd: has joined #RubyOnRails
[04:04:07] tvon: has joined #RubyOnRails
[04:04:27] htmldrum: has joined #RubyOnRails
[04:06:36] maxz: has joined #RubyOnRails
[04:09:55] htmldrum: has joined #RubyOnRails
[04:12:44] rakm: has joined #RubyOnRails
[04:13:13] bronson: has joined #RubyOnRails
[04:13:15] gabeodess: has joined #RubyOnRails
[04:13:58] ace05: has joined #RubyOnRails
[04:14:52] braincrash: has joined #RubyOnRails
[04:16:23] mary5030: has joined #RubyOnRails
[04:19:40] fexilal: has joined #RubyOnRails
[04:21:10] shock_one: has joined #RubyOnRails
[04:21:51] pyemkey: has joined #RubyOnRails
[04:22:34] deception1: has joined #RubyOnRails
[04:22:51] DavidDudson: has joined #RubyOnRails
[04:24:23] maxz: has joined #RubyOnRails
[04:25:18] yogeshrt: has joined #RubyOnRails
[04:27:05] pawnbox: has joined #RubyOnRails
[04:27:09] sirecote_: has joined #RubyOnRails
[04:29:10] kmckelvin: has joined #RubyOnRails
[04:29:48] markh: has joined #RubyOnRails
[04:30:29] epochwolf: has joined #RubyOnRails
[04:30:32] ornerymoose: has joined #RubyOnRails
[04:30:32] stevenw: has joined #RubyOnRails
[04:32:02] shibabu: has joined #RubyOnRails
[04:33:56] K_r3aPeR: has joined #RubyOnRails
[04:35:57] iateadonut: has joined #RubyOnRails
[04:36:41] shmilan: has joined #RubyOnRails
[04:38:54] K_r3aPeR_: has joined #RubyOnRails
[04:39:39] pulgolino: has joined #RubyOnRails
[04:40:23] shmilan: I was thinking about ordering 'Rails 4 In Action' since i finished Hartl's tutorial. Is it much more improved from 'Rails 3 in Action?'
[04:41:06] sevenseacat: I gutted large parts of it and rewrote them from scratch. we no longer use Cucumber, but rspec feature tests instead. we dropped cancan, in favour of pundit. we use bootstrap for styling. and many more goodies.
[04:42:01] markh: how long was the update process, sevenseacat?
[04:42:02] sonofdirt: has joined #RubyOnRails
[04:42:12] sevenseacat: (i say 'we' because i am one of the co-authors. hi, my name is Rebecca.)
[04:42:46] sevenseacat: we worked on the content for a full six months, the end of last year and the first few months of this year
[04:44:38] rubyonrailed: has joined #RubyOnRails
[04:44:54] shmilan: Thanks for that, sevenseacat
[04:45:51] Hazim: has joined #RubyOnRails
[04:46:00] sevenseacat: the first three chapters are up for free at https://www.manning.com/books/rails-4-in-action, if you'd like to check them out and see if they're to your tastes
[04:46:42] Hans267: Thanks for reminding me! I???ve been meaning to buy ria4 for awhile now. I???ve been super busy recently and totally forgot. >.>
[04:48:39] rubyonrailed: has joined #RubyOnRails
[04:48:43] sadaf2606: has joined #RubyOnRails
[04:51:49] nyaa: has joined #RubyOnRails
[04:51:51] Hans267: I???m trying to set up a relationship through a form but it has to search through multiple tables, I???ve been googling but I think I may be searching the wrong terms. Here???s a gist of what I???m going for https://gist.github.com/janikhans/aec81a4a1546997611c3
[04:53:37] dopie: has joined #RubyOnRails
[04:57:41] dandaman: has joined #RubyOnRails
[04:58:11] berserk_ren: has joined #RubyOnRails
[04:58:12] sevenseacat: hmm lets have a look
[04:59:06] sevenseacat: Hans267: you want to autocomplete parts for the currently selected brand?
[05:01:00] Hans267: sevenseacat: Yes because there will be potentially a huge amount of brands and I need them to have the ability to type it in if it doesn???t already exist. I???ve currently got that implemented and working (for the most part) when building a new Product
[05:03:15] Hans267: I updated the gist with the code, I followed a RailsCast video on the autocompletion to get all this setup
[05:03:46] sevenseacat: I don't know what gem you're using for autocomplete, but you might need to tweak it in a jquery before hook or something to read and add the brand ID
[05:03:58] sevenseacat: I'd add a hidden field to store the brand ID in, to read it later
[05:04:51] sevenseacat: yeah I'd work with IDs, not names
[05:04:59] bronson: has joined #RubyOnRails
[05:05:44] bungoman: has joined #RubyOnRails
[05:05:46] i: has joined #RubyOnRails
[05:05:54] kiez0rd: has joined #RubyOnRails
[05:06:06] dopie: has joined #RubyOnRails
[05:06:43] Hans267: It???s done through jquery-ui. So it would find the Brand with ID= and then save that into a hidden field and then send that to the next input?
[05:07:00] pawnbox: has joined #RubyOnRails
[05:07:39] sevenseacat: well no, its a multi-step thing
[05:08:02] sevenseacat: but jquery-ui is notoriously a pain in the ass
[05:09:32] sevenseacat: I'd configure the first autocomplete to retrieve the name and ID and save those both in two fields on the page, and then configure the second autocomplete to read the ID saved from the first autocomplete and pass that as part of the URL
[05:10:26] tenzan: has joined #RubyOnRails
[05:11:01] ascarter: has joined #RubyOnRails
[05:11:20] threeminutemonta: has joined #RubyOnRails
[05:16:49] edwinvdgraaf: has joined #RubyOnRails
[05:18:10] owenjones: has joined #RubyOnRails
[05:22:25] shock_one: has joined #RubyOnRails
[05:22:26] stevenw: has joined #RubyOnRails
[05:22:32] sonofdirt: has joined #RubyOnRails
[05:25:33] Hans267: sevenseacat: Thank you, that makes sense. I???m trying to find out how to save that within the form <%= text_field_tag(:brand_name, :brand_id) autoco??? %>. Is that sort of correct?
[05:25:49] sevenseacat: I dont know what that is
[05:26:41] techsethi: has joined #RubyOnRails
[05:26:47] Hans267: Haha, apparently not then. I???ll keep googling
[05:27:15] ascarter: has joined #RubyOnRails
[05:27:37] sevenseacat: like I said, it will depend a lot on the code you're using to perform the autocomplete in js
[05:27:46] sevenseacat: which is why I cant help out with any actual code
[05:29:58] kmckelvin: has joined #RubyOnRails
[05:30:20] pawnbox: has joined #RubyOnRails
[05:31:58] tenderlove: has joined #RubyOnRails
[05:37:05] krz: has joined #RubyOnRails
[05:37:16] yogeshrt: has joined #RubyOnRails
[05:37:59] celly: has joined #RubyOnRails
[05:39:00] Cohedrin: anyone have a favorite feature flag gem here?
[05:39:00] krz: has joined #RubyOnRails
[05:39:12] Cohedrin: flip and rollout both look good, but they dont seem to be maintained anymore
[05:39:22] sevenseacat: rollout is the one I've seen used I think
[05:40:05] Cohedrin: was afraid of that, not a fan of the global variable system
[05:40:17] sevenseacat: I've never actually used one, so just going on what I've heard.
[05:40:51] Cohedrin: how do you handle it?
[05:41:07] matthewd: A feature flag seems rather like a global variable however you wrap it, to me ??\_(???)_/??
[05:41:39] rhizome: it's a persistence technique, sure
[05:41:40] Cohedrin: oh yeah of course
[05:42:02] Cohedrin: mainly don't like it because globals look ugly
[05:42:13] Cohedrin: then some new dev gets in there and is like why are these guys using globals
[05:42:14] rhizome: there's no reason not to use methods for that stuff
[05:49:23] dionysus69: has joined #RubyOnRails
[05:52:06] mary5030: has joined #RubyOnRails
[05:53:11] Sawbones: has joined #RubyOnRails
[05:53:44] johnflux: has joined #RubyOnRails
[05:53:44] johnflux: has joined #RubyOnRails
[05:54:44] SylarRuby: has joined #RubyOnRails
[05:56:08] pyemkey: has joined #RubyOnRails
[05:56:20] ascarter: has joined #RubyOnRails
[05:56:55] revengeofbigd: has joined #RubyOnRails
[05:59:11] stannard: has joined #RubyOnRails
[06:00:42] ewnd9_: has joined #RubyOnRails
[06:00:47] B1n4r10: has joined #RubyOnRails
[06:01:07] stevenw: has joined #RubyOnRails
[06:01:19] bronson: has joined #RubyOnRails
[06:02:12] ur5us: has joined #RubyOnRails
[06:03:59] ewnd9: has joined #RubyOnRails
[06:06:29] kfrz: has joined #RubyOnRails
[06:07:38] ace05: has joined #RubyOnRails
[06:08:40] ur5us: has joined #RubyOnRails
[06:10:53] akshat: has joined #RubyOnRails
[06:12:53] shmilan: has joined #RubyOnRails
[06:16:35] njero: has joined #RubyOnRails
[06:17:36] darutoko: has joined #RubyOnRails
[06:17:52] yogeshrt: has joined #RubyOnRails
[06:23:05] shock_one: has joined #RubyOnRails
[06:25:16] pawnbox: has joined #RubyOnRails
[06:25:25] sarink: has joined #RubyOnRails
[06:26:50] sarink: has joined #RubyOnRails
[06:28:54] techsethi: has joined #RubyOnRails
[06:28:56] arooni: has joined #RubyOnRails
[06:29:30] sarink: has joined #RubyOnRails
[06:30:45] kmckelvin: has joined #RubyOnRails
[06:31:06] srinidhi: has joined #RubyOnRails
[06:33:29] aganov: has joined #RubyOnRails
[06:34:17] tenzan: has joined #RubyOnRails
[06:34:23] phantummm: has joined #RubyOnRails
[06:34:53] pawnbox: has joined #RubyOnRails
[06:36:00] steffkes: has joined #RubyOnRails
[06:36:01] steffkes: has joined #RubyOnRails
[06:37:26] shibabu: has joined #RubyOnRails
[06:39:12] trautwein: has joined #RubyOnRails
[06:40:27] sleungcy: has joined #RubyOnRails
[06:42:26] tagrudev: has joined #RubyOnRails
[06:44:51] techsethi: has joined #RubyOnRails
[06:45:21] qurve: has joined #RubyOnRails
[06:45:38] qurve: Anyone here using RGeo 3.0+ by chance? Ideally with the PostGIS AR adapter?
[06:45:54] qurve: I'm completely lost on how the new geo factory setup works in 3.0.
[06:46:05] Hazim: has joined #RubyOnRails
[06:46:36] qurve: It's likely because I am an idiot, but I can't even figure out how I'm supposed to generate a value for a spatial column on a new record.
[06:50:48] jarray52: has joined #RubyOnRails
[06:51:06] trautwein: has joined #RubyOnRails
[06:52:26] nyanz: has joined #RubyOnRails
[06:54:13] lxsameer: has joined #RubyOnRails
[06:57:11] ascarter: has joined #RubyOnRails
[06:59:53] sleungcy: has joined #RubyOnRails
[07:00:29] Pazician: has joined #RubyOnRails
[07:00:36] celly: has joined #RubyOnRails
[07:01:58] phantummm: has joined #RubyOnRails
[07:02:28] celly: has joined #RubyOnRails
[07:03:03] deeprave_: has joined #RubyOnRails
[07:04:18] jmrepetti: has joined #RubyOnRails
[07:04:18] celly: has joined #RubyOnRails
[07:05:13] nocontrol: has joined #RubyOnRails
[07:06:13] celly: has joined #RubyOnRails
[07:07:35] kfrz: has joined #RubyOnRails
[07:08:06] celly: has joined #RubyOnRails
[07:10:01] celly: has joined #RubyOnRails
[07:11:38] yogeshrt: has joined #RubyOnRails
[07:11:51] celly: has joined #RubyOnRails
[07:13:47] celly: has joined #RubyOnRails
[07:14:49] Hazim: has joined #RubyOnRails
[07:15:37] celly: has joined #RubyOnRails
[07:17:33] celly: has joined #RubyOnRails
[07:17:33] arBmind: has joined #RubyOnRails
[07:17:54] zpe: has joined #RubyOnRails
[07:19:04] juddey: has joined #RubyOnRails
[07:19:27] celly: has joined #RubyOnRails
[07:21:04] jmrepetti: has joined #RubyOnRails
[07:21:13] yardenbar: has joined #RubyOnRails
[07:21:18] celly: has joined #RubyOnRails
[07:21:23] ur5us: has joined #RubyOnRails
[07:23:08] celly: has joined #RubyOnRails
[07:23:30] akshat: has joined #RubyOnRails
[07:23:52] shock_one: has joined #RubyOnRails
[07:24:13] teclator: has joined #RubyOnRails
[07:25:04] celly: has joined #RubyOnRails
[07:25:37] tetraktys: has joined #RubyOnRails
[07:26:58] celly: has joined #RubyOnRails
[07:28:39] nyaa: has joined #RubyOnRails
[07:28:49] celly: has joined #RubyOnRails
[07:29:47] lacrymology: has joined #RubyOnRails
[07:30:30] troys: has joined #RubyOnRails
[07:30:41] celly: has joined #RubyOnRails
[07:31:32] kmckelvin: has joined #RubyOnRails
[07:32:24] maesitos: has joined #RubyOnRails
[07:32:34] celly: has joined #RubyOnRails
[07:34:30] celly: has joined #RubyOnRails
[07:35:58] jmrepetti: has joined #RubyOnRails
[07:36:07] baweaver: has joined #RubyOnRails
[07:36:23] celly: has joined #RubyOnRails
[07:37:20] shock_one: has joined #RubyOnRails
[07:38:15] celly: has joined #RubyOnRails
[07:38:33] boxofrox: has joined #RubyOnRails
[07:40:08] solars: has joined #RubyOnRails
[07:40:10] celly: has joined #RubyOnRails
[07:40:38] alex88: has joined #RubyOnRails
[07:40:38] krzkrz: has joined #RubyOnRails
[07:41:56] kmckelvin: has joined #RubyOnRails
[07:42:00] celly: has joined #RubyOnRails
[07:42:54] ibouvousaime: has joined #RubyOnRails
[07:43:55] celly: has joined #RubyOnRails
[07:44:05] jstransky: has joined #RubyOnRails
[07:45:05] kies: has joined #RubyOnRails
[07:45:46] celly: has joined #RubyOnRails
[07:45:59] iateadonut: has joined #RubyOnRails
[07:46:04] njero: has joined #RubyOnRails
[07:46:39] srinidhi: has joined #RubyOnRails
[07:47:38] celly: has joined #RubyOnRails
[07:49:31] celly: has joined #RubyOnRails
[07:49:32] B1n4r10: has joined #RubyOnRails
[07:51:27] celly: has joined #RubyOnRails
[07:52:08] akshat: has joined #RubyOnRails
[07:53:19] celly: has joined #RubyOnRails
[07:55:12] celly: has joined #RubyOnRails
[07:55:54] theod: has joined #RubyOnRails
[07:56:42] steffkes: has joined #RubyOnRails
[07:56:43] steffkes: has joined #RubyOnRails
[07:56:44] deception1: has joined #RubyOnRails
[07:57:06] celly: has joined #RubyOnRails
[07:58:56] celly: has joined #RubyOnRails
[08:00:28] Cervajz: has joined #RubyOnRails
[08:00:51] celly: has joined #RubyOnRails
[08:01:00] notnoyyyyy: has joined #RubyOnRails
[08:01:05] edwinvdgraaf: has joined #RubyOnRails
[08:01:06] Cervajz_: has joined #RubyOnRails
[08:01:19] Sawbones: has joined #RubyOnRails
[08:01:43] tomoyuki28jp: has joined #RubyOnRails
[08:02:45] celly: has joined #RubyOnRails
[08:02:59] tomoyuki28jp: Is there a easy way to implement dirty associations something like this? https://github.com/daphonz/dirty_associations (This library is old.)
[08:03:26] rattatmatt: has joined #RubyOnRails
[08:03:56] jas02: has joined #RubyOnRails
[08:04:36] celly: has joined #RubyOnRails
[08:05:13] shock_one: has joined #RubyOnRails
[08:06:29] celly: has joined #RubyOnRails
[08:06:49] Cohedrin: if you're using rails 4
[08:07:05] Cohedrin: its already included tomoyuki28jp
[08:07:25] rattatmatt: what would be the best way to persist data across requests, that is the same for every user, without having to recreate the objects/values with each request, and without storing them in the db?
[08:07:38] Cohedrin: you can use it from callback contexts, like after_save or before_update
[08:07:38] sevenseacat: rattatmatt: such as?
[08:07:53] Cohedrin: just do attribute_changed?
[08:08:21] celly: has joined #RubyOnRails
[08:09:17] ace05: has joined #RubyOnRails
[08:09:25] rattatmatt: I have a gallery of sample images stored in s3 - I want to grab the image urls to be able to display them to users, but it's an expensive operation in my tests to run the api request to s3 for the list on every request
[08:09:51] rattatmatt: since the sample images won't change very often at all, it doesn't bother me to persist the urls for a long time
[08:09:54] Puffball: has joined #RubyOnRails
[08:10:02] jarray52: has left #RubyOnRails: ()
[08:10:04] sevenseacat: so you want to optimize tests? stub the response from s3?
[08:10:17] celly: has joined #RubyOnRails
[08:10:17] sevenseacat: you definitely shouldnt be hitting external services in tests
[08:10:25] rattatmatt: no, I want to optimize requests in production
[08:11:22] sevenseacat: okay, not sure why you mentioned tests then... so cache the response from s3?
[08:11:25] tomoyuki28jp: Cohedrin: I will try those callbacks. Thanks!
[08:12:02] rattatmatt: oh lol, by tests I meant benchmarks to see how long requests through the aws api were taking
[08:12:03] Cohedrin: tomoyuki28jp: if you're looking for more information on those callbacks (really useful btw) http://guides.rubyonrails.org/active_record_callbacks.html should get you started
[08:12:08] celly: has joined #RubyOnRails
[08:12:25] Sylario: has joined #RubyOnRails
[08:13:14] Cohedrin: so you're trying to benchmark what, request time? Or rails execution time?
[08:14:01] celly: has joined #RubyOnRails
[08:14:21] tomoyuki28jp: Cohedrin: Thanks a lot!
[08:14:27] rattatmatt: request time. every time I request the list of objects in the s3 bucket, it can take as long as half a second. that's just for the api call to s3, and doesn't include the rest of the request cycle
[08:14:32] Cohedrin: no problem, glad to help
[08:14:44] rattatmatt: what caching mechanism should I use? it's not something I've had to do in rails yet
[08:15:04] sevenseacat: Rails has caching built-in
[08:15:06] null__: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[08:15:15] sevenseacat: just wrap your calls in a Rails.cache block
[08:15:34] ibouvousaime: has joined #RubyOnRails
[08:15:35] srinidhi1: has joined #RubyOnRails
[08:15:55] celly: has joined #RubyOnRails
[08:16:00] boxofrox: has joined #RubyOnRails
[08:17:35] comrad: has joined #RubyOnRails
[08:17:46] celly: has joined #RubyOnRails
[08:19:06] rattatmatt: wait, if I do it that way, it would still have to make the initial request the first time anyone made a request... if I throw it into an initializer, would that pre-cache it, so that the first request doesn't have to spin for a long time?
[08:19:17] tomoyuki28jp: Cohedrin: There is no after_update ?
[08:19:33] sevenseacat: how is 'half a second' spinning for a long time?
[08:19:41] celly: has joined #RubyOnRails
[08:19:54] Cohedrin: there is after_update, yes
[08:20:08] sevenseacat: thats also not what initializers are for
[08:20:18] rattatmatt: like I said, that's only one portion of the request
[08:20:26] Cohedrin: tomoyuki28jp: http://guides.rubyonrails.org/active_record_callbacks.html#updating-an-object
[08:20:36] M-shine: has joined #RubyOnRails
[08:20:39] rattatmatt: maybe I'm trying too hard to pre-optimize
[08:20:41] tomoyuki28jp: I get this error: "Unknown key: after_update"
[08:21:36] celly: has joined #RubyOnRails
[08:21:40] sevenseacat: tomoyuki28jp: !code
[08:21:40] helpa: tomoyuki28jp: 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.
[08:22:08] Puffball: has joined #RubyOnRails
[08:22:51] tomoyuki28jp: sevenseacat: https://gist.github.com/tomoyuki28jp/ba0159c82522613d0f5a
[08:23:13] Cohedrin: its not an association
[08:23:22] Cohedrin: it should look this this
[08:23:30] sevenseacat: yeah I don't know what made you think you could do that
[08:24:34] agoldboi: has joined #RubyOnRails
[08:24:51] Cohedrin: http://hastebin.com/unoqetecih.coffee
[08:24:56] yogeshrt: has joined #RubyOnRails
[08:25:03] Cohedrin: no idea why it saved that as coffeescript
[08:25:09] Cohedrin: this is why we don't use hastebin
[08:25:13] sevenseacat: and this is why we tell people to use gist or pastie
[08:25:36] Cohedrin: but, what you did was include it as a param to the has many_method... which won't ever work
[08:25:51] sevenseacat: you might need to gist your code somewhere that isnt going to throw application errors.
[08:26:39] artto: has joined #RubyOnRails
[08:26:41] AzaToth: has joined #RubyOnRails
[08:28:06] tomoyuki28jp: Actually I'm trying to solve this. http://stackoverflow.com/questions/33043447/paper-trail-create-a-version-on-parent-whenever-associated-model-changes Any idea how I can implement it?
[08:28:27] sevenseacat: ah, one of those XY problems
[08:29:07] Cohedrin: https://github.com/airblade/paper_trail?
[08:29:35] sevenseacat: tomoyuki28jp: https://github.com/airblade/paper_trail#choosing-attributes-to-monitor
[08:29:54] sevenseacat: choose your associations.
[08:30:11] artto: has joined #RubyOnRails
[08:30:16] tomoyuki28jp: sevenseacat: I don't think it will work for associations, but let me try.
[08:31:03] sevenseacat: that fun time when people ask for your help then argue when you provide it
[08:35:41] yfeldblum: has joined #RubyOnRails
[08:37:01] DavidDudson: has joined #RubyOnRails
[08:37:17] jbrhbr: has joined #RubyOnRails
[08:37:21] blackhuey: has joined #RubyOnRails
[08:37:25] tomoyuki28jp: sevenseacat: paper_trail option does not work for association.
[08:37:36] helpa: 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.
[08:38:02] kmckelvin: has joined #RubyOnRails
[08:38:19] s2013: has joined #RubyOnRails
[08:38:19] ajax0xd9: has joined #RubyOnRails
[08:39:07] tomoyuki28jp: Is there a way to detect one or more associations changes? Then I can manually call touch_with_version method.
[08:39:31] sevenseacat: ACTION shrugs and goes back to work
[08:40:34] shibabu: has joined #RubyOnRails
[08:40:44] dionysus69: has joined #RubyOnRails
[08:41:28] snowy: has joined #RubyOnRails
[08:44:56] mark3: has joined #RubyOnRails
[08:44:59] Hazim: has joined #RubyOnRails
[08:49:06] Hazim: has joined #RubyOnRails
[08:54:20] boxofrox: has joined #RubyOnRails
[08:56:12] techsethi: has joined #RubyOnRails
[08:56:51] wmdrossard: has joined #RubyOnRails
[08:57:04] ajax0xd9: has joined #RubyOnRails
[08:58:12] ajax0xd9: Hey all. I have a question who will be so kind as to help me?
[08:59:10] mikecmpbll: has joined #RubyOnRails
[08:59:32] sevenseacat: depends what it is
[09:01:26] celly: has joined #RubyOnRails
[09:03:24] celly: has joined #RubyOnRails
[09:05:11] celly: has joined #RubyOnRails
[09:05:19] JDeen: has joined #RubyOnRails
[09:06:21] solars: has joined #RubyOnRails
[09:07:07] celly: has joined #RubyOnRails
[09:08:01] darkxploit: has joined #RubyOnRails
[09:08:13] Scripore: has joined #RubyOnRails
[09:08:38] defsdoor: has joined #RubyOnRails
[09:08:59] celly: has joined #RubyOnRails
[09:09:00] andrew9184: has joined #RubyOnRails
[09:09:11] edwinvdgraaf: has joined #RubyOnRails
[09:09:48] jsrn_: has joined #RubyOnRails
[09:10:25] nyaa: has joined #RubyOnRails
[09:10:28] JDeen: Hi there... I have to ask some advice regarding cancancan. I have to describe an ability as `can :manage, JobApplication, school_id: user.schools.map(&:id)`. I need to show a menu link to users who can see 'JobApplications'. In the scenario `can? :read, JobApplications` would not work because of the conditional. Any recommendations to see if a user can see the menu link?
[09:10:53] celly: has joined #RubyOnRails
[09:11:08] Hans267: has left #RubyOnRails: ()
[09:11:48] JDeen: ^^^ as a question with more details http://stackoverflow.com/questions/34284884/using-cancancan-with-views-to-hide-show-content-advice
[09:12:05] adre: has joined #RubyOnRails
[09:12:46] celly: has joined #RubyOnRails
[09:13:29] yogeshrt: has joined #RubyOnRails
[09:13:40] drptbl: has joined #RubyOnRails
[09:14:39] celly: has joined #RubyOnRails
[09:14:47] shmoon: anyone here who's a guru on rails sessions internals ? there's a metod called stale_session_check! in action dispatch what does that exactly do since I see it just yield the blockpassed to it. or basically when does a cookie backed session become stale so that rails can regenerate the session id and set a new cookie with the old cookies values ?
[09:16:33] celly: has joined #RubyOnRails
[09:18:23] celly: has joined #RubyOnRails
[09:20:06] alex88: has joined #RubyOnRails
[09:20:18] celly: has joined #RubyOnRails
[09:20:35] Ergo: has joined #RubyOnRails
[09:22:13] celly: has joined #RubyOnRails
[09:23:53] edwinvdgraaf: has joined #RubyOnRails
[09:24:04] celly_: has joined #RubyOnRails
[09:24:45] Scripore: has joined #RubyOnRails
[09:24:49] workmad3: has joined #RubyOnRails
[09:24:59] Axilla: has joined #RubyOnRails
[09:25:50] defsdoor: has joined #RubyOnRails
[09:25:58] celly: has joined #RubyOnRails
[09:27:00] arBmind: has joined #RubyOnRails
[09:27:41] srinidhi: has joined #RubyOnRails
[09:27:48] celly: has joined #RubyOnRails
[09:28:55] jayne: has joined #RubyOnRails
[09:29:22] Peg-leg: has joined #RubyOnRails
[09:29:44] celly: has joined #RubyOnRails
[09:31:23] Tempesta: has joined #RubyOnRails
[09:32:12] dionysus69: has joined #RubyOnRails
[09:33:15] maesitos: has joined #RubyOnRails
[09:37:05] Elion: has joined #RubyOnRails
[09:37:06] Elion: has joined #RubyOnRails
[09:37:09] dionysus70: has joined #RubyOnRails
[09:37:12] gavit: WHy is the second insert in street_registries instead of in street_registry_relation (also wrong columns): https://gist.github.com/gavit/91611216ebefbad4c118#file-console-log-L7
[09:38:19] B1n4r10: has joined #RubyOnRails
[09:40:32] jxs_: has joined #RubyOnRails
[09:41:11] nyaa: has joined #RubyOnRails
[09:41:23] krzkrz: has joined #RubyOnRails
[09:43:41] Cervajz: has joined #RubyOnRails
[09:44:35] Cervajz_: has joined #RubyOnRails
[09:45:14] yogeshrt: has joined #RubyOnRails
[09:45:27] artto: has joined #RubyOnRails
[09:46:41] srinidhi: has joined #RubyOnRails
[09:50:09] stannard: has joined #RubyOnRails
[09:51:12] baweaver: has joined #RubyOnRails
[09:51:18] FooMunki: has joined #RubyOnRails
[09:54:23] ajax0xd9: Guys, what would be the best way to store guests who will be part of a certain event? I have an Event model and a User model and I want to know who the special guests are.
[09:58:43] phantummm: has joined #RubyOnRails
[10:00:50] rodfersou: has joined #RubyOnRails
[10:01:06] nyaa: has joined #RubyOnRails
[10:02:17] Ropeney: has joined #RubyOnRails
[10:03:56] Cervajz: has joined #RubyOnRails
[10:07:35] Xentil: has joined #RubyOnRails
[10:07:39] ur5us: has joined #RubyOnRails
[10:09:43] shock_one: has joined #RubyOnRails
[10:10:39] ace05: has joined #RubyOnRails
[10:17:08] HalcyonicStorm: has joined #RubyOnRails
[10:20:54] yogeshrt: has joined #RubyOnRails
[10:21:13] yfeldblum: has joined #RubyOnRails
[10:22:18] pawnbox: has joined #RubyOnRails
[10:22:40] errakeshpd: has joined #RubyOnRails
[10:24:36] errakeshpd: trader.subscription_account.pricing_plan_id returns an id of a plan for a trader, how can I get count of traders that currenty have pricing_plan_id = 100 ?
[10:25:22] Pumukel: has joined #RubyOnRails
[10:26:17] FernandoBasso: has joined #RubyOnRails
[10:27:22] ur5us: has joined #RubyOnRails
[10:27:26] aaronr: has joined #RubyOnRails
[10:33:08] fexilal: has joined #RubyOnRails
[10:34:28] ql6wlld: has joined #RubyOnRails
[10:35:25] arup_r: has joined #RubyOnRails
[10:36:22] marr: has joined #RubyOnRails
[10:38:01] shock_one: has joined #RubyOnRails
[10:38:46] arup_r: I am using websocket to trigger events when sign in and sign out happened. I am using Devise. Looking for a callback/hook which will be called just before sign out. I tried `after_sign_out_path_for` which will not work, because when the method will be called the current_user will be `nil`. reason is makes sense. Here is my simple code after_sign_out_path_for .. What other alternatives I should try ? I can also trigger the the event inside t
[10:38:47] arup_r: he SessionController#destroy and then call super from my override controller destroy action. Dunno if it is a great idea or not.
[10:39:29] pyemkey: has joined #RubyOnRails
[10:45:13] shibabu: has joined #RubyOnRails
[10:48:24] ElFerna: has joined #RubyOnRails
[10:48:34] lacrymology: has joined #RubyOnRails
[10:48:58] nettoweb: has joined #RubyOnRails
[10:50:07] cassioscabral: has joined #RubyOnRails
[10:57:43] FooMunki: has joined #RubyOnRails
[11:01:09] aaronr: has joined #RubyOnRails
[11:02:03] nfk|laptop: has joined #RubyOnRails
[11:04:06] cassioscabral: has joined #RubyOnRails
[11:05:55] Cervajz: has joined #RubyOnRails
[11:06:56] c355E3B: has joined #RubyOnRails
[11:07:54] ibouvousaime: has joined #RubyOnRails
[11:11:28] efy: has left #RubyOnRails: ()
[11:12:44] efy: has joined #RubyOnRails
[11:14:16] maesitos: has joined #RubyOnRails
[11:14:32] paulwatson: has joined #RubyOnRails
[11:16:24] krzkrz: has joined #RubyOnRails
[11:17:51] paulwatson: has left #RubyOnRails: ()
[11:17:52] celly: has joined #RubyOnRails
[11:19:12] cassioscabral: has joined #RubyOnRails
[11:19:28] Macaveli: has joined #RubyOnRails
[11:20:07] mostlybadfly: has joined #RubyOnRails
[11:21:00] alex88: has joined #RubyOnRails
[11:27:07] B1n4r10: has joined #RubyOnRails
[11:27:32] emrox: has joined #RubyOnRails
[11:28:40] quazimodo: has joined #RubyOnRails
[11:30:18] wmdrossard: has joined #RubyOnRails
[11:33:03] ElFerna: has joined #RubyOnRails
[11:34:28] ql6wlld: has joined #RubyOnRails
[11:36:04] maxz: has joined #RubyOnRails
[11:38:25] build22: has joined #RubyOnRails
[11:39:31] alaing: has joined #RubyOnRails
[11:39:45] alaing: has joined #RubyOnRails
[11:40:34] alaing: hi how do i check a form_for collection_radio_buttons based on a parameter in the url. https://gist.github.com/aliuk2012/b40051e29a5619f9f321
[11:41:24] deception1: has joined #RubyOnRails
[11:43:45] ElFerna: has joined #RubyOnRails
[11:43:58] gavit: WHy is the second insert in street_registries instead of in street_registry_relation (also wrong columns): https://gist.github.com/gavit/91611216ebefbad4c118#file-console-log-L7
[11:45:01] yfeldblum: has joined #RubyOnRails
[11:46:08] shock_one: has joined #RubyOnRails
[11:46:48] renanoronfle: has joined #RubyOnRails
[11:50:05] krzkrz: has joined #RubyOnRails
[11:50:57] ewnd9: has joined #RubyOnRails
[11:52:11] Cervajz_: has joined #RubyOnRails
[11:54:05] tetraktys: has joined #RubyOnRails
[11:56:40] ElFerna: has joined #RubyOnRails
[11:59:34] maxz: has joined #RubyOnRails
[12:05:04] adre: has joined #RubyOnRails
[12:05:43] bmalum: has joined #RubyOnRails
[12:06:34] bmalum: has joined #RubyOnRails
[12:08:45] cornerma1: has joined #RubyOnRails
[12:09:23] alaing: hi how do i check a form_for collection_radio_buttons based on a parameter in the url. https://gist.github.com/aliuk2012/b40051e29a5619f9f321
[12:12:03] alaing: check as in "select"
[12:12:10] ace05: has joined #RubyOnRails
[12:19:24] cassioscabral: has joined #RubyOnRails
[12:21:57] moeabdol1: has joined #RubyOnRails
[12:22:31] doodlehaus: has joined #RubyOnRails
[12:23:36] lacrymology: has joined #RubyOnRails
[12:25:02] Scripore: has joined #RubyOnRails
[12:25:20] arup_r: lol .. all questions. no answers
[12:26:55] sevenseacat: maybe some of the questioners should try helping the other people out then
[12:28:19] ElFerna: has joined #RubyOnRails
[12:29:12] chridal: When hitting an external API in your API in Rails what are your thoughts about that being a model or just use a service object?
[12:29:45] Palsson: has joined #RubyOnRails
[12:31:05] chridal: Or would you say avoid ending up with non-activerecord models?
[12:32:25] agoldboi1: has joined #RubyOnRails
[12:33:35] ElFerna_: has joined #RubyOnRails
[12:37:37] elaptics: chridal: depends what it is but generally at a minimum I'd wrap the external calls in my own objects (most likely not an AR model unless there's a reason to be persisting the external api data for some reason) so that my app doesn't need to change when the external api changes
[12:38:19] Elion: has joined #RubyOnRails
[12:38:20] Elion: has joined #RubyOnRails
[12:40:31] sevenseacat: arup_r: yeah, didnt think so.
[12:41:05] arup_r: sevenseacat: yes, right you are as always..
[12:41:22] solars: has joined #RubyOnRails
[12:42:36] arup_r: alaing: didn't get your question.. tip: in HAML, use - #... to comment code.. :)
[12:43:23] alaing: arup_r: I just add a comment in the gist which is not in my actual code
[12:43:23] arup_r: what yu want to set ?
[12:43:46] arup_r: ok. I know. But it will look good to us.. or me
[12:43:50] alaing: The radio buttons render as I would like it but its not remembering what was set previously
[12:43:56] alaing: theres a filter param
[12:44:53] Scripore: has joined #RubyOnRails
[12:45:53] alaing: arup_r: ATM, the user clicks on a radio button and the page submits but it doesn't keep that radio button selected
[12:47:28] shibabu: has joined #RubyOnRails
[12:49:09] arup_r: alaing: show your rendered HTML for these radio buttons
[12:49:41] elaptics: alaing: you need to either set the value of the filter in some kind of object and use that object to render the control or simply ensure that you're setting the filter param and use that as the value for the options
[12:50:09] elaptics: hint - it's a matter of setting "selected" on the appropriate one
[12:52:36] tvw: has joined #RubyOnRails
[12:53:36] alaing: arup_r: i've updated the gist
[12:54:56] alaing: elaptics: I know the html should have a "checked" attribute set on the radio button element. I'm just not that familiar with rails/ruby and learning as I go
[12:55:09] arup_r: alaing: you are not receiving the value because name is incorrect.. https://gist.github.com/aliuk2012/b40051e29a5619f9f321#file-new-html-L9 .. and where is the object in the form_for ?
[12:56:19] adre: has joined #RubyOnRails
[12:56:51] alaing: arup_r: because the name begins with "/"? I noticed the ids start with "_" which i'm sure is an invalid id name
[12:57:08] artto: has joined #RubyOnRails
[12:57:09] tejasmanohar: has joined #RubyOnRails
[12:57:20] arup_r: your name is not valid.. Which controller new action is this ?
[12:58:01] arup_r: form_for object, path_to_action,... is a syntax or there is a shorthand though.. but your form_for is what I never saw, and doesn't look correct
[12:58:04] elaptics: alaing: you need to pass something to the form_for before the path
[12:58:39] elaptics: e.g. form_for @search_object, workers_admin_allocations_path...
[12:58:45] phantummm: has joined #RubyOnRails
[12:59:05] elaptics: it doesn't need to be @search_object - it could just be a symbol or string, e.g. :search
[13:01:45] pika_pika: has joined #RubyOnRails
[13:03:27] ornerymoose: has joined #RubyOnRails
[13:04:43] Hazim: has joined #RubyOnRails
[13:04:59] IFrank00: has joined #RubyOnRails
[13:05:14] IFrank00: Hello good day to all
[13:05:40] ElFerna_: has joined #RubyOnRails
[13:06:03] celly: has joined #RubyOnRails
[13:07:48] ornerymoose_: has joined #RubyOnRails
[13:08:07] IFrank00: Hi I have 2 models Task belongs_to Section and Section has_many Task how can I show only Sections that have tasks ??
[13:08:32] foobar934474: has joined #RubyOnRails
[13:09:59] nyaa: has joined #RubyOnRails
[13:11:35] ElectricAlan_: has joined #RubyOnRails
[13:11:41] ElectricAlan_: ACTION is back for another round
[13:11:51] sameerynho: has joined #RubyOnRails
[13:15:00] LambdaSource: has joined #RubyOnRails
[13:15:40] tbuehlmann: IFrank00, this could work: Section.joins(:tasks).distinct
[13:15:53] B1n4r10: has joined #RubyOnRails
[13:16:08] IFrank00: tbuehlmann, thank you ill check it out
[13:18:07] IFrank00: I get this error ERROR: could not identify an equality operator for type json
[13:19:21] arup_r: has joined #RubyOnRails
[13:19:33] Detch: has joined #RubyOnRails
[13:19:50] Macaveli: has joined #RubyOnRails
[13:21:38] Macaveli_: has joined #RubyOnRails
[13:21:58] melonstorm: has joined #RubyOnRails
[13:23:17] ElectricAlan_: finally got my select field and my input fields styled to look the same size
[13:23:24] ElectricAlan_: so happy with myself for this
[13:23:31] tbuehlmann: IFrank00, remove the call to distinct and try again
[13:23:46] tbuehlmann: care: you might get the same section more than once
[13:23:46] B1n4r10: has joined #RubyOnRails
[13:24:10] ElectricAlan_: sevenseacat, greetings friend
[13:24:18] sevenseacat: ElectricAlan_: o/
[13:24:45] orikremer: has joined #RubyOnRails
[13:26:09] andreynering: has joined #RubyOnRails
[13:26:19] IFrank00: tbuehlmann, yes that what I get multi sections
[13:26:44] arup_r: has joined #RubyOnRails
[13:27:19] tbuehlmann: you can also just call Section.where(id: Task.pluck(:section_id)), that'd be two sql queries
[13:28:28] momomomomo: has joined #RubyOnRails
[13:30:35] IFrank00: tbuehlmann, that did work perfect!
[13:30:52] IFrank00: 24hrs looking for that lol
[13:32:27] bronson: has joined #RubyOnRails
[13:32:35] d0nn1e: has joined #RubyOnRails
[13:32:58] tbuehlmann: IFrank00, that will take some memory if you have a lot of tasks, though. I probably would investigate on why the join won't work
[13:33:18] teclator: has joined #RubyOnRails
[13:34:30] gambl0re: has joined #RubyOnRails
[13:35:18] Ergo: has joined #RubyOnRails
[13:35:27] Macaveli: has joined #RubyOnRails
[13:36:00] IFrank00: tbuehlmann, yes Im looking on it
[13:38:36] pawnbox: has joined #RubyOnRails
[13:39:38] IFrank00: tbuehlmann, on the joins I need to do something with where task.section_id is == to and check each section.id ????
[13:39:57] viiralvx: has joined #RubyOnRails
[13:40:12] Cervajz_: has joined #RubyOnRails
[13:45:47] ElFerna: has joined #RubyOnRails
[13:46:04] tbuehlmann: IFrank00, I assume you have a json attribute on sections, that's why distinct won't work. try this: Section.joins(:tasks).select('DISTINCT ON (sections.id) sections.*')
[13:48:15] andreynering: has left #RubyOnRails: ()
[13:48:17] IFrank00: tbuehlmann, no good its still pulling every record
[13:48:37] IFrank00: and yes I have a json column in it
[13:48:37] Scripore: has joined #RubyOnRails
[13:48:51] tbuehlmann: every record that has at least one task, right?
[13:50:10] goodcodeguy: has joined #RubyOnRails
[13:50:15] dideler: has joined #RubyOnRails
[13:52:41] tbuehlmann: so.. that's what you wanted?
[13:53:32] droptone: Question: Has anyone ever leveraged a persistent music player on a Ruby on Rails site?
[13:53:42] maxz: has joined #RubyOnRails
[13:53:57] baweaver: has joined #RubyOnRails
[13:54:09] qurve: has joined #RubyOnRails
[13:55:02] qurve: Time.zone.now.utc.to_s(:iso8601) => "2015-12-15T13:52:39Z" / Time.zone.now.utc.to_s(:iso_8601) => "2015-12-15 13:52:39 UTC"
[13:55:20] qurve: I found that by accident blindly guessing at the symbol, why are they different?
[13:55:30] IFrank00: tbuehlmann, it give me all section :/ its weir as I can do Project.joins(:tasks) and it get it but if I try it with sections it won't :/
[13:55:37] ElectricAlan_: sevenseacat, so I think I built my location table wrong, I should have had a manager_id field, isntead of manager
[13:56:03] ElectricAlan_: because then I can use @location.manager and @location.manager_id right?
[13:56:29] tbuehlmann: IFrank00, check the generetade SQL query
[13:57:16] spiman: has joined #RubyOnRails
[13:57:38] spiman: is there a way to avoid renaming indexes when using rename_table in a migration?
[13:57:44] goodcodeguy: has joined #RubyOnRails
[13:57:47] cassioscabral: has joined #RubyOnRails
[13:57:53] droptone: So, conceptually, if you wanted to deploy a persistent music player, where the player was in the footer or header and the rest of the site was being reloaded via AJAX or some such
[13:58:00] droptone: Would that be possible in Rails?
[13:58:05] droptone: I'm getting the feeling no.
[13:58:21] lipoqil: has joined #RubyOnRails
[13:58:44] B1n4r10: has joined #RubyOnRails
[13:59:34] qurve: I can't think of any reason why you couldn't accomplish that in Rails.
[13:59:57] qurve: I'm not sure exactly how I'd do it, but Rails is pretty flexible.
[14:00:19] qurve: I think the big question would be the actual audio streaming, but I'm pretty confident a solution could be found.
[14:00:47] qurve: Service websites, and publishing/consuming API's over AJAX is a fairly common use-case.
[14:01:15] jhass: droptone: "single page app" is your buzzword
[14:02:00] jhass: go, research it
[14:02:17] tbuehlmann: droptone, that's relatively easy using turbolinks
[14:02:18] tbuehlmann: but I have a feeling there's a gotcha with html 5 audio players
[14:02:25] tbuehlmann: https://github.com/rails/turbolinks/issues/508
[14:02:26] yaewa: has joined #RubyOnRails
[14:02:26] jacobat_: has joined #RubyOnRails
[14:02:28] droptone: tbuehlmann: Persistent music players in the header or footer, such as the one foound on http://reverbnation.com, are pretty easy to deploy in Rails 4.2.x using Turbolinks?
[14:02:28] AzaToth: has joined #RubyOnRails
[14:02:30] droptone: Every time I've worked with Turbolinks I've completely disabled it within my Rails project due to it constantly causing issues.
[14:02:31] IFrank00: tbuehlmann, ok its working now can I do size or count on it ???
[14:02:33] tbuehlmann: IFrank00, tried it?
[14:02:54] tbuehlmann: droptone, using turbolinks 3 this is pretty easy, yes
[14:03:16] droptone: lol, thanks jhass.
[14:03:34] droptone: tbuehlmann: I'll look into that as well, thank you.
[14:04:27] ibouvousaime: has joined #RubyOnRails
[14:04:39] tbuehlmann: you want two things: 1) let turbolinks render and redirect from the controller 2) let the header/footer part be data-turbolinks-persistent
[14:06:49] tbuehlmann: permanent* rather
[14:09:22] Encapsulation: has joined #RubyOnRails
[14:09:48] akshat: has joined #RubyOnRails
[14:10:23] nyaa: has joined #RubyOnRails
[14:12:41] moei: has joined #RubyOnRails
[14:13:10] zpe: has joined #RubyOnRails
[14:14:15] ace05: has joined #RubyOnRails
[14:14:54] goodcodeguy: has joined #RubyOnRails
[14:15:19] Macaveli_: has joined #RubyOnRails
[14:15:25] jkamenik: has joined #RubyOnRails
[14:15:30] ramortegui: has joined #RubyOnRails
[14:16:05] Macaveli_: has joined #RubyOnRails
[14:16:21] atumzin: has joined #RubyOnRails
[14:16:22] atumzin: has joined #RubyOnRails
[14:16:52] atomical: has joined #RubyOnRails
[14:16:59] Macaveli_: has joined #RubyOnRails
[14:17:45] Macaveli: has joined #RubyOnRails
[14:17:50] tetraktys: has joined #RubyOnRails
[14:18:48] benhuda: has joined #RubyOnRails
[14:19:05] arup_r: I am using websocket to trigger events when sign in and sign out happened. I am using Devise. Looking for a callback/hook which will be called just before sign out. I tried `after_sign_out_path_for` which will not work, because when the method will be called the current_user will be `nil`. reason is makes sense. Here is my simple code after_sign_out_path_for .. What other alternatives I should try ? I can also trigger the the event inside t
[14:19:05] arup_r: he SessionController#destroy and then call super from my override controller destroy action. Dunno if it is a great idea or not.
[14:19:05] arup_r: gist: https://gist.github.com/aruprakshit/379f6b5e0a8e7d329b81
[14:19:22] nocontrol: has joined #RubyOnRails
[14:21:27] Bloomer: has joined #RubyOnRails
[14:21:28] hardtail: has joined #RubyOnRails
[14:23:36] zpe: has joined #RubyOnRails
[14:23:59] Verde`: has joined #RubyOnRails
[14:24:09] Verde`: has left #RubyOnRails: ()
[14:24:33] tlarevo: has joined #RubyOnRails
[14:26:08] qurve: Does it have to be before the sign in/out happens?
[14:26:15] qurve: If after you can take advantage of the yields: https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb#L28
[14:26:49] qurve: Basically, you extend the core SessionsController and implement def create; super do; // your code; end; end;
[14:27:02] qurve: I use this for hooking in analytics events in my systems, which is somewhat similar.
[14:27:24] qurve: Almost all device controller actions will yield at some point in their running.
[14:27:38] qurve: So you can hook in handlers without changing the overall behavior.
[14:27:50] arup_r: qurve: Yes I extended, I meant to use that in the destry action of the session controller and then call `super` .. This is the only way I see ..
[14:28:21] qurve: As long as you are OK with having your code run after the session is created/destroyed, that is the lowest-footprint way to do it in my experience.
[14:28:38] qurve: I use that technique to register event data to be sent to Google Tag Manager on sign in/sign out.
[14:29:27] arup_r: because for sig in I have hook.. and I used it and it worked. For sign out, I need to put the code in other place which is making me think about it more and more. But didn't get a another choice till now.
[14:29:37] thekingofbandit: has joined #RubyOnRails
[14:30:20] Macaveli: has joined #RubyOnRails
[14:31:44] arup_r: qurve: if I call that event publish code first and then do super as you said inside the controller, there is chance for any reason user didn't sign up, but my event hook published it which is wrong.. so devise helper after_sign_in_path_for is perfect to user..
[14:32:02] cassioscabral: has joined #RubyOnRails
[14:32:09] arup_r: use** but something for destroy is available but that is not helpful for my case ..
[14:32:20] qurve: arup_r: Yeah, it's not a 100% solution.
[14:32:35] arup_r: I am trying to keep the code in central .. but failed :)
[14:32:36] qurve: The sledgehamer solution is to just duplicate the code and change it as necessary.
[14:33:00] qurve: I've actually helped fix some of the device controller yielding code in the past, I want to do more in the future.
[14:33:08] qurve: I want to make it more flexible.
[14:33:17] chouhoul_: has joined #RubyOnRails
[14:33:57] arup_r: how to yield in case of #destroy .. without using super ? Or super is ok to use there.. Because we don't have hook
[14:34:21] qurve: Super is OK there because you're not doing anything else.
[14:34:24] qurve: You basically do this:
[14:34:30] arup_r: if somehow I can get the logged out user object alive in the after_sign_out_path, I could win the game :)
[14:34:40] qurve: Possibly.
[14:34:45] qurve: I unfortunately have to go, I'm sorry!
[14:34:56] arup_r: its ok.. thanks qurve
[14:35:00] qurve: The super/yield trick is the best one I know without completely replacing the code.
[14:35:22] arup_r: yes,, super understood,, how to yield in the controller action I dunno
[14:35:35] shanemcd: has joined #RubyOnRails
[14:35:47] chrisarcand: has joined #RubyOnRails
[14:35:54] arup_r: yield looks clean.. but need to check ..
[14:36:30] doodlehaus: has joined #RubyOnRails
[14:39:32] shanemcd: has joined #RubyOnRails
[14:40:55] nomadicoder: has joined #RubyOnRails
[14:41:13] nettoweb: has joined #RubyOnRails
[14:43:29] stannard: has joined #RubyOnRails
[14:46:22] Axilla: man, i just spun my wheels for like 6hrs trying to count the assets returned by a thinking sphinx search...
[14:46:43] Axilla: .count on the array would return the total number of assets matching the search not the amount actually in the array...
[14:46:56] Axilla: if I did say limit 10
[14:47:23] Axilla: >< note to self.. .size
[14:48:00] bungoman: has joined #RubyOnRails
[14:49:29] polishdub: has joined #RubyOnRails
[14:49:47] uris: has joined #RubyOnRails
[14:50:22] mdel: has joined #RubyOnRails
[14:50:39] mary5030: has joined #RubyOnRails
[14:50:42] thekingofbandit: has joined #RubyOnRails
[14:51:02] shibabu: has joined #RubyOnRails
[14:51:17] mary5030: has joined #RubyOnRails
[14:51:39] IFrank00: quick question if I have a float like this 4.60 how can I use it as hours/mins so when the float get 4.60 round it to 5
[14:52:49] Axilla: why not just use time?
[14:54:18] _Tariq: has joined #RubyOnRails
[14:56:48] skullcrasher: for frontend asset management, what would you recommend? bower-rails gem or the "rails-assets way"?
[14:57:12] pulgolino: has joined #RubyOnRails
[14:57:24] flashpoint9: has joined #RubyOnRails
[14:57:31] kuroro: has joined #RubyOnRails
[14:58:18] mag42c: has joined #RubyOnRails
[14:59:27] FLeiXiuS: has joined #RubyOnRails
[14:59:28] FLeiXiuS: has joined #RubyOnRails
[15:00:19] The_Phoenix: has joined #RubyOnRails
[15:00:59] neredsenvy: has joined #RubyOnRails
[15:02:26] lacrymology: has joined #RubyOnRails
[15:02:29] momomomomo: has joined #RubyOnRails
[15:02:44] neredsenvy: Is there a clean way of doing conditional validation in RoR
[15:03:26] Macaveli_: has joined #RubyOnRails
[15:03:41] flashpoint9: has joined #RubyOnRails
[15:06:21] elaptics: neredsenvy: This is the typical way you'd do it: validates :foobar, presence: true, if: Proc.new { |record| record.validate_presence_if_this_returns_true? }
[15:06:50] elaptics: neredsenvy: there's other options that the docs explain, and there are custom validator objects you can create if you have particularly complex requirements
[15:07:38] neredsenvy: I looked at it all seems kinda messy
[15:08:10] boxofrox: has joined #RubyOnRails
[15:08:13] HalcyonicStorm: has joined #RubyOnRails
[15:09:48] elaptics: neredsenvy: messy how?
[15:11:57] ElFerna: has joined #RubyOnRails
[15:12:07] maesitos: has joined #RubyOnRails
[15:12:41] shanemcd: has joined #RubyOnRails
[15:12:59] adre: has joined #RubyOnRails
[15:15:00] IFrank00: axilla, how can a Use time on a String "3.3"
[15:18:27] neredsenvy: elaptics, I'm getting adjusted coming from Laravel
[15:18:59] dionysus69: has joined #RubyOnRails
[15:19:00] IFrank00: axilla, Im sum all the task work hours that the user enter like this (value.map(&:estimated_hrs).map(&:to_f).sum ).round(2) this get me a float like this [3.3,2.5,3] so I ca display it on a graph. but my only problem is when a num get to .60 I like to round it to 1
[15:19:04] neredsenvy: I was hoping since Lara takes a lot from RoR that RoR had conditional validation sorted in a similar manner
[15:19:32] elaptics: neredsenvy: I'm not familiar with laravel - is there a convenient doc I could look at to compare?
[15:20:22] adavia: has joined #RubyOnRails
[15:20:23] hobodave: has joined #RubyOnRails
[15:21:13] alex88: has joined #RubyOnRails
[15:22:35] elaptics: IFrank00: (4.6).round(0) #=> 5.0
[15:22:56] shanemcd_: has joined #RubyOnRails
[15:23:21] elaptics: IFrank00: not sure I understand why you want to round 4.6 to 5 though? Are you rounding all numbers up or down the same?
[15:23:23] nickenchuggets: has joined #RubyOnRails
[15:23:23] nickenchuggets: has joined #RubyOnRails
[15:23:32] elaptics: i.e. 4.4 would round down to 4?
[15:24:04] elaptics: also, not sure why your estimated_hrs are strings in the first place?
[15:24:17] rgtk: has joined #RubyOnRails
[15:25:45] phantummm: has joined #RubyOnRails
[15:26:40] neredsenvy: elaptics, http://laravel.com/docs/5.1/validation#form-request-validation
[15:26:59] ElectricAlan_: I'm programming a many to many relationship between users and programs, I want the users edit view to list programs they are enrolled in, and the programs edit view to list users enrolled in it, I also want to be able to add or delete records in either edit view
[15:27:11] ElectricAlan_: the getting started guide didn't really handle relationships like I wanted
[15:27:27] ElectricAlan_: cna anyone suggest a suitable guide I can follow to learn how to do this?
[15:27:35] tubbo: ElectricAlan_: !associations might help, has some info on has_many :through and has_and_belongs_to_many
[15:27:35] helpa: ElectricAlan_: http://guides.rubyonrails.org/association_basics.html - Active Record Association Basics by Mike Gunderloy
[15:27:36] neredsenvy: There a option of inmodel validation similar to Rails and ofc Validator class but Requests are prefered. Since a lot of times you have different validation for say new/update and admin section.
[15:27:38] IFrank00: elaptics, I only what to round if its .6 or higher as its for time 4hours and the .60mins
[15:28:47] chouhoulis: has joined #RubyOnRails
[15:29:00] elaptics: IFrank00: so, you're storing an hours and minutes as hours being the number before the point and minutes after? E.g. 3.3 is actually 3 hours and 30 minutes?
[15:29:38] ElectricAlan_: I think my model is how I want it, my issue is something else
[15:29:41] tubbo: neredsenvy: you can replace the `if:` in that validates call with a method, so `validates :whatever, presence: true, if: :condition?`
[15:29:44] tubbo: looks a lil better to me
[15:30:04] tubbo: neredsenvy: alternatively, if your validations are really complicated you can just make your own validation method: `validate :whatever_is_valid`
[15:30:31] tubbo: or, you can create a Validator object called e.g. UrlValidator and then use it in your model like `validates :link, presence: true, url: true`
[15:30:33] ElectricAlan_: tubbo, I have a tab on the users form for programs, there I want to list all the current ones with an option to delete, and a button at the top to add a new record
[15:30:39] ElectricAlan_: my question is about that button
[15:30:54] elaptics: neredsenvy: I take the approach of creating a form object with the validations needed for that form, then simply use the validated form data to just create/update the AR models
[15:30:55] neredsenvy: Well might as well adopt it no point in fighting it. If I want a raise : )
[15:31:45] neredsenvy: elaptics, That sounds neat. Can you link an example/doc/tut ?
[15:32:11] flashpoint9: has joined #RubyOnRails
[15:33:10] spiman_: has joined #RubyOnRails
[15:33:36] elaptics: neredsenvy: http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/ look at number 3
[15:33:51] smathy: has joined #RubyOnRails
[15:33:58] ElectricAlan_: tubbo, does a link like this make sense? <%= link_to 'Add Program', new_user_program_path, class:"btn btn-default" %>
[15:34:08] eichenwald: has joined #RubyOnRails
[15:34:23] elaptics: neredsenvy: it's a little dated since Rails 4 tidied up the multiple extend/includes but the principles there are what I usually do
[15:34:44] ElectricAlan_: I'm gonna have to use ajax or something I'd expect if I want to be able to add or delete programs while I'm editing a user
[15:34:49] agoldboi: has joined #RubyOnRails
[15:35:11] elaptics: neredsenvy: I've actually just started using a gem called veto instead of the Active model ones https://github.com/kodio/veto
[15:35:14] neredsenvy: elaptics, Thanks
[15:36:04] tubbo: ElectricAlan_: i suppose you're doing a nested form and you want to add nested resources? it's a bit of an oldie but still a goodie, https://github.com/ryanb/nested_form, this is what i use when i need to solve that problem because it comes with the JS, view helpers and form builder extensions that you need to get nested forms working without a page refresh.
[15:36:26] ElectricAlan_: nested form sounds exactly what I want
[15:36:28] tubbo: ElectricAlan_: rails does provide *some* stuff for you there, but it doesn't solve the problem of e.g. how you build the "Add" and "Remove" buttons
[15:36:44] ElectricAlan_: tubbo, you never fail to please me
[15:37:57] IFrank00: elaptics, yes
[15:37:58] Xentil: has joined #RubyOnRails
[15:39:53] Xentil: has joined #RubyOnRails
[15:40:18] ibouvousaime: has joined #RubyOnRails
[15:40:43] Xentil: has joined #RubyOnRails
[15:41:26] elaptics: IFrank00: that seems a bit confusing. Would users know to enter time like that? i.e. logging 3 hours 5 minutes would be 3.05
[15:42:37] teclator: has joined #RubyOnRails
[15:42:41] IFrank00: elaptics, whats a better approach
[15:43:13] JohnBat26: has joined #RubyOnRails
[15:43:17] ElectricAlan_: tubbo, so are nested forms outdated then? or is it jsut that they don't come up all that often
[15:43:29] n008f4g_: has joined #RubyOnRails
[15:43:52] ElectricAlan_: in some of hte previous jobs I've had, we had to do that all the time, on a bunch of different projects
[15:44:42] arup_r: has joined #RubyOnRails
[15:48:04] rubyonrailed: has joined #RubyOnRails
[15:48:27] artto: has joined #RubyOnRails
[15:49:20] jkamenik: has joined #RubyOnRails
[15:49:25] tubbo: ElectricAlan_: no they're not outdated, what makes you say that?
[15:50:43] ElectricAlan_: you said it's an oldie
[15:50:52] ElectricAlan_: guess you also said it's still a goodie
[15:51:07] atumzin: has joined #RubyOnRails
[15:51:07] atumzin: has joined #RubyOnRails
[15:51:20] Aherin: has joined #RubyOnRails
[15:51:56] tubbo: ElectricAlan_: just because something's old doesn't mean you throw it away ;)
[15:52:29] tubbo: if anything, gems that have survived multiple versions of rails wherein nobody felt like the problem was bad enough to re-solve...in my book that's a mark of success.
[15:53:24] mrbubbles: has joined #RubyOnRails
[15:53:25] benhuda: has joined #RubyOnRails
[15:53:56] mrbubbles: good afternoon
[15:54:56] zpe: has joined #RubyOnRails
[15:55:04] baweaver: has joined #RubyOnRails
[15:56:37] asda: has joined #RubyOnRails
[15:57:07] asda: has left #RubyOnRails: ()
[16:00:03] FooMunki: has joined #RubyOnRails
[16:02:27] ElectricAlan_: tubbo, yeah you make a compelling point
[16:02:42] ElectricAlan_: mrbubbles, 2am from my perspective, but hello nonetheless
[16:06:56] rgtk: has joined #RubyOnRails
[16:07:42] _Tariq: has joined #RubyOnRails
[16:07:54] hobodave: has joined #RubyOnRails
[16:08:02] theblang: has joined #RubyOnRails
[16:09:17] arup_r: has joined #RubyOnRails
[16:11:20] banister: has joined #RubyOnRails
[16:15:36] ace05: has joined #RubyOnRails
[16:16:11] doodlehaus: has joined #RubyOnRails
[16:19:37] YankNYC: has joined #RubyOnRails
[16:20:19] YankNYC: Hey for the life of me I can't figure out why I can't target this element with capybara. here is the code with debug and html https://gist.github.com/genericlady/54a83f4e3f9b6553b10a
[16:21:00] akshat: has joined #RubyOnRails
[16:21:07] goodcodeguy: has joined #RubyOnRails
[16:21:36] dici: has joined #RubyOnRails
[16:21:53] YankNYC: i've tried the id and it still won't target the element. at first I thought it had to do with not logging in so I worked that out but don't know why it won't work. I'm using Devise with CanCanCan don't know if that would make a difference
[16:21:54] sucks: has joined #RubyOnRails
[16:22:14] _Tariq: has joined #RubyOnRails
[16:22:30] StevenXL: has joined #RubyOnRails
[16:22:31] StevenXL: has joined #RubyOnRails
[16:25:36] _Tariq: has joined #RubyOnRails
[16:27:46] hobodave: has joined #RubyOnRails
[16:30:04] tubbo: YankNYC: when that happens to me, i do a pseudo-"wait for xhr" by running an expectation for that content
[16:30:08] _Tariq: has joined #RubyOnRails
[16:30:09] tubbo: like expect(page).to have_content('Title')
[16:30:12] chadhs: has joined #RubyOnRails
[16:30:17] tubbo: sometimes it works, sometimes Capybara sucks.
[16:30:55] adre: has joined #RubyOnRails
[16:31:47] YankNYC: omg haha then why am i not using minitest
[16:32:34] YankNYC: going through Rails 4 test prescriptions and giving RSpec a shot. I'll try expect
[16:32:52] tubbo: YankNYC: use whatever makes you feel more comfortable :)
[16:33:05] tubbo: YankNYC: fwiw...capybara is still capybara regardless of what underlying test framework you use. it doesn't get much better.
[16:33:21] bronson: has joined #RubyOnRails
[16:33:32] ascarter: has joined #RubyOnRails
[16:34:09] maxz: has joined #RubyOnRails
[16:35:23] jhass: tbf it's actually the underlying drivers that suck
[16:35:41] jhass: especially selenium
[16:35:45] YankNYC: looking at selenium.. maybe i'll use that the next project over capybara.
[16:36:01] jhass: YankNYC: huh, so you use the poltergeist backend atm?
[16:36:02] Yomero3: has joined #RubyOnRails
[16:36:09] tubbo: YankNYC: capybara's just a DSL. it uses (selenium || poltergeist |)
[16:36:16] tubbo: YankNYC: capybara's just a DSL. it uses (selenium || poltergeist || INSERT_DRIVER_HERE), but it's just a DSL*
[16:36:31] _Tariq: has joined #RubyOnRails
[16:36:32] pipework: was gonna correct the tubbalubbadingdong.
[16:36:57] pipework: ACTION makes a lynx capybara driver
[16:37:05] queequeg2: has joined #RubyOnRails
[16:38:00] pipework: tubbo: There's way too much to do and never enough booze to do it with. :(
[16:38:01] elaptics: IFrank00: sorry, got called away. Depends on what exactly the app does but I'd have thought something like 5h 10m might be a simple way, or otherwise just treating it as a decimal of time (though I think that might be as confusing for users) Your UI design probably should play a part in it, like it might be better if you had separate inputs for hours and minutes - you could provide combobox like functionality to autocomplete
[16:38:01] elaptics: entries to make it easier to enter, e.g. defaulting to 5 minute increments in a minutes box
[16:38:46] wviana: has joined #RubyOnRails
[16:40:56] YankNYC: this error is weird
[16:41:18] pipework: It's more afraid of you than you are of it.
[16:41:48] YankNYC: i think I implemented cancancan and devise too early. I should have used TDD from the start
[16:43:04] YankNYC: https://gist.github.com/genericlady/2717d3232ecced138554
[16:43:33] bratsche: has joined #RubyOnRails
[16:43:49] YankNYC: maybe i should write some integration tests first before attempting to test creating a resource
[16:43:52] IFrank00: elaptics, yes on the UI part is not a problem my problem is more on how to handle the data. so if I use 2 inputs how can I work my problem
[16:44:11] YankNYC: or start the project over using tdd from the beginning lol
[16:44:29] tubbo: YankNYC: ah, so now you have uncovered the truth :) that's why i try to 'wait' for the content to appear, it typically tells you a lot more about the real problem you're having.
[16:45:18] elaptics: IFrank00: hard to advise without knowing more, but in the simplest sense it's as easy as just storing them separately in the model/db, e.g. estimated_hours and estimated_minutes
[16:45:46] _Tariq: has joined #RubyOnRails
[16:46:01] jbrhbr: has joined #RubyOnRails
[16:46:11] meoblast001: has joined #RubyOnRails
[16:46:20] ElectricAlan_: tubbo, or anyone who has an idea, I have followed the example to set up my form, but I'm getting an error
[16:46:21] ElectricAlan_: http://pastie.org/10634212
[16:46:47] tubbo: ElectricAlan_: google "accepts_nested_attributes_for"
[16:46:52] elaptics: IFrank00: you can then create a method which can output combined data as a decimal or something for graphing purposes, and then your original problem is just a matter of summing the hours and the minutes
[16:47:00] Cache_Money: has joined #RubyOnRails
[16:47:01] ElectricAlan_: do I have to add "accepts_nested_attributes_for" on the program model too?
[16:48:18] YankNYC: Tubbo maybe I should restart the project using tdd.. fill in basic layout first, build basic user model and resources with tests. then implement auth about 75% into project.
[16:48:55] goodcodeguy: has joined #RubyOnRails
[16:49:15] IFrank00: elaptics, yes that the main and only problem that I have the summing of hours and mins.
[16:49:52] IFrank00: elaptics, I have to look more on that subject
[16:50:10] elaptics: IFrank00: if they're stored in the db then it's simple - active record even has sum methods which will sum them using the database
[16:51:47] FooMunki: has joined #RubyOnRails
[16:51:51] deception1: has joined #RubyOnRails
[16:53:05] lxsameer: has joined #RubyOnRails
[16:53:06] lxsameer: has joined #RubyOnRails
[16:54:23] bmalum: has joined #RubyOnRails
[16:54:28] shibabu: has joined #RubyOnRails
[16:55:00] ElectricAlan_: tubbo, I have read as much as I can find, and from what I can tell my code should be acceptable
[16:55:24] ElectricAlan_: I do make a point to try and solve all my problems on my own as much as reasonably possible
[16:55:53] eichenwald: has left #RubyOnRails: ("WeeChat 1.1.1")
[16:56:01] tubbo: ElectricAlan_: in f.link_to_add, i think that's supposed to be :programs. it's looking for an association called :program which you don't have.
[16:57:01] ElectricAlan_: classic pluralization mistake
[16:57:08] emrox: has joined #RubyOnRails
[16:57:47] tubbo: yeah, i didn't even catch it at first...thought your model just didn't have that defined
[16:57:58] tubbo: imho accepts_nested_attributes_for is kind-of a pointless relic from the "fat model" era of rails
[16:58:09] tubbo: like i'm not sure why i have to tell AR "here are the params i am nesting"
[16:58:23] wmdrossard: has joined #RubyOnRails
[17:04:56] squaresurf: has joined #RubyOnRails
[17:06:29] phantummm: has joined #RubyOnRails
[17:07:32] squaresurf: How do I join the Rails mailing list that discusses Rails framework development, such as architecture decisions for rails 5 etc. I'm currently a part of the rubyonrails-talk group, but it feels more like a help forum.
[17:07:58] ElectricAlan_: ok, so this looks good, my next step is to make the text field a select, and also get the record to save
[17:10:03] edwinvdgraaf: has joined #RubyOnRails
[17:10:11] YankNYC: tubbo thnks for helping with the debugging btw
[17:11:42] i56yards: has joined #RubyOnRails
[17:12:40] hardtail: has joined #RubyOnRails
[17:14:42] maesitos: has joined #RubyOnRails
[17:16:23] ace05: has joined #RubyOnRails
[17:16:45] [Butch]: has joined #RubyOnRails
[17:17:53] i56yards: has joined #RubyOnRails
[17:18:04] tubbo: squaresurf: is that a mailing list? i thought there was just a private campfire room amongst the developers.
[17:18:40] tubbo: the future of rails architecture isn't a democracy...that's why so many people complain every time rails adds something to their feature set.
[17:18:41] ornerymoose: has joined #RubyOnRails
[17:19:10] matthewd: Yeah, there's a rubyonrails-core mailing list -- though it's true that it's not particularly active, people do read it
[17:19:50] rakm: has joined #RubyOnRails
[17:19:59] smathy: The architecture decisions for Rails 5 have all been made.
[17:20:35] JDeen: has joined #RubyOnRails
[17:20:50] B1n4r10: has joined #RubyOnRails
[17:21:07] matthewd: squaresurf: There's also #rails-contrib
[17:21:54] ElFerna: has joined #RubyOnRails
[17:21:59] tubbo: matthewd: that channel is pretty inactive, it's basically just a build feed :P
[17:22:15] squaresurf: I mainly want to read along.
[17:22:30] squaresurf: I also remember reading about a list that you should post new feature ideas to before starting work on them.
[17:22:46] squaresurf: So you don't waste your time :)
[17:22:47] matthewd: tubbo: That is.. not untrue :)
[17:23:12] shanemcd: has joined #RubyOnRails
[17:23:18] matthewd: squaresurf: Either of the above would be sufficient for that
[17:23:23] squaresurf: http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#what-about-feature-requests-questionmark
[17:23:29] squaresurf: Mentions the core list.
[17:23:32] squaresurf: Thank you all.
[17:23:36] matthewd: Or you can describe it here, and I can tell you why you can't have it ;)
[17:23:58] squaresurf: Don't have anything at the moment, just want to get more involved by following along first.
[17:24:15] chadhs: has joined #RubyOnRails
[17:25:27] matthewd: The reality is that most real discussion happens on PRs
[17:25:27] febuiles: has joined #RubyOnRails
[17:25:28] Sawbones: has joined #RubyOnRails
[17:26:04] matthewd: Campfire isn't as quiet as IRC / the mailing list, but it isn't particularly active
[17:26:56] tubbo: matthewd: in the case of actioncable, though, nobody on the team talked about that before it was announced right?
[17:28:28] matthewd: tubbo: David mentioned that it existed, in campfire, twice over the course of a few months while it was being developed
[17:28:46] matthewd: tubbo: I participated in said conversations, and had completely forgotten about it when he announced it
[17:28:49] cassioscabral: has joined #RubyOnRails
[17:28:50] tubbo: haha cool
[17:29:06] matthewd: https://twitter.com/tenderlove/status/590523196304142336 <-- not a joke
[17:29:26] tubbo: matthewd: it's *really* difficult to tell when tenderlove is joking sometimes haha
[17:29:33] tubbo: s/is/isn't
[17:29:55] _Tariq: has joined #RubyOnRails
[17:30:39] nyaa: has joined #RubyOnRails
[17:31:05] mloy: has joined #RubyOnRails
[17:31:48] snoozelose: has joined #RubyOnRails
[17:32:57] thezanke: has joined #RubyOnRails
[17:34:42] rgtk: has joined #RubyOnRails
[17:35:50] _Tariq: has joined #RubyOnRails
[17:38:29] markh: has joined #RubyOnRails
[17:38:41] doodlehaus: has joined #RubyOnRails
[17:40:24] maxz: has joined #RubyOnRails
[17:44:13] Scripore: has joined #RubyOnRails
[17:44:45] sleungcy: has joined #RubyOnRails
[17:44:45] _Tariq: has joined #RubyOnRails
[17:46:34] pipework: tubbo: If you just laugh all the time, does it matter?
[17:46:35] _Tariq: has joined #RubyOnRails
[17:48:05] _Tariq: has joined #RubyOnRails
[17:48:45] doodlehaus: has joined #RubyOnRails
[17:49:14] sleungcy: has joined #RubyOnRails
[17:50:03] claytonzaugg: has joined #RubyOnRails
[17:50:10] nocontrol: has joined #RubyOnRails
[17:50:25] _Tariq: has joined #RubyOnRails
[17:51:17] ElFerna: has joined #RubyOnRails
[17:53:31] netzfisch: has joined #RubyOnRails
[17:54:24] pramsky: has joined #RubyOnRails
[17:55:55] baweaver: has joined #RubyOnRails
[17:56:13] ixti: has joined #RubyOnRails
[17:56:32] badoo: has joined #RubyOnRails
[17:57:22] DukeDave: Heh, I remember that at RailsConf :D
[17:58:38] Sawbones: has joined #RubyOnRails
[17:59:02] B1n4r10: has joined #RubyOnRails
[17:59:35] nereds: has joined #RubyOnRails
[17:59:36] goodcodeguy: has joined #RubyOnRails
[18:00:08] badoo: Hi, I have a simple question. I'm using the globalize gem. Let's say I'm currently using the spanish locale but I want to retrieve the original post title (with the default locale in english for example) in a specific case how can I do that ?
[18:00:47] bensarz: has joined #RubyOnRails
[18:00:52] rakm: has joined #RubyOnRails
[18:01:02] badoo: (post.title isnt a good example actually let's say a post category)
[18:02:14] xardion_: has joined #RubyOnRails
[18:05:28] kuroro: has joined #RubyOnRails
[18:10:31] jbrhbr: has joined #RubyOnRails
[18:12:09] juddey: has joined #RubyOnRails
[18:13:00] hahuang65: has joined #RubyOnRails
[18:15:24] Macaveli: has joined #RubyOnRails
[18:15:29] baweaver: has joined #RubyOnRails
[18:15:51] colleenmcguckin: has joined #RubyOnRails
[18:16:59] momomomomo: has joined #RubyOnRails
[18:17:13] shanemcd: has joined #RubyOnRails
[18:18:12] bronson: has joined #RubyOnRails
[18:20:34] IFrank00: has joined #RubyOnRails
[18:20:59] bigbob: has joined #RubyOnRails
[18:21:57] benhuda: has joined #RubyOnRails
[18:23:00] shanemcd: has joined #RubyOnRails
[18:24:42] jbrhbr: has joined #RubyOnRails
[18:25:08] markh: has joined #RubyOnRails
[18:25:17] Frem: has joined #RubyOnRails
[18:27:19] tenderlove: has joined #RubyOnRails
[18:28:17] King_Rex: has joined #RubyOnRails
[18:28:27] bigbob: has joined #RubyOnRails
[18:28:51] mikecmpbll: has joined #RubyOnRails
[18:29:01] King_Rex: can anyone assist me w/ puma and nginx deployment issue?
[18:29:05] [Butch]: has joined #RubyOnRails
[18:30:24] ewnd9_: has joined #RubyOnRails
[18:30:45] pipework: King_Rex: describe the issue here for whomever might be able to help
[18:31:32] King_Rex: http://dpaste.com/2QWF39V this is my puma.rb
[18:31:59] baweaver: has joined #RubyOnRails
[18:32:53] King_Rex: I'm not sure if it needs modified, and nginx config is generally confusing me, for example wher eshould puma.sock go?
[18:33:05] pipework: King_Rex: literally anywhere.
[18:33:13] pipework: By default, in the usual place for sockets in your OS.
[18:33:21] pipework: /var/run for some
[18:33:24] snoozelose: has joined #RubyOnRails
[18:34:17] snoozelose: has joined #RubyOnRails
[18:34:21] colleenmcguckin: has joined #RubyOnRails
[18:35:50] nertzy: has joined #RubyOnRails
[18:35:52] King_Rex: yeah, I'm getting a 502 bad gateway error and nginx will not restart?
[18:35:57] tortle: has joined #RubyOnRails
[18:36:43] snoozelose: has joined #RubyOnRails
[18:36:43] dionysus69: has joined #RubyOnRails
[18:37:21] doodlehaus: has joined #RubyOnRails
[18:37:36] srinidhi: has joined #RubyOnRails
[18:38:06] flashpoint9: Im trying to setup some tests for devise but im getting errors, http://paste.ofcode.org/37BzSVAJE4wn4MDh3ENfmSs thats the test, the error is saying that NoMethodError: undefined method `visit'. I tried lot's of google fixes but nothing is working.
[18:39:48] hardtail: has joined #RubyOnRails
[18:40:17] flashpoint9: that test is inside spec/requests too
[18:40:46] juddey: has joined #RubyOnRails
[18:41:06] ElFerna: has joined #RubyOnRails
[18:41:45] brunoalano: has joined #RubyOnRails
[18:42:28] jbrhbr: has joined #RubyOnRails
[18:43:08] mag42c_: has joined #RubyOnRails
[18:43:10] tubbo: flashpoint9: not sure if request specs come with capybara by default
[18:43:12] flashpoint9: I got it, needed `require 'rails_helper'` in the top of the test
[18:43:15] nettoweb: has joined #RubyOnRails
[18:43:20] tubbo: flashpoint9: oh yeah deffo :)
[18:43:25] jsrn_: has joined #RubyOnRails
[18:43:28] flashpoint9: tubbo: thanks
[18:46:23] steffkes: has joined #RubyOnRails
[18:48:42] Aherin: has joined #RubyOnRails
[18:48:50] tfitts: anyone ever used ZBar? It's supposed to scan jpegs for barcode data. I'm trying to just load and scan their test image and it says it contains no image.
[18:50:43] jstransky: has joined #RubyOnRails
[18:56:25] berserk_ren: has joined #RubyOnRails
[18:58:34] shibabu: has joined #RubyOnRails
[18:58:38] antgel: has joined #RubyOnRails
[18:59:01] podman: has joined #RubyOnRails
[19:00:22] hardtail: has joined #RubyOnRails
[19:00:34] hobodave: has joined #RubyOnRails
[19:01:00] norc: has joined #RubyOnRails
[19:01:14] ascarter: has joined #RubyOnRails
[19:01:25] doodlehaus: has joined #RubyOnRails
[19:01:44] LambdaSource: has joined #RubyOnRails
[19:07:04] nettoweb: has joined #RubyOnRails
[19:09:08] tenderlove: has joined #RubyOnRails
[19:11:28] ace05: has joined #RubyOnRails
[19:11:45] norc: Hi. I have the need to generate various graphs with different parameters for some model. Im thinking of doing a non-restful controller that responds to actions like:
[19:12:30] norc: PortGraphController#current_rates, PortGraphController#errors, etc
[19:13:23] norc: Is this fine? Is there a restful way of doing this?
[19:13:45] pipework: norc: Why not just do a #show with different querystrings?
[19:13:49] yos7ph: has joined #RubyOnRails
[19:14:07] maesitos: has joined #RubyOnRails
[19:14:10] baweaver: has joined #RubyOnRails
[19:14:29] pipework: case params[:disposition]; when :current_rates then CurrentRateGraph.new(graph_params); etc.
[19:14:35] pipework: Or whatever.
[19:15:13] norc: pipework: I do different queries in the backend, depending on the chart I need to generate (some do some aggretions, others not)
[19:15:57] pipework: Don't assume that one query is one endpoint or anything silly like that.
[19:16:38] gaustin: has joined #RubyOnRails
[19:17:55] netzfisch: has joined #RubyOnRails
[19:18:56] shanemcd: has joined #RubyOnRails
[19:19:22] apotry: has joined #RubyOnRails
[19:20:13] ElFerna: has joined #RubyOnRails
[19:21:09] norc: has joined #RubyOnRails
[19:23:17] ElFerna: has joined #RubyOnRails
[19:24:16] shanemcd: has joined #RubyOnRails
[19:24:45] momomomomo: has joined #RubyOnRails
[19:24:55] Sigfrid: has joined #RubyOnRails
[19:26:16] jmrepetti: has joined #RubyOnRails
[19:26:23] Cohedrin: has joined #RubyOnRails
[19:28:03] pwnd_nsfw: has joined #RubyOnRails
[19:28:23] solars: has joined #RubyOnRails
[19:33:14] cassioscabral_: has joined #RubyOnRails
[19:34:24] kadoppe: has joined #RubyOnRails
[19:34:31] ur5us: has joined #RubyOnRails
[19:35:44] Zamerick: has joined #RubyOnRails
[19:40:17] kuroro: has joined #RubyOnRails
[19:40:49] ElFerna: has joined #RubyOnRails
[19:41:51] B1n4r10: has joined #RubyOnRails
[19:42:53] momomomomo: has joined #RubyOnRails
[19:44:06] emrox: has joined #RubyOnRails
[19:45:30] goodcodeguy: has joined #RubyOnRails
[19:46:10] xardion: has joined #RubyOnRails
[19:46:11] King_Rex: has joined #RubyOnRails
[19:46:15] centrx: has joined #RubyOnRails
[19:47:41] febuiles: has joined #RubyOnRails
[19:50:02] Aherin: has joined #RubyOnRails
[19:51:15] Pumukel: has joined #RubyOnRails
[19:52:36] renegadeandy: has joined #RubyOnRails
[19:53:19] treehug88: has joined #RubyOnRails
[19:54:24] ql6wlld: has joined #RubyOnRails
[19:56:35] baweaver: has joined #RubyOnRails
[19:58:53] blackmesa: has joined #RubyOnRails
[19:59:32] ace05: has joined #RubyOnRails
[20:00:16] pawnbox: has joined #RubyOnRails
[20:01:27] manfrin: has joined #RubyOnRails
[20:03:04] speakingcode: has joined #RubyOnRails
[20:04:40] momomomomo: has joined #RubyOnRails
[20:05:05] maesitos: has joined #RubyOnRails
[20:05:21] JohnBat26: has joined #RubyOnRails
[20:09:00] ascarter: has joined #RubyOnRails
[20:09:12] shanemcd: has joined #RubyOnRails
[20:09:55] nickenchuggets: has joined #RubyOnRails
[20:10:36] deception1: has joined #RubyOnRails
[20:11:14] nickenchuggets: has joined #RubyOnRails
[20:11:50] badoo: has joined #RubyOnRails
[20:12:09] leofrozenyogurt: has joined #RubyOnRails
[20:12:24] alevy: has joined #RubyOnRails
[20:12:28] leofrozenyogurt: hey all quick question. Has anyone implemented merchant parellel payments or found a merchants tax info from paypal
[20:13:00] pawnbox: has joined #RubyOnRails
[20:13:03] flashpoint9: I have a model Location and devise model User, I already ran migrations. I added relationships of User has_many Locations, Location belongs to User. I want to add the user column on trips, the migration I want to run is: rails g migration AddUserToTrips user:references. Will this work after I rake db migrate?
[20:13:10] jbrhbr: has joined #RubyOnRails
[20:13:12] tubbo: leofrozenyogurt: i have no idea what "merchant parallel payments" means. could you explain that in a little more detail?
[20:13:25] tubbo: flashpoint9: !try
[20:13:25] helpa: flashpoint9: Why don't you try it and find out for yourself?
[20:13:46] nickenchuggets: has joined #RubyOnRails
[20:14:24] leofrozenyogurt: tubbo: sure ill shoot over a link
[20:14:33] flashpoint9: tubbo: right you are, been a year off from rails and I seem to remember rails g migration being a move that can cause a lot of headaches, ill try it, just a little worried since its my first add migration since way back
[20:14:46] leofrozenyogurt: https://developer.paypal.com/docs/classic/express-checkout/ht_ec-parallelPayments/
[20:15:01] tubbo: flashpoint9: hey no worries, you can always rake db:rollback if it fucks up. also, i would highly suggest `cat`ing your migration so you can see its contents before running & generating it
[20:15:07] leofrozenyogurt: tubbo: it seems like paypal doesnt support it in its sdk https://paypal-sdk-samples.herokuapp.com/merchant/set_express_checkout
[20:15:29] tubbo: flashpoint9: but just so you know, what you got there *should* work as long as there's a trips table.
[20:15:37] flashpoint9: tubbo: ah right i forgot about db:rollback!
[20:15:58] trautwein: has joined #RubyOnRails
[20:16:02] tubbo: flashpoint9: we must give thanks to db:rollback, saviour of developer jobs
[20:16:10] tubbo: messiah of not getting fired
[20:17:55] eytanfb: has joined #RubyOnRails
[20:19:07] steffkes: has joined #RubyOnRails
[20:19:07] steffkes: has joined #RubyOnRails
[20:20:31] leofrozenyogurt: heroku rollback
[20:21:10] hardtail: has joined #RubyOnRails
[20:22:25] tubbo: leofrozenyogurt: man i wish bandcamp had that
[20:22:37] tubbo: leofrozenyogurt: wait, i think they do...you have to complete checkout twice. it sucks.
[20:22:39] andrew-l: or even life! :-)
[20:22:42] tubbo: or N times
[20:22:56] Sawbones: has joined #RubyOnRails
[20:23:21] wasane: has joined #RubyOnRails
[20:23:51] yfeldblum: has joined #RubyOnRails
[20:25:20] baweaver: has joined #RubyOnRails
[20:26:40] jkamenik: has joined #RubyOnRails
[20:27:46] ElFerna: has joined #RubyOnRails
[20:27:56] rubyonrailed: has joined #RubyOnRails
[20:28:09] ascarter: has joined #RubyOnRails
[20:29:43] shanemcd: has joined #RubyOnRails
[20:30:25] jmphotm: has joined #RubyOnRails
[20:31:33] ElFerna: has joined #RubyOnRails
[20:31:54] solars: for facebook and google auth, is devise the way to go? (it seems a bit complicated to set up)
[20:32:25] jmphotm: hey there. anyone using Grape for apis?
[20:32:42] andrew-l: jmphotm: i don't, but my friend LOVES grape
[20:33:02] nettoweb: has joined #RubyOnRails
[20:34:44] idakyne: has joined #RubyOnRails
[20:35:21] djbkd: has joined #RubyOnRails
[20:35:22] ciree: check out roar though
[20:39:45] andrew-l: ciree: how does roar compare to grape?
[20:41:03] teaearlgraycold: has joined #RubyOnRails
[20:41:16] Pazician: has joined #RubyOnRails
[20:41:38] flashpoint9: Barring the indentation (which is correct in the code) my user_id keeps coming up nil, here's the model http://paste.ofcode.org/bNgm366n8MqkUYnMpSSqgr any idea why it keeps coming up nil?
[20:41:57] teaearlgraycold: For capistrano what are the config options I need to get it to connect to my local git? I'm using ":scm, :git", ":scm_username" and ":scm_password"
[20:42:14] teaearlgraycold: But git's throwing "invalid token" back
[20:43:01] pawnbox: has joined #RubyOnRails
[20:44:16] Sawbones: has joined #RubyOnRails
[20:44:37] Sawbones: has joined #RubyOnRails
[20:44:54] Cervajz_: has joined #RubyOnRails
[20:46:35] NBarnes: has joined #RubyOnRails
[20:49:05] NBarnes: would an object that responds correct to as_json suddently start getting a circular reference error when I'm trying to call [object].as_json?
[20:49:10] NBarnes: Why would, rather
[20:49:33] nfk|laptop: has joined #RubyOnRails
[20:49:45] andatche: has joined #RubyOnRails
[20:53:02] alphaatom: has joined #RubyOnRails
[20:53:10] pwnd_nsfw: has joined #RubyOnRails
[20:53:18] kuroro: has joined #RubyOnRails
[20:56:25] someguy: has joined #RubyOnRails
[20:57:16] duaneb: has joined #RubyOnRails
[20:58:04] baweaver: has joined #RubyOnRails
[20:59:24] butterlord: has joined #RubyOnRails
[20:59:30] s2013: has joined #RubyOnRails
[21:00:23] bronson: has joined #RubyOnRails
[21:00:55] nyaa: has joined #RubyOnRails
[21:02:49] shibabu: has joined #RubyOnRails
[21:05:51] butterlord: has joined #RubyOnRails
[21:05:56] rakm: has joined #RubyOnRails
[21:07:19] butterlord: I need some help... I need to change a chunk of HTML on a header/topbar on a specific page. Is this possible? Basically if its the page i specify, display the altered HTML, if not display the normal
[21:07:38] acovrig: has joined #RubyOnRails
[21:08:28] htmldrum: has joined #RubyOnRails
[21:08:44] hahuang65: has joined #RubyOnRails
[21:09:02] acovrig: I have a nav I put in app/views/layouts/_nav.html.erb; if I loop through @variable, where would I declare that variable (I was thinking app/controllers/application_controller, but nope)
[21:09:17] teaearlgraycold: butterlord: in the partial for the header just wrap it with an if -> else
[21:09:43] teaearlgraycold: if (controller_name == 'controller' and action_name == 'action')
[21:10:28] butterlord: so... say I'm a complete idiot, where would I define the page that I want it changed for?
[21:10:43] teaearlgraycold: Whatever page defines the header
[21:10:53] teaearlgraycold: Just use the controller and action name
[21:11:06] teaearlgraycold: I gave you the if statement you need
[21:11:39] kuroro: has joined #RubyOnRails
[21:12:43] qejk: has joined #RubyOnRails
[21:13:35] flashpoint9: I can't figure out how to apply the user_id value to a related model on create method, I can save the object but user_id is always nil
[21:14:05] flashpoint9: I dont want to create a hidden field on the form, but can't figure out how to assign the current user_id to the related model on creation in the controller
[21:14:12] Cervajz_: has joined #RubyOnRails
[21:14:57] stannard_: has joined #RubyOnRails
[21:15:10] stannard_: has joined #RubyOnRails
[21:15:46] cnk: has joined #RubyOnRails
[21:17:30] tubbo: flashpoint9: i would just do it in the create action, @model.user = current_user
[21:17:37] tubbo: right before you @model.save
[21:19:26] tubbo: lol mongoid {:number=><BSON::ObjectId:0x70189090819620 data=567083ad636f6460b4000143>}.
[21:19:36] flashpoint9: tubbo: I was trying self.user_id instead of @model.user, question, how would I know it was .user and not .user_id?
[21:19:39] tubbo: it's been like what, 8 years? and they haven't figured out how to serialize a BSON::ObjectId into a String automagically for me? ;)
[21:20:24] _Tariq: has joined #RubyOnRails
[21:20:28] tubbo: flashpoint9: they're 2 ways of saying the same thing, but i personally prefer the look of @model.user = current_user over @model.user_id = current_user.id
[21:20:49] flashpoint9: tubbo: cool thanks
[21:21:20] jgt3: has joined #RubyOnRails
[21:24:57] atomical_: has joined #RubyOnRails
[21:25:36] rodfersou: has joined #RubyOnRails
[21:27:24] renanoronfle: has joined #RubyOnRails
[21:28:23] lemur: has joined #RubyOnRails
[21:29:46] _Tariq: has joined #RubyOnRails
[21:30:02] fox_mulder_cp: has joined #RubyOnRails
[21:31:02] quazimodo: has joined #RubyOnRails
[21:31:22] Radar: GOOD MORNING
[21:31:33] quazimodo: why you so chipper?
[21:32:57] Frem: Where in the filter order does around_filter execute? Is it before_filter, around_filter (block), after_filter?
[21:33:12] Radar: frem: I believe that's right.
[21:33:59] momomomomo: has joined #RubyOnRails
[21:34:38] baweaver: has joined #RubyOnRails
[21:35:03] c355E3B: has joined #RubyOnRails
[21:35:19] Frem: Hmm. I hope moving from `Time.zone =` in a before filter to `Time.use_zone`in an around filter doesn't break anything. >_<
[21:35:33] wildlander: has joined #RubyOnRails
[21:35:43] butterlord: So I'm dumb, <%= if @controller_name == 'controller' and action_name == 'action' %> keeps giving me syntax errors.
[21:35:48] acovrig: where do I declare variables for layout views?
[21:35:54] Radar: butterlord: !gist
[21:35:54] helpa: butterlord: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[21:36:03] Radar: acovrig: in a before_action method in ApplicationController
[21:36:38] butterlord: https://gist.github.com/anonymous/454974742bc637543e89
[21:36:58] butterlord: I don't know what I'm doing... I need to have page-specific HTML on this 'top bar' wrapper
[21:37:11] Cohedrin: has joined #RubyOnRails
[21:37:29] Radar: butterlord: Whoops, I missed the obvious. `if` isn't evaluated + output, so it should just be <% if
[21:38:13] butterlord: With or without ( and )?
[21:38:16] acovrig: Radar: like this? https://gist.github.com/acovrig/63f58c491cf7a822ece0
[21:38:35] Radar: butterlord: Depends on your style. I personally leave them off. I believe the Ruby Style Guide says that they should be left off too.
[21:38:55] tubbo: butterlord: you should also not use `and` or `or` for boolean expressions, instead use `&&` and `||`.
[21:39:09] butterlord: I still get syntax error :( https://gist.github.com/anonymous/ff744e39ffe77710b560
[21:39:16] Radar: butterlord: https://github.com/bbatsov/ruby-style-guide#no-parens-if
[21:39:36] Radar: butterlord: I told you: It's "<% if" and not "<%= if %>". Remove the =.
[21:39:53] Radar: butterlord: See this also: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
[21:39:55] butterlord: whoops hit ctrl z once too many
[21:40:09] butterlord: thanks radar, my bad
[21:40:12] squaresurf: has joined #RubyOnRails
[21:40:13] acovrig: also, how do I use open-uri in a rails controller? where do I put the requrie ???open-uri????
[21:40:43] smathy: frem, it depends on the order you declare them,.
[21:40:54] Radar: acovrig: Typically you'd define a method for it, but yes you can do it that way too.
[21:41:03] Radar: acovrig: requires go at the top of the file, above the class declarations,.
[21:41:12] Radar: acovrig: Think of requires as setting the stage for a play.
[21:42:17] Frem: smathy: Even if I defined an around_filter before a before_filter, wouldn't the before_filter happen first, since the around_filter directly executes the block?
[21:43:29] smathy: frem, no, it depends only on the order you declare them.
[21:43:39] doodlehaus: has joined #RubyOnRails
[21:43:42] Frem: that's kinda snazzy then
[21:44:26] juddey: has joined #RubyOnRails
[21:45:12] brendan-: has joined #RubyOnRails
[21:46:34] smathy: frem, you're welcome.
[21:46:51] teaearlgraycold: Hey, so in my deploy.rb for capistrano I have this setup for my server roles: http://pastie.org/private/ikun3suewffjlyqpdyfjg . Why is capistrano trying to run git clone and rbenv commands on the db server? (address2)
[21:47:12] smathy: Migrations.
[21:47:36] teaearlgraycold: smathy: it can't do migrations on the app server through rake?
[21:48:04] teaearlgraycold: Cause rake tasks can communicate to the dB
[21:48:17] smathy: Not sure if you can, not even certain it's because of migrations - it would just make sense.
[21:48:36] jbrhbr: has joined #RubyOnRails
[21:48:39] teaearlgraycold: Yeah that's the only thing I can think of
[21:49:19] tubbo: teaearlgraycold: you could just set role :db to be the same thing as the rest of the two
[21:49:30] tubbo: so it will run those commands on the same server as the app server
[21:50:06] teaearlgraycold: It'll still work even though it is a seperate server?
[21:52:21] tubbo: teaearlgraycold: well the thought process here is that your *actual* DB server doesn't ever need to get deployed to.
[21:52:42] tubbo: teaearlgraycold: so setting all roles to the same user@IP *would* work, given that you're not deploying code to your DB server at all.
[21:54:54] teaearlgraycold: capistrano was giving me so much trouble with a private repo I'm rolling with a public one for now
[21:55:02] duncannz: has joined #RubyOnRails
[21:55:05] cnk: in capistrano terms, the db server is the app server where yo uwant to run the migrations
[21:55:14] rakm: has joined #RubyOnRails
[21:55:32] cnk: capistrano is optimized for multiple app servers per database
[21:55:36] bigbob: has joined #RubyOnRails
[21:55:48] teaearlgraycold: Ah, makes sense
[21:56:20] jgt3: has joined #RubyOnRails
[21:57:30] tubbo: yeah that does make a lot of sense haha
[21:57:43] herpless: has joined #RubyOnRails
[21:58:04] nfk|laptop: has joined #RubyOnRails
[22:00:51] kmckelvi1: has joined #RubyOnRails
[22:01:51] stannard: has joined #RubyOnRails
[22:03:11] Scripore: has joined #RubyOnRails
[22:03:28] chipotle: has joined #RubyOnRails
[22:03:36] jkamenik: has joined #RubyOnRails
[22:04:25] stannard: has joined #RubyOnRails
[22:04:46] cassioscabral: has joined #RubyOnRails
[22:05:26] sucks: has joined #RubyOnRails
[22:05:59] maesitos: has joined #RubyOnRails
[22:06:12] shibabu: has joined #RubyOnRails
[22:09:10] solars: has joined #RubyOnRails
[22:09:55] Jasaka: has joined #RubyOnRails
[22:11:55] sucks: has joined #RubyOnRails
[22:14:50] bronson: has joined #RubyOnRails
[22:17:02] hobodave: has joined #RubyOnRails
[22:18:27] joshkovach: has joined #RubyOnRails
[22:22:04] FailBit: since I need a pet project for my app I'm migrating the test framework from rspec to minitest
[22:22:06] jmrepetti: has joined #RubyOnRails
[22:25:56] jkamenik: has joined #RubyOnRails
[22:26:50] teaearlgraycold: How much javascript is too much javascript?
[22:27:06] rhizome: it's a matter of taste
[22:27:07] teaearlgraycold: I just checked and post asset compilation I have 259KB in my app
[22:27:22] teaearlgraycold: For the main application.js file
[22:27:28] LambdaSource: teaearlgraycold: When your rendering the DOM in canvas.
[22:28:58] teaearlgraycold: So rails is throwing a 500 one a specific page in production only - and the log files seem to only record that a 500 occurred, and nothing else
[22:29:07] teaearlgraycold: Only the nginx.access.log file is increasing in size
[22:29:16] teaearlgraycold: production.log's doing jack shit
[22:29:26] FailBit: so is it nginx's fault?
[22:29:31] FailBit: check the returned page headers
[22:29:37] FailBit: look for the Rack/appserver signature
[22:30:39] teaearlgraycold: FailBit: what would that be under?
[22:30:57] FailBit: in your browser, brah
[22:31:04] teaearlgraycold: Nah, I mean what header
[22:31:21] teaearlgraycold: Well wappalyzer shows only NGinx on the offending page
[22:31:29] teaearlgraycold: While it can tell there's rails on every other
[22:31:35] teaearlgraycold: So I guess it's an nginx issue.
[22:31:44] teaearlgraycold: But nginx isn't logging any errors!
[22:31:45] FailBit: https://i.imgur.com/MYHr7Xd.png
[22:31:46] rhizome: the first line of any request in the log contains the action
[22:32:32] FailBit: I happen to run that site, thank you
[22:32:55] Cervajz: has joined #RubyOnRails
[22:33:31] teaearlgraycold: FailBit: I remember hearing you moved to Postgres, right?
[22:33:57] teaearlgraycold: Currently doing postgres for the first time with this project
[22:34:07] teaearlgraycold: Excited to try it's built-in full text search
[22:34:21] teaearlgraycold: Haven't gotten to that part yet, though
[22:34:22] FailBit: >using postgres for text search
[22:34:32] teaearlgraycold: Hey, I'm doing a small app
[22:34:39] teaearlgraycold: For internal usage
[22:34:39] FailBit: even for a small app
[22:34:41] FailBit: I would use elastic
[22:34:44] Scripore: has joined #RubyOnRails
[22:34:51] teaearlgraycold: elastic is out of control with ram usage though
[22:34:58] teaearlgraycold: Trying to keep things legit
[22:35:17] FailBit: our server's got 128G RAM
[22:35:27] FailBit: RAM usage is not something we normally worry about
[22:35:45] teaearlgraycold: Well this runs in an 8GB VM ( the dB server that is )
[22:35:50] teaearlgraycold: Application server has 4GB
[22:35:57] FailBit: then yeah that will be a problem
[22:36:09] teaearlgraycold: Hence why I don't want to use elastic
[22:36:28] teaearlgraycold: It's not going to be a shit ton of records anyway
[22:38:13] snoozelose: has joined #RubyOnRails
[22:38:35] bigbob: has joined #RubyOnRails
[22:39:08] teaearlgraycold: Fuck. nginx seems to have deleted its logs :/
[22:40:34] baweaver: has joined #RubyOnRails
[22:41:17] Scriptonaut: Hi guys. So I am trying to do this: Person.includes(login_user: :account_permissions).order("account_permissions.write desc,people.created_at asc"). However, it tells me that the table account_permissions doesn't exist. This is true, account permissions is a scoped has_many on User (login_user). How do I make activerecord realize taht I'm talking about the Permissions table, but still only include the account_permissions? Here are the relevant
[22:43:10] teaearlgraycold: Scriptonaut: you need to do a joins I think
[22:43:35] Scriptonaut: instead of an includes?
[22:43:46] gaustin_: has joined #RubyOnRails
[22:43:58] teaearlgraycold: Not totally sure - but doesn't hurt to try
[22:45:06] maesitos: has joined #RubyOnRails
[22:45:19] Scriptonaut: hrm, a joins results in the same error
[22:46:59] smathy: Use the table name in your order string.
[22:47:03] smathy: Scriptonaut, ^
[22:47:21] Scriptonaut: ya, I use the real table name "permissions", and it's not ordering (though it doesn't error out)
[22:48:36] smathy: Scriptonaut, ok, so let's solve that problem instead. You probably also need references(login_user: :account_permissions) in your query in order to do an outer join rather than two queries.
[22:48:51] gaustin_: has joined #RubyOnRails
[22:48:58] Scriptonaut: ah, references, I'll try taht
[22:50:35] colleenmcguckin: has joined #RubyOnRails
[22:51:21] Scriptonaut: bleh my server seems to have frozen
[22:52:19] yfeldblum: has joined #RubyOnRails
[22:53:55] doodlehaus: has joined #RubyOnRails
[22:53:57] Scriptonaut: I might have to save this problem for another time the server is unresponsive and I forgot to push my code :|
[22:54:36] shmilan: has joined #RubyOnRails
[22:55:25] manfrin: has joined #RubyOnRails
[22:55:28] edwinvdgraaf: has joined #RubyOnRails
[22:56:34] snoozelose: has joined #RubyOnRails
[22:57:36] rhizome: devops to the rescue!
[23:00:18] edwinvdgraaf: has joined #RubyOnRails
[23:02:07] deeprave: has joined #RubyOnRails
[23:02:41] Scripore: has joined #RubyOnRails
[23:02:48] edwinvdgraaf: has joined #RubyOnRails
[23:03:37] _Tariq: has joined #RubyOnRails
[23:04:44] doodlehaus: has joined #RubyOnRails
[23:05:00] threeminutemonta: has joined #RubyOnRails
[23:05:36] Scripore: has joined #RubyOnRails
[23:06:33] GragHarker: has joined #RubyOnRails
[23:07:40] selfagency: has joined #RubyOnRails
[23:07:48] renegadeandy: has joined #RubyOnRails
[23:08:23] shibabu: has joined #RubyOnRails
[23:13:24] bronson: has joined #RubyOnRails
[23:13:48] pawnbox: has joined #RubyOnRails
[23:14:37] owenjones: has joined #RubyOnRails
[23:15:33] mblewitt: has joined #RubyOnRails
[23:15:40] colleenmcguckin: has joined #RubyOnRails
[23:17:02] wethu: has joined #RubyOnRails
[23:18:17] gaustin_: has joined #RubyOnRails
[23:19:14] wethu: Hey, are ActiveSupport modules included into everything inside of app/* ?
[23:21:23] mblewitt: has left #RubyOnRails: ()
[23:25:13] rgtk: has joined #RubyOnRails
[23:25:14] Radar: wethu: what is the question behind that question?
[23:25:44] mble: has joined #RubyOnRails
[23:25:47] arooni: has joined #RubyOnRails
[23:26:17] wethu: I had code inside of lib/* and delegate :foo, :bar, to: :baz == MethodNotFound, we moved same code into app/services and now delegate :foo, :bar, to: :baz works
[23:29:07] lemur: has joined #RubyOnRails
[23:30:54] mble: has left #RubyOnRails: ("WeeChat 1.3")
[23:31:30] mble: has joined #RubyOnRails
[23:32:04] Intii: has joined #RubyOnRails
[23:33:50] wethu: Hmm, never mind I don't see any differences between code in lib/* and app/* now. Problem must have been elsewhere
[23:33:55] jstransky: has joined #RubyOnRails
[23:34:37] wethu: .included_modules both returned: [PP::ObjectMixin, Nori::CoreExt::Object, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, Kernel]
[23:35:04] Intii: Hi everyone, what would be the best approach? An app that acts as an API and admin panel or a seperate rails app for the api and a seperate rails app for the admin panel?
[23:36:05] tvw: has joined #RubyOnRails
[23:45:15] Ropeney: has joined #RubyOnRails
[23:45:52] bronson: has joined #RubyOnRails
[23:51:56] superlou: has joined #RubyOnRails
[23:52:49] cnk_: has joined #RubyOnRails
[23:54:22] cnk_: Intii: It rather depends on how different the API output will be from admin
[23:54:45] cnk_: I might split them just because I expect the customizations to diverge for both
[23:55:30] cnk_: but I generally do have my API return html, json, and xml even if I mainly intend to use json. The html is easier for me to look at
[23:55:39] moeabdol1: has joined #RubyOnRails
[23:55:58] Intii: The API will be used to store/retrieve data on iOS and Android devices. The admin panel will allow the employees of the company to manage the orders they recieve which are placed on the iOS and Android devices
[23:56:31] shmilan: has joined #RubyOnRails
[23:56:50] cassioscabral: has joined #RubyOnRails
[23:57:57] cnk_: Intii: I would bet on those needing different cuts of the data. So I would make them separate
[23:59:26] Intii: Okay thanks!