« Back to channel list

#RubyOnRails - 13 April 2016

« Back 1 day Forward 1 day »
[00:06:32] polyidus: has joined #RubyOnRails
[00:07:43] Sawbones: has joined #RubyOnRails
[00:09:24] tildes: has joined #RubyOnRails
[00:09:29] YourManCJ: has joined #RubyOnRails
[00:09:44] FailBit: Arcaire: what was your previous nick
[00:09:49] FailBit: I can't put my finger on it
[00:10:05] Sawbones: has joined #RubyOnRails
[00:10:17] ensyde: has joined #RubyOnRails
[00:10:25] Radar: GOOD MORNING.
[00:10:59] Arcaire: FailBit: im new
[00:15:45] FailBit: but you recognized me
[00:16:28] Arcaire: FailBit: I used to use the nick 'mices'.
[00:17:22] Megamos: has joined #RubyOnRails
[00:18:51] tsherman: has joined #RubyOnRails
[00:19:32] joshkovach: has joined #RubyOnRails
[00:24:21] pawnbox: has joined #RubyOnRails
[00:24:47] helpa: has joined #RubyOnRails
[00:26:56] twilling: has joined #RubyOnRails
[00:30:16] baweaver: FailBit: Ayrix
[00:30:59] dopie: has joined #RubyOnRails
[00:31:37] Arcaire: Goddammit baweaver
[00:31:39] Arcaire: you ruin EVERYTHING
[00:31:43] Arcaire: THIS IS WHY DAD LEFT
[00:32:03] Sawbones: has joined #RubyOnRails
[00:32:43] polyidus: has joined #RubyOnRails
[00:32:48] Inside: has joined #RubyOnRails
[00:32:48] Inside: has joined #RubyOnRails
[00:32:49] Arcaire: FailBit: I'm genuinely surprised your site doesn't have the option to switch between the colors of the main characters
[00:32:59] lyoshajapan: has joined #RubyOnRails
[00:33:13] Arcaire: Granted, I only looked for like a minute. It was the first thing I expected to see.
[00:36:04] FailBit: trixie is best pony
[00:36:08] FailBit: therefore the site is trixie colors
[00:36:24] bronson: has joined #RubyOnRails
[00:37:19] lyoshajapan: has joined #RubyOnRails
[00:37:53] lyoshajapan: has joined #RubyOnRails
[00:38:27] FailBit: there are 2 themes
[00:38:30] ogpastaling: has joined #RubyOnRails
[00:38:45] michael_mbp: any preference on {foo} vs { foo }
[00:38:47] FailBit: if you go to the settings page, under the display tab there is a combo box that gives a live preview of the 2 themes
[00:38:58] FailBit: michael_mbp: uh, wut
[00:39:11] michael_mbp: last team I worked with gave me so much gripe over that saying they wanted interpolations to have a space around
[00:39:24] michael_mbp: FailBit: so "#{ name }" rather than "#{name}"
[00:39:39] michael_mbp: one of the devs winged about that for almost an hour.
[00:39:42] SteenJobs: is there a convenient way to deal with integer types in a model and params passing the number as a string?
[00:39:47] FailBit: you shouuld have told him to fuck off michael_mbp
[00:39:50] FailBit: it really isn't important
[00:39:53] michael_mbp: I prefer the compact form.
[00:40:00] michael_mbp: FailBit: I thought so too!
[00:40:17] michael_mbp: it was total 'opinion based dev' type flogging.
[00:40:27] FailBit: one of my horror stories about that
[00:40:38] michael_mbp: and it didn't stop there!
[00:41:18] michael_mbp: I was basically forced to do everything _their_ way, to the point that stuff that didn't make much sense were being OCD'd over.
[00:41:25] FailBit: so, guy at work is nagging his coworker about "proper usage of jquery," guy being nagged bcc's me in reply because he knows I can code
[00:41:30] Arcaire: FailBit: I don't have an account so
[00:41:31] bob434: has joined #RubyOnRails
[00:41:34] FailBit: you don't need one
[00:41:38] michael_mbp: OH the other one.
[00:41:40] FailBit: https://derpibooru.org/settings
[00:41:44] FailBit: but anyways, michael_mbp
[00:41:47] Arcaire: My requirements to browse MLP artwork are pretty minimal.
[00:41:57] FailBit: what they were fighting over
[00:42:06] FailBit: was the usage of jquery data() functions
[00:42:11] michael_mbp: 'string not having interpolation' vs "I'm #{foo} interpolating something"
[00:42:26] FailBit: and using data() is wrong in some cases because it does implicit type conversions
[00:42:27] michael_mbp: that was a 2 hr rant
[00:42:51] FailBit: and the guy being nagged knew this, the nagger(?) apparently was not aware / did not think it would be a problem
[00:43:17] michael_mbp: about how 'foo' means there isn't any interpolation so it takes less time to understand the intent of the code. That said, I never had problems reading code with interpolation and generally sticking to double-quotes.
[00:43:24] michael_mbp: FailBit: bah.
[00:43:45] michael_mbp: Thankfully, my time with that team ended. I really started to get too painful
[00:44:04] michael_mbp: It! Probably me too haha.
[00:44:27] FailBit: I mean if they really want to get nitpicky
[00:44:30] michael_mbp: (well, by that time). I ultimatly felt like a code shoveller rather than being allowed to do stuff my way.
[00:44:36] FailBit: just annoy them by using string literal concatenation
[00:44:50] FailBit: "foo "+var.to_s+" bar"
[00:45:01] michael_mbp: and it's not just "my way", but I'm happy to entertain constructive criticism not just blatant BS.
[00:45:02] FailBit: OH BUT MAKE SURE YOU USE SPACES TOO :D
[00:45:10] FailBit: "foo " + var.to_s + " bar"
[00:45:35] michael_mbp: Pull requests started to become a nightmare too. That nagger woud nit-pick....every...thing.
[00:46:18] michael_mbp: anyways thanks FailBit, I knew I wasn't the only one who thought that was strange
[00:47:21] michael_mbp: Ugh Puma doesn't like errors in dev. When there's an exception it takes ages to 'die', so refreshing the page takes ages too.
[00:47:30] michael_mbp: and puma is Rails 5 'default' dependency.
[00:47:54] FailBit: what kind of error
[00:47:58] michael_mbp: at least for dev
[00:48:00] FailBit: app-crashy or request-crashy
[00:48:25] michael_mbp: request-crashy ActionController::RoutingError (No route matches [GET] "/javascripts/admin.js")
[00:48:37] michael_mbp: that's intentional as I haven't created it yet
[00:48:51] michael_mbp: hang on removing puma let's see if webrick is alright with this
[00:49:29] michael_mbp: Ha super quick stack trace
[00:50:30] michael_mbp: I could go with thin, always liked it.
[00:51:02] michael_mbp: equally quick.
[00:54:13] pawnbox: has joined #RubyOnRails
[00:56:27] Radar: [10:39:25] <michael_mbp> FailBit: so "#{ name }" rather than "#{name}"
[00:56:28] Radar: The latter.
[00:57:07] Radar: https://github.com/bbatsov/ruby-style-guide never shows one with spaces.
[00:59:36] ekinmur: has joined #RubyOnRails
[01:04:09] flashpoint9: has joined #RubyOnRails
[01:04:10] krz: has joined #RubyOnRails
[01:06:56] IrishGringo: has joined #RubyOnRails
[01:08:39] sevenseacat: has joined #RubyOnRails
[01:14:24] Sawbones: has joined #RubyOnRails
[01:14:53] ZerGabriel: has joined #RubyOnRails
[01:16:25] Jameser: has joined #RubyOnRails
[01:22:53] eljimador: has joined #RubyOnRails
[01:23:34] SteenJobs: has joined #RubyOnRails
[01:23:57] DoctorMonocular: has joined #RubyOnRails
[01:24:02] pawnbox: has joined #RubyOnRails
[01:27:24] Sawbones: has joined #RubyOnRails
[01:37:19] Megamos: Was so proud of my first complex regex, /(\s*(mån|tis|ons|tor|fre|lör|sön)\s[0-2]\d(:|\.)\d{2}\s*(-[0-2]\d(:|\.)\d{2})?,?\s*)+/g . Then it all fell apart when put in for validating format. No /g in ruby.... so evil.
[01:37:19] bronson: has joined #RubyOnRails
[01:37:46] FailBit: /g is automatic
[01:38:21] FailBit: and that looks like a hell of a regex
[01:38:47] D9: yeah that regex is serious as hell
[01:39:12] FailBit: if you've ever read perl sources there is far worse in this world
[01:39:20] Megamos: I might change the user input instead
[01:39:37] FailBit: that looks like the kind of thing I would write a parser-validator for
[01:40:43] sevenseacat: i hope there are 4500000 tests around that regex
[01:40:53] D9: I avoid writing regex at all costs
[01:40:57] Megamos: The input is for weekly occasions of a training or course. Like, mon 11:00-12:00, fri 14:00-15:00
[01:41:08] FailBit: use chonic
[01:41:36] FailBit: or not I don't know if it provides that level
[01:41:47] FailBit: don't think it does intervals, actually
[01:42:26] sevenseacat: it also lets things like 27:00 through :D
[01:42:52] FailBit: I'd just go with a parser-validator for this one
[01:42:55] Megamos: yeh, though of that when I wrote it :)
[01:43:05] FailBit: extract_day, extract_time
[01:43:09] sevenseacat: I wouldnt let something like that free-text
[01:43:29] Megamos: user select inputs?
[01:43:33] Megamos: use i mean
[01:43:38] FailBit: interval picker
[01:43:52] sevenseacat: select day of week, select start time, select end time
[01:43:56] sevenseacat: or something similar
[01:45:15] Megamos: Thanks, I'll give it a try.
[01:45:59] Megamos: Guess I need some js in there to "add another occasion"
[01:47:53] ur5us: has joined #RubyOnRails
[01:50:16] sevenseacat: if theyre allowed to add more than one, yeah
[01:51:56] flashpoint9: has joined #RubyOnRails
[01:53:16] Sawbones: has joined #RubyOnRails
[01:53:23] cpruitt: has joined #RubyOnRails
[01:53:56] pawnbox: has joined #RubyOnRails
[01:58:24] brent__: has joined #RubyOnRails
[02:03:38] lyoshajapan: has joined #RubyOnRails
[02:09:51] adre: has joined #RubyOnRails
[02:10:39] djbkd: has joined #RubyOnRails
[02:11:30] _djbkd: has joined #RubyOnRails
[02:14:04] AmiMoench: has joined #RubyOnRails
[02:14:32] SteenJobs: send_data vs send_file…is send_data more securE?
[02:16:25] markfletcher: has joined #RubyOnRails
[02:17:43] Radar: They're two different methods entirely.
[02:17:48] Radar: What they do is written on the tin.
[02:18:05] Radar: (and in the docs)
[02:18:10] Radar: SteenJobs: Why do you think that send_data is more secure?
[02:18:59] SteenJobs: Radar: simply was reading about send_file not being secure for some reason, and was then reading up on whether i should use one or the other when delivering a pdf from s3 to download thru the browser
[02:19:09] juanca_: has joined #RubyOnRails
[02:19:12] Radar: send_file isn't secure if you're passing in `params[:file]`
[02:19:24] Radar: send_file(params[:file]) not a great idea.
[02:19:32] SteenJobs: ah ok, i’m just grabbing the paperclip hosted s3 url
[02:19:35] SteenJobs: why is that?
[02:19:59] Radar: params[:file] = "/some/path/to/a/secret/file" oh shit you've been hacked.
[02:19:59] robbyoconnor: has joined #RubyOnRails
[02:20:07] Radar: You allow anyone to retrieve any file.
[02:20:13] SteenJobs: oh yea makes sense
[02:20:37] SteenJobs: well obviously, these things always have to make sense in the end. i meant oh cool, i understand.
[02:25:03] sevenseacat: fun fact: rails let you do that with `render` until very recently
[02:25:12] sevenseacat: render params[:file] # kerboom
[02:25:49] SteenJobs: that’s cool that they prevent you from doing that now
[02:26:06] Ropeney: wasn't that in a security patch to fix that?
[02:26:07] sevenseacat: it would have been even cooler if they patched it years ago when i raised it as a security issue
[02:26:50] sevenseacat: ACTION still snarky about that
[02:26:54] yellow5: has joined #RubyOnRails
[02:27:00] SteenJobs: ha yikes. why didn’t they listen?
[02:27:12] SteenJobs: that’s cool for you to have called it way back though
[02:27:13] Ropeney: I still think it be allowed :(
[02:27:31] sevenseacat: it was seen as a 'working as intended'
[02:28:01] SteenJobs: are there other similary type things that they had patched up previously?
[02:28:20] SteenJobs: like was there precedent for something like that to be changed despite ‘working as intended'
[02:29:51] flashpoint9: has joined #RubyOnRails
[02:31:33] SteenJobs: i guess was it a mistake being made often enough that it needed to be patched
[02:33:26] hinbody: has joined #RubyOnRails
[02:34:07] pawnbox: has joined #RubyOnRails
[02:34:58] barajasfab: has joined #RubyOnRails
[02:36:07] bruno-: has joined #RubyOnRails
[02:36:34] chagel: has joined #RubyOnRails
[02:40:38] Sawbones: has joined #RubyOnRails
[02:41:02] eljimmy: has joined #RubyOnRails
[02:41:19] Rubie: has joined #RubyOnRails
[02:41:43] yellow5: has joined #RubyOnRails
[02:43:08] Arcaire: sevenseacat: I wish they hadn't patched that.
[02:43:13] Arcaire: Nobody should be doing render params[:file]
[02:44:43] bob434: has joined #RubyOnRails
[02:47:30] bob434: has joined #RubyOnRails
[02:47:57] baweaver: has joined #RubyOnRails
[02:49:14] mdel: has joined #RubyOnRails
[02:50:53] w09x: has joined #RubyOnRails
[02:50:56] mat-svol: has joined #RubyOnRails
[02:51:53] Spami: has joined #RubyOnRails
[02:52:18] bob434: has joined #RubyOnRails
[02:52:39] zave: has joined #RubyOnRails
[02:55:06] Radar: Arcaire: Yes but I think it's framework's job to try and prevent as many footgun incidents as possible.
[02:55:49] bruno-: has joined #RubyOnRails
[02:56:38] Sawbones: has joined #RubyOnRails
[02:58:55] lyoshaja_: has joined #RubyOnRails
[02:59:06] benlieb: has joined #RubyOnRails
[02:59:25] smoitra: has joined #RubyOnRails
[03:02:53] not_a_coyote: has joined #RubyOnRails
[03:03:53] pawnbox: has joined #RubyOnRails
[03:06:02] Chagel_: has joined #RubyOnRails
[03:07:17] zeel: has joined #RubyOnRails
[03:09:50] Rubie: has joined #RubyOnRails
[03:16:35] braincras: has joined #RubyOnRails
[03:16:54] duncannz: has joined #RubyOnRails
[03:17:34] duncannz: has joined #RubyOnRails
[03:18:14] duncannz: has joined #RubyOnRails
[03:18:47] duncannz: has joined #RubyOnRails
[03:22:13] IrishGringo: has joined #RubyOnRails
[03:23:30] pawnbox: has joined #RubyOnRails
[03:24:37] b0un7y: has joined #RubyOnRails
[03:25:27] b0un7y: hi guys, I'm trying to present a drop down list of groups that a member is a part of which can be selected. When the article is created, I want the ID of the group to be added to the Articles table
[03:25:38] b0un7y: I'm currently having it written on the view as:
[03:25:40] b0un7y: <%= f.select :group_id, groups %>
[03:25:57] b0un7y: I however don't want to show the ID, but show the name of the group, and store the ID of that group
[03:26:00] b0un7y: how could I do that?
[03:27:37] DoctorMonocular: has joined #RubyOnRails
[03:28:27] b0un7y: apologies, Hi everyone.
[03:28:31] mwlang: which would you do? given an order and line_items and the total shipping and total_amount on the order needs to be recalculated when a new item is added, deleted, or quantity adjusted, would you: a) trigger recalculations on the order object in the line_item’s after_save callback, b) explicitly call line_item.order.recalculate after calling line_item.save! or c) introduce third object that is a “service object” who’s job is to
[03:28:32] mwlang: add/update/delete line_item AND do recalculations for the order.
[03:28:38] baweaver: http://guides.rubyonrails.org/form_helpers.html#the-select-and-option-tags
[03:28:58] SteenJobs: has joined #RubyOnRails
[03:29:55] baweaver: d) I would recalculate in the view / controller as a presenter
[03:30:05] baweaver: why does it need to be saved?
[03:30:23] baweaver: kind of an sql-antipattern
[03:30:29] sypheren: has joined #RubyOnRails
[03:31:29] mwlang: baweaver: enough sales per day that it’s too costly to do the queries all the time, plus external integrations (read SOAP exchanges) pulling the data whereby the exchange servers were written to read the fields directly.
[03:32:00] mwlang: namely, it’s the latter that’s killin’ this.
[03:32:03] _Sypheren: has joined #RubyOnRails
[03:32:13] michael_mbp: Radar: ouch. You won't how much grief I got from Stembolt to maintain them as "#{ name }"
[03:32:20] _Sypheren: has joined #RubyOnRails
[03:32:28] baweaver: you'd be introducing a monstrous race condition on financial services
[03:33:15] baweaver: throttle exchange if at all possible, make sure your DB is tuned, and see about getting more power to it
[03:34:51] not_a_coyote: has left #RubyOnRails: ("Leaving")
[03:36:19] baweaver: short: don't wonk your DB integrity, take a bat to the exchange team and throttle them down
[03:37:23] mwlang: baweaver: just realized another reason to store value…shipping costs change seasonally or with sales/specials. need to capture amount actually billed to user when they’re billed.
[03:38:28] baweaver: Then make an adjuncts table that logs the complete state at order time
[03:39:21] Darmani: has joined #RubyOnRails
[03:39:31] baweaver: at that point it stops being dynamic and starts becoming historical.
[03:41:36] Inside: has joined #RubyOnRails
[03:44:38] EasyCo: has joined #RubyOnRails
[03:45:10] crystal77: has joined #RubyOnRails
[03:45:12] IanMalcolm: has joined #RubyOnRails
[03:46:02] davidcelis: has joined #RubyOnRails
[03:46:02] davidcelis: has joined #RubyOnRails
[03:49:23] benlieb: has joined #RubyOnRails
[03:50:55] _Sypheren: has joined #RubyOnRails
[03:51:52] pyface: has joined #RubyOnRails
[03:51:57] pyface: has left #RubyOnRails: ()
[03:52:22] mat-svol: has joined #RubyOnRails
[03:59:54] Radar: michael_mbp: rly
[04:01:51] IrishGringo: has joined #RubyOnRails
[04:03:03] EasyCo: Can anybody tell me if the rails subdomain constraints just checks the outer most subdomain? So for instance, given the following URL: api.sandbox.unicorns.com, will the subdomain 'api' match this?
[04:03:22] Jameser`: has joined #RubyOnRails
[04:04:11] sevenseacat: easy to check and see :)
[04:05:12] EasyCo: I would but not on a machine where I can at the moment
[04:07:14] Sawbones: has joined #RubyOnRails
[04:08:13] nodejunkie: has joined #RubyOnRails
[04:08:47] jgpawletko: has joined #RubyOnRails
[04:09:21] jgpawletko: has left #RubyOnRails: ()
[04:09:48] pawnbox: has joined #RubyOnRails
[04:09:56] lxsameer: has joined #RubyOnRails
[04:11:47] agent_white: has joined #RubyOnRails
[04:12:13] EasyCo: Oh well, guess I'll check when I get home whether just subdomain: 'api' is sufficient or if I'll need to get regex'ing.
[04:12:31] Arcaire: that would be the best option
[04:15:20] Darmani: Hey agent_white ^.^
[04:15:49] Regulati_: has joined #RubyOnRails
[04:16:53] DoctorMonocular: has joined #RubyOnRails
[04:17:40] Darmani: it's okay.
[04:18:06] Darmani: agent_white: I wish I had a mind for this kind of thing. I'm more geared toward having fun and playing video games.
[04:18:09] Darmani: ACTION sighs
[04:18:30] Radar: Darmani: So am I ;)
[04:18:41] Radar: Code offers the same kind of challenges that a lot of games do imo
[04:18:46] Radar: Puzzles to be picked apart.
[04:19:10] Darmani: I suppose.
[04:19:29] agent_white: And a dash of masochism.
[04:19:34] Darmani: What kind of sick twisted game is this where I miss one line of code and spend hours banging my head at my desk trying to figure out why.
[04:19:42] Darmani: this is a game made by satan himself.
[04:20:55] Darmani: I guess it's not as bad as Dark Souls though.
[04:21:01] Darmani: I just bought the new one today ^.^
[04:22:01] Devalo: has joined #RubyOnRails
[04:25:17] sevenseacat: if you're not following whatever tutorial you're reading closely enough to read *every line of code*, I'm not sure who you can blame
[04:25:22] DoctorMonocular: has joined #RubyOnRails
[04:25:46] sevenseacat: people don't just put unnecessary code in there - it's all important
[04:28:15] njero: has joined #RubyOnRails
[04:28:21] Darmani: ACTION likes to joke around
[04:28:32] Darmani: ACTION isn't really having a hard time but likes to exaggerate.
[04:30:55] EasyCo: For anybody that cares, when you pass a string to `constraints subdomain:` Rails will try and match the string against all subdomains up to the root domain. So if you have a URL such as api.sandbox.unicorns.com and you want to match api as the subdomain you have to break out the regex a'la /^api(\.|$)/
[04:32:59] Radar: Darmani: There was a time in 2009. I had about 4 years Rails experience by then. I spent EIGHT DAMN HOURS working on a bug. The fix was changing "Time.parse" to "Time.zone.parse"
[04:33:01] njero: EasyCo: is that a question? or information sharing? :
[04:33:04] Radar: 5 characters. 8 hours
[04:33:52] EasyCo: n_e_o: Information sharing from my question before you joined.
[04:33:55] Radar: Darmani: The patience required to be a good programmer is a meta-game in and of itself :) You'll get better at it after a while.
[04:34:12] Radar: You realise that you've have situations like it in the past and they've gone by and so this too shall pass.
[04:34:22] lyoshajapan: has joined #RubyOnRails
[04:34:37] Radar: EasyCo: I think request.subdomains might be ["api", "sandbox"]
[04:34:41] Darmani: Radar: You are so encouraging lol. You should really think about being a teacher or something.
[04:34:46] Darmani: anyway brb
[04:34:51] Radar: Darmani: Doesn't pay as well ;)
[04:35:14] Darmani: thats true
[04:35:23] Darmani: Radar: And then you would have bums like me to deal with
[04:36:26] robbyoconnor: has joined #RubyOnRails
[04:37:09] AmiMoench: Radar: that is often the case, I find. In open source, there are too many changing parts and the agile world, things are too hectic, so heuristics are used to keep up with the fast changing environment. Those biases can also blind us :)
[04:37:36] Devalo: has joined #RubyOnRails
[04:37:58] Radar: Darmani: I don't mind the bums themselves. What bothers me the most is people who _say_ they want to learn but then don't put in any effort to do so.
[04:38:05] Radar: (not suggesting that's what you've done, btw)
[04:38:29] Arcaire: >the agile world
[04:38:36] helpa: http://i.imgur.com/m9m3wr9.gif
[04:38:44] Arcaire: My triggers include the word "agile".
[04:39:01] AmiMoench: Arcaire: haha
[04:39:28] Radar: Arcaire: me too :)
[04:39:44] Arcaire: Radar: You work in a scrum/sprint lab.
[04:39:46] IrishGringo: has joined #RubyOnRails
[04:39:48] Radar: "Agile" == "I have no idea what I'm talking about. I heard this used in a webinar once and this situation sounds like the one explained there"
[04:39:52] Arcaire: How can that be one of your triggers?
[04:39:53] bronson: has joined #RubyOnRails
[04:40:06] sevenseacat: "we do standups, so we're agile, right?"
[04:40:13] Arcaire: One of the recruiters I spoke to some while ago:
[04:40:14] Radar: Arcaire: We use sprints, sure. It helps us plan the work that we're doing.
[04:40:26] Arcaire: "So you work with Rails. Do you do... agile...? Yes, do you do agile?"
[04:40:26] AmiMoench: i'm cracking up
[04:40:51] sevenseacat: Arcaire: you work with rails? <_<
[04:40:53] baweaver: Agile: Sprinting even faster off the side of the proverbial cliff
[04:41:00] Arcaire: sevenseacat: Depending on who you ask.
[04:41:20] EasyCo: Radar: Yep that's right... and if you use a string ('api') for the subdomain constraint it matches against the subdomains (api.sandbox) with the equivalent of /^api$/ instead of /^api(\.|$)/. I just wasn't sure which one was the default and still can't find exactly where that's handled in the codebase. This is just what I've discovered through testing.
[04:41:21] Arcaire: I mostly just break it and work with Django instead now while pretending to work with Phoenix.
[04:41:34] sevenseacat: the first company i worked with who claimed to be agile did hour-long all-hands standups every. damn. morning.
[04:41:47] d0nn1e: has joined #RubyOnRails
[04:41:54] Arcaire: That's because they *were* agile, they weren't *doing* agile.
[04:42:38] sevenseacat: nowadays i just tend to associate agile with "cowboy"
[04:42:56] baweaver: or Javascript
[04:42:56] Arcaire: PROGRAMMER
[04:44:44] njero: bronson got scared of NINJA :\
[04:45:50] Arcaire: http://i.imgur.com/YJl9s.jpg
[04:46:06] merida: has joined #RubyOnRails
[04:46:07] lyoshajapan: has joined #RubyOnRails
[04:46:38] jenrzzz: has joined #RubyOnRails
[04:46:51] njero: Arcaire: hope it isn't u in the picture :P
[04:47:04] Arcaire: the keyboard was photoshopped in tho
[04:48:22] baweaver: http://cdn3.techworld.com/cmsdata/slideshow/3611572/DavidShing_AOL_thumb800.jpg
[04:49:46] fedexo: has joined #RubyOnRails
[04:50:37] njero: help doesn't have respect for me :9
[04:50:47] Arcaire: There's no !pics command is there
[04:50:53] r0bby_: has joined #RubyOnRails
[04:51:01] helpa: Awesome hat, crappy linux.
[04:51:07] Radar: EasyCo: You might be able to handle that through building your own constraint rather than using the one built in to Rails.
[04:51:33] Radar: https://github.com/radar/twist/blob/mtwr-runthrough/lib/constraints/subdomain_required.rb
[04:52:01] Radar: Used like this: https://github.com/radar/twist/blob/mtwr-runthrough/config/routes.rb#L6
[04:52:39] Radar: > hour-long all-hands standups every. damn. morning
[04:52:45] mat-svol: has joined #RubyOnRails
[04:52:45] Radar: I'd quit on the second day
[04:53:11] Spami: has joined #RubyOnRails
[04:54:22] EasyCo: Ahh, that's an interesting way to do it! I like. I just used regex: contraints subdomain: /^api(\.|$)/ do ...
[04:57:51] robbyoconnor: has joined #RubyOnRails
[04:59:52] Palsson: has joined #RubyOnRails
[05:02:26] kadoppe: has joined #RubyOnRails
[05:02:43] r0bby_: has joined #RubyOnRails
[05:03:51] Devalo: has joined #RubyOnRails
[05:04:09] johnflux: has joined #RubyOnRails
[05:04:09] johnflux: has joined #RubyOnRails
[05:05:09] edward_: has joined #RubyOnRails
[05:13:37] edward_: has joined #RubyOnRails
[05:18:07] sp1rs: has joined #RubyOnRails
[05:21:27] yfeldblum: has joined #RubyOnRails
[05:34:11] crameth: has joined #RubyOnRails
[05:36:35] kadoppe: has joined #RubyOnRails
[05:41:27] chagel: has joined #RubyOnRails
[05:45:16] claytonzaugg: has joined #RubyOnRails
[05:46:52] djbkd: has joined #RubyOnRails
[05:51:06] hotpancakes: has joined #RubyOnRails
[05:54:14] Rubie: has joined #RubyOnRails
[05:55:13] mat-svol: has joined #RubyOnRails
[05:55:32] Macaveli: has joined #RubyOnRails
[05:58:13] rafaelfr_: has joined #RubyOnRails
[06:00:10] lyoshajapan: has joined #RubyOnRails
[06:01:14] Chagel_: has joined #RubyOnRails
[06:02:24] yfeldblum: has joined #RubyOnRails
[06:03:36] tvw: has joined #RubyOnRails
[06:08:43] conta: has joined #RubyOnRails
[06:10:59] emchamp: has joined #RubyOnRails
[06:11:12] lyoshajapan: has joined #RubyOnRails
[06:14:11] neilfse: has joined #RubyOnRails
[06:14:54] Bloomer: has joined #RubyOnRails
[06:17:42] bob434: has joined #RubyOnRails
[06:20:59] djbkd: has joined #RubyOnRails
[06:22:01] krz: has joined #RubyOnRails
[06:23:51] lyoshajapan: has joined #RubyOnRails
[06:24:34] mark3: has joined #RubyOnRails
[06:27:39] FreddieFresh: has joined #RubyOnRails
[06:29:07] tetraktys: has joined #RubyOnRails
[06:29:12] pawnbox: has joined #RubyOnRails
[06:29:18] sp1rs: has joined #RubyOnRails
[06:29:45] pawnbox_: has joined #RubyOnRails
[06:30:13] solars: has joined #RubyOnRails
[06:31:16] yfeldblum: has joined #RubyOnRails
[06:32:52] merida: has joined #RubyOnRails
[06:33:38] aganov: has joined #RubyOnRails
[06:35:37] artto: has joined #RubyOnRails
[06:41:46] bronson: has joined #RubyOnRails
[06:42:11] siaW: has joined #RubyOnRails
[06:43:31] crameth: has joined #RubyOnRails
[06:43:33] ur5us: has joined #RubyOnRails
[06:45:27] Ryzokuken: has joined #RubyOnRails
[06:45:42] Jasaka: has joined #RubyOnRails
[06:45:55] Ryzokuken: homo sapiens
[06:46:01] Ryzokuken: i have a problem
[06:46:25] Ryzokuken: i need to make a tree-like / directory structure in rails (activerecord)
[06:46:30] Ryzokuken: how do i do it?
[06:46:44] Ryzokuken: is there some associations trick? a gem, perhaps?
[06:46:47] sevenseacat: likely with a self-referential relationship
[06:46:54] siaW: hello, my rails app is downloading images from a source and saving it in assets/images. obviously this is not working on heroku. any idea how i can have my rails app dl images, store it and use it if i don’t want to use S3?
[06:46:57] ur5us: has joined #RubyOnRails
[06:47:08] sevenseacat: siaw: on heroku? no.
[06:47:30] sevenseacat: you need to use some kind of external file storage
[06:47:49] Radar: ryzokuken: Look at the awesome_nested_set gem
[06:47:51] siaW: sevenseacat: ah i see. so it means S3 is my only option?
[06:47:58] sevenseacat: it means you need some external file storage
[06:48:08] Ryzokuken: Radar: sure, thanks
[06:48:12] sevenseacat: S3 is just very very common
[06:48:36] siaW: sevenseacat: like Dropbox?
[06:48:54] sevenseacat: that.... sounds odd, but it could likely work.
[06:49:12] siaW: sevenseacat: i know it sounds odd, i just can think of any other thing apart from S3
[06:50:07] krz: has joined #RubyOnRails
[06:53:30] morfin: has joined #RubyOnRails
[06:53:47] czerasz: has joined #RubyOnRails
[06:53:58] morfin: hello guys
[06:54:20] morfin: is that fine that strace/truss shows thousands of ENOENT errors?
[06:54:25] sevenseacat: *hello everyone
[06:54:30] sp1rs: has joined #RubyOnRails
[06:54:44] morfin: when i am loading my application
[06:56:01] mat-svol: has joined #RubyOnRails
[06:56:08] artto: has joined #RubyOnRails
[06:56:38] merida: has joined #RubyOnRails
[06:58:09] merida_: has joined #RubyOnRails
[07:01:50] phaza: has joined #RubyOnRails
[07:05:07] tetraktys: has joined #RubyOnRails
[07:06:29] arup_r: has joined #RubyOnRails
[07:07:04] swiftie: has joined #RubyOnRails
[07:09:02] norc: has joined #RubyOnRails
[07:09:23] eggoez: has joined #RubyOnRails
[07:09:25] swiftie: has joined #RubyOnRails
[07:11:21] RTG`: has joined #RubyOnRails
[07:11:44] xhoy: hi all there :)
[07:12:37] swiftie: Hi folks. :) I wanted to add a before_add callback to an association. However, the issue is that the association is already defined like this in a gem I use (spree).
[07:12:39] swiftie: has_many :taxons, through: :classifications, before_remove: :remove_taxon
[07:13:20] swiftie: The way to usually add to the model is to use to use something like Spree::Product.class_eval
[07:13:41] swiftie: But I'm not sure how I can add a new callback once the association is already setup. Please help.
[07:14:29] arBmind: has joined #RubyOnRails
[07:15:05] yfeldblum: has joined #RubyOnRails
[07:15:49] arup_r: if you define, again in the decorator .. the old one will be overrode by the new one.. swiftie do add your one. and test it in rails console.
[07:15:52] AimlessRAven: has joined #RubyOnRails
[07:16:54] swiftie: ok. So the question is do I specify the before_remove :remove_taxon association again?
[07:17:07] swiftie: *callback again
[07:17:14] swiftie: I'll test in rails console
[07:17:38] baweaver: has joined #RubyOnRails
[07:19:12] merida: has joined #RubyOnRails
[07:20:13] tetraktys: has joined #RubyOnRails
[07:22:45] dionysus69: has joined #RubyOnRails
[07:23:24] rails690: has joined #RubyOnRails
[07:23:44] rails690: is it possible to use Nginx + Phusion Passenger + Thin?
[07:23:47] tagaulap: has joined #RubyOnRails
[07:23:51] rails690: i need Thin for websockets...
[07:25:22] norc: swiftie: It looks like you have to do this by hand: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/builder/collection_association.rb#L32-L48
[07:25:28] rails690_: has joined #RubyOnRails
[07:26:02] artto: has joined #RubyOnRails
[07:26:53] hotpancakes: has joined #RubyOnRails
[07:27:24] tenzan: has joined #RubyOnRails
[07:27:47] djbkd: has joined #RubyOnRails
[07:27:54] rails690_: hello? anyone here?
[07:30:48] ferr: has joined #RubyOnRails
[07:31:32] djbkd: has joined #RubyOnRails
[07:31:45] norc: rails690_: Why do you think you need thin?
[07:32:01] rails690_: norc: because the gem private_pub requires it
[07:33:34] tildes: rails690_: I have never heard of anyone using Phusion Passenger + Thin
[07:34:09] tildes: googling it doesn't make me any wiser either. you could try searching phusion passenger with websockets
[07:34:25] norc: rails690_: Well either you use a massively outdated Gem that has not received any commits in 3 years, tying yourself to Thin - or you could just prepare for actioncable with whatever server solution you please.
[07:34:27] norc: Your choice.
[07:34:38] DoubleMalt: has joined #RubyOnRails
[07:34:49] pawnbox: has joined #RubyOnRails
[07:35:52] norc: rails690_: Or you can also use straight faye-websocket-ruby
[07:36:53] Palsson: has joined #RubyOnRails
[07:38:08] triptec: has joined #RubyOnRails
[07:38:47] bruno-: has joined #RubyOnRails
[07:38:52] brunto: has joined #RubyOnRails
[07:39:45] antgel: has joined #RubyOnRails
[07:40:21] merida: has joined #RubyOnRails
[07:42:27] kadoppe: has joined #RubyOnRails
[07:49:14] marr: has joined #RubyOnRails
[07:50:38] jenrzzz: has joined #RubyOnRails
[07:52:20] matthias_: has joined #RubyOnRails
[07:54:10] brunto: has joined #RubyOnRails
[07:55:04] lyoshajapan: has joined #RubyOnRails
[07:56:05] conta: has joined #RubyOnRails
[07:56:49] brunto_: has joined #RubyOnRails
[07:57:48] brunto: has joined #RubyOnRails
[08:00:23] walidvb: has joined #RubyOnRails
[08:00:42] Inside: has joined #RubyOnRails
[08:01:55] walidvb: hey all! I'm trying to get activeadmin and cancancan to work together, but can't get my permissions right..
[08:02:33] walidvb: here is my config: https://gist.github.com/walidvb/3bcacc25122fab91059f82716be08638
[08:02:49] walidvb: any help greatly appreciated, been fiddling with this for quite a bit of time now, no luck
[08:05:26] universa1: walidvb: error?
[08:06:25] universa1: walidvb: https://gist.github.com/walidvb/3bcacc25122fab91059f82716be08638#file-ability-rb-L10 vs https://gist.github.com/walidvb/3bcacc25122fab91059f82716be08638#file-application_controller-rb-L4
[08:06:37] Silox|: has joined #RubyOnRails
[08:07:15] walidvb: https://gist.github.com/walidvb/3bcacc25122fab91059f82716be08638#file-application_controller-rb-L9 is the one used.
[08:07:31] walidvb: looks like the problem is more on the https://gist.github.com/walidvb/3bcacc25122fab91059f82716be08638#file-ability-rb-L15 side
[08:07:51] walidvb: sry i'm getting another unrelated error right now(of course, great timing ;) ). just a sec
[08:08:43] universa1: walidvb: ability: can :access, :full_admin <-> controller: cannot?(:access, :admin)
[08:08:48] universa1: walidvb: do you notice any difference?
[08:09:15] pawnbox: has joined #RubyOnRails
[08:11:39] jsrn: has joined #RubyOnRails
[08:12:38] artto: has joined #RubyOnRails
[08:14:14] walidvb: hm yes, however, apols, but seems like i updated a gem and that broke the rest :/ i've cleaned ability.rb, and forgot this line...
[08:14:46] darutoko: has joined #RubyOnRails
[08:14:51] arup_r: has joined #RubyOnRails
[08:15:54] universa1: are you sure manage includes access ?
[08:18:20] walidvb: that's the activeadmin example. afaik, cancan's :manage = [:read, :destroy, :update, :create]
[08:19:54] tetraktys: has joined #RubyOnRails
[08:20:40] chridal: People: how many connections do you keep in your PG/MySQL connection pool?
[08:21:01] chridal: Also, how have you set up your Redis connection pool?
[08:21:25] chridal: Also, good morning o/
[08:22:43] tbuehlmann: chridal: depends on many factors. how many connections does your rdbms allow? how many workers does your application webserver have? are these processes and/or threads? do you use actioncable or another service that needs connections?
[08:23:03] solars: hi, does anyone know how to make something like this work? ArProperty.find_by(property_id: 'DEMO_CHAIN').all_sub_hotels.where(ArBudget.arel_table[:status].in(%w(open closed)).to_sql).includes(:ar_budgets)
[08:23:10] solars: it doesn't seem to join :ar_budgets
[08:23:34] artto: has joined #RubyOnRails
[08:24:15] snowy: has joined #RubyOnRails
[08:24:17] solars: not sure if there is an easier way for the IN() clause if it's on a joined table
[08:25:03] tbuehlmann: should this work? `.where(ar_budgets: {status: ['open', 'closed']})`
[08:25:24] artto: has joined #RubyOnRails
[08:25:48] chridal: tbuehlmann: what does .to_sql output?
[08:26:08] chridal: Ah, syntax error?
[08:26:25] solars: tbuehlmann, let me check
[08:26:48] universa1: walidvb: ok, so in the list you put out, is there access in it?
[08:27:22] universa1: walidvb: :manage = [:read, :destroy, :update, :create]
[08:27:30] chridal: tbuehlmann: Yea, tough one. The theoretical max is 5k+ but I don't know the actual one since I'd have to calculate that by dividing a constant by the amount of memory
[08:27:39] solars: tbuehlmann, hmm getting an error, I'll have a look in detail
[08:27:50] walidvb: true thing, is that the dashboard displays some resources to which the user doesn't have access(but i'd assume those would be filtered out, if the query is affected by cancan)
[08:28:19] universa1: walidvb: o0 you are redirected right?
[08:28:28] tbuehlmann: chridal: 5k connections seems a lot
[08:28:34] chridal: As for workers we're using Resque, so that means processes. Each server (which now has a pool of 5) each have one worker, but we should probably increase the number of workers
[08:28:57] walidvb: no, the list doesn't have access.
[08:29:12] chridal: tbuehlmann: My source right now is a StackOverflow, so this person might be incorrect then
[08:29:17] walidvb: universa1: i'm terribly sorry, in the meantime i've updated some gems and it's broken my admin
[08:29:27] walidvb: i'll fix that and be back
[08:29:29] solars: tbuehlmann, I noticed it's a problem if the table and association is named differently, this works: ArProperty.find_by(property_id: 'DEMO_CHAIN').all_sub_hotels.includes(:budgets).where(ar_budgets: {status: ['open', 'closed']})
[08:29:38] solars: tbuehlmann, note the difference in includes and where
[08:29:38] universa1: walidvb: and can :access, :full_admin DOES NOT include can :access, :admin
[08:31:28] artto_: has joined #RubyOnRails
[08:31:49] sarink: has joined #RubyOnRails
[08:34:12] AimlessRAven: has joined #RubyOnRails
[08:35:58] AimlessRAven: https://gist.github.com/anonymous/b20b888402adb7eed98803612924e990
[08:36:01] AimlessRAven: why i get this error
[08:37:14] hotpancakes: has joined #RubyOnRails
[08:38:41] deur-: AimlessRaven: you can just use "render 'products/table', products: @category_products" in your views
[08:39:04] deur-: the error states it can't find the partial. is it in the right place?
[08:39:09] arup_r: but current one also should work
[08:39:31] AimlessRAven: yea the place is right
[08:39:32] bruno-: has joined #RubyOnRails
[08:39:36] arup_r: AimlessRaven: your partial name is _table.html.haml right? and it is inside views/products dir?
[08:39:51] arup_r: AimlessRaven: and the extension is also right?
[08:40:16] AimlessRAven: i have products view with _table.haml
[08:40:30] arup_r: look my extension
[08:40:41] artto: has joined #RubyOnRails
[08:41:11] arup_r: got the difference of your and mine?
[08:41:13] bmf: has joined #RubyOnRails
[08:41:20] AimlessRAven: arup_r: where is yours?
[08:41:34] arup_r: AimlessRaven: your partial name is _table.html.haml right? and it is inside views/products dir?
[08:41:57] AimlessRAven: arup_r: yeah _table.haml only but i change the name and result is same
[08:42:17] arup_r: you have _table.haml .. make it like _table.html.haml
[08:42:21] zeel_: has joined #RubyOnRails
[08:42:45] AimlessRAven: arup_r: result is same
[08:42:58] artto: has joined #RubyOnRails
[08:43:41] bronson: has joined #RubyOnRails
[08:44:15] arup_r: AimlessRaven: show in gist output of `ls views/products` :)
[08:44:18] akkmaxon: has joined #RubyOnRails
[08:46:02] AimlessRAven: arup_r: .. i do it ;)
[08:46:09] AimlessRAven: some my wrong
[08:47:17] futilegames: has joined #RubyOnRails
[08:47:57] kitsuneyo: has joined #RubyOnRails
[08:48:27] arup_r: hy kitsuneyo
[08:48:36] kitsuneyo: hey arup_r, how are you doing?
[08:48:52] arup_r: good.. thnx for asking.. and you??
[08:51:56] akkmaxon: has joined #RubyOnRails
[08:52:17] artto: has joined #RubyOnRails
[08:53:00] diegoaguilar: has joined #RubyOnRails
[08:55:20] arBmind: has joined #RubyOnRails
[08:56:42] Pathfinder: has joined #RubyOnRails
[08:57:18] mat-svol: has joined #RubyOnRails
[08:57:37] merida: has joined #RubyOnRails
[08:58:10] n008f4g_: has joined #RubyOnRails
[08:59:14] boena: has joined #RubyOnRails
[09:00:49] sp1rs: has joined #RubyOnRails
[09:01:19] boena: Ok, so I have a question after much Googling. Is there some way to get file uploads (multipart form) to work with ActiveResource? I first encountered the Encoding::UndefinedConversionError but after adding activesupport-json_encoder gem it disappeared but the upload still doesn't work... Any help is very much appreciated!
[09:02:11] zpe: has joined #RubyOnRails
[09:02:37] AlexJakeGreen: has joined #RubyOnRails
[09:03:12] Pathfinder: I have been trying to debug this error : "app error: Missing `secret_token` and `secret_key_base` for 'production' environment, set these values in `config/secrets.yml` (RuntimeError)" for the last4hrs :(
[09:04:22] Pathfinder: I have already added and ENV["SECRET_KEY_BASE"] to bashrc which is what is used to set secret_key_base, sourced bashrc but still no luck
[09:05:03] boena: Pathfinder: have you set those in the secrets.yml file too?
[09:05:06] Pathfinder: This occurs when deploying with capistrano. This is what leads to my server displaying a white blank page I beliebe
[09:05:27] Pathfinder: boena: Let me share my configuration on a paste
[09:05:31] pawnbox: has joined #RubyOnRails
[09:05:32] boena: Pathfinder: You should look in the shared-folder if you are using Capistrano
[09:05:50] boena: Pathfinder: /shared/config/secrets.yml
[09:05:54] Pathfinder: boena Done that
[09:06:02] skislak: has joined #RubyOnRails
[09:09:40] boena: Pathfinder: Ok, have you also set in the Capistrano script that this file should be symlinked?
[09:10:12] boena: Pathfinder: In your deploy.rb -> set :linked_files, %w{config/application.yml config/database.yml config/secrets.yml}
[09:12:54] Pathfinder: boena: Here is what I have done
[09:12:56] Pathfinder: http://pastie.org/10796069
[09:14:20] yfeldblum: has joined #RubyOnRails
[09:14:56] ensyde: has joined #RubyOnRails
[09:15:21] Pathfinder: I have also included my Capfile here: http://pastie.org/10796075
[09:16:15] dionysus69: has joined #RubyOnRails
[09:16:35] Pathfinder: Funny thing: ps -aux | grep unicorn returns Sl 08:43 0:00 unicorn worker[0] -c myapp/current/config/unicorn/production.rb -E deployment -D
[09:16:56] Pathfinder: Then -E part shows deployment, should it not point to production?
[09:17:20] workmad3: has joined #RubyOnRails
[09:17:47] boena: Hm, yes it should point to prod
[09:18:00] boena: Seems to be some problem with the unicorn setup then
[09:18:14] boena: That's why it can't find the secrets
[09:18:48] baweaver: has joined #RubyOnRails
[09:18:48] boena: Pathfinder: Because the Capistrano-files and secrets looked fine to me at least
[09:18:51] hotpancakes: has joined #RubyOnRails
[09:19:05] Pathfinder: To be honest I have no idea how to make unicorn point to production using capistrano...
[09:19:27] boena: Pathfinder: I haven't used the gem you are using for Unicorn so can't really help you there :/
[09:19:34] Pathfinder: That seems to come by default maybe generated by gem 'capistrano3-unicorn'
[09:19:54] boena: I always go with capistrano-nginx-unicorn
[09:21:21] arup_r: has joined #RubyOnRails
[09:21:24] Pathfinder: boena: Thanks for the incredible help. Let me see if I can find a workaround
[09:21:52] boena: Pathfinder: Good luck
[09:25:21] qejk: has joined #RubyOnRails
[09:25:46] smoitra_: has joined #RubyOnRails
[09:26:38] smoitra__: has joined #RubyOnRails
[09:26:57] S1kx: has joined #RubyOnRails
[09:28:49] kitsuneyo: good thanks arup_r
[09:30:46] Ryzokuken: has joined #RubyOnRails
[09:31:07] Ryzokuken: i needed help with a project of mine
[09:31:50] tbuehlmann: ryzokuken: it's okay to just pose your question
[09:32:35] Ryzokuken: i wanted to make an app
[09:32:36] petor: has joined #RubyOnRails
[09:32:38] Ryzokuken: tbuehlmann: its kinda huge
[09:32:50] Ryzokuken: that holds a lot of articles
[09:32:59] Ryzokuken: like books, you know.
[09:33:10] Ryzokuken: sorted by genres
[09:33:18] workmad3: ryzokuken: !space
[09:33:18] helpa: ryzokuken: http://i.imgur.com/6txyr.jpg
[09:33:21] walidvb: universa1: apols for that, was stuck in a bootstrap/sass/compass deprecation issues loop. got out \o/
[09:33:25] workmad3: d'oh, not the one I wanted
[09:33:31] sevenseacat: !enternotspace
[09:33:31] helpa: The enter key should not be used as a space bar. Lines on IRC can be up to 400 characters long.
[09:33:35] workmad3: sevenseacat: thanks :)
[09:33:48] workmad3: (loling at !space now :) )
[09:34:36] walidvb: so, i do see the difference. i've made the change, and the authenticate_user_for_admin definitely passes, but the unauthorised_access is triggered by activeadmin
[09:35:11] tjbiddle: has joined #RubyOnRails
[09:36:09] Ryzokuken: so, i decided we needed to have a tree / directory-like structure. i used github repositories for storage for a long time, using AJAX and API calls to generate content for a single-page application.
[09:37:23] tjbiddle: Hey all - Confused on some DateTime w/ time zone stuff. I'm receiving a unix timestamp from my frontend; I'd like to save this as a DateTime for a model; but with respect to a certain time zone. I've tried .in_time_zone("...") but then it changes the time. I essentially want to keep the time; but add/subtract the offset necessary
[09:37:45] hervie: has joined #RubyOnRails
[09:37:59] brunto_: has joined #RubyOnRails
[09:38:15] workmad3: tjbiddle: if you've got a unix timestamp, that should correspond to the time in UTC
[09:38:22] workmad3: tjbiddle: unless your server is badly configured
[09:38:33] kitsuneyo: has joined #RubyOnRails
[09:38:33] darutoko-: has joined #RubyOnRails
[09:38:39] walidvb_: has joined #RubyOnRails
[09:38:46] walidvb_: ACTION got cut off
[09:38:54] tjbiddle: Or maybe I'm thinking about this the wrong way, sec.
[09:38:55] Dreamer3_: has joined #RubyOnRails
[09:39:49] workmad3: tjbiddle: could be :) the times `2015-01-01T12:00:00+0000` and `2015-01-01T11:00:00-0100` are the same time after all
[09:40:22] ebryn_: has joined #RubyOnRails
[09:40:32] tjbiddle: workmad3: Well I think the issue is I'm formatting it in some places, and not others
[09:40:34] bruno-: has joined #RubyOnRails
[09:40:40] Ryzokuken: now, i decided to port to a rails model. but normal associations won't do. i needed a tree structure. infinitely many possible nodes and levels. someone here suggested me to use the gem `awesome_nested_set`, which i did, but i am having problems creating objects using that. i wanted to ask if this was the best approach to my problem. am i going the right way? or will i put a lot of time into this with no avail? is there a bett
[09:40:42] tjbiddle: Just need to figure out where the source of truth should be
[09:41:04] chagel: has joined #RubyOnRails
[09:41:47] maximos: has joined #RubyOnRails
[09:41:57] workmad3: tjbiddle: the typical decision (and the one rails does by default when storing/retrieving dates) is to convert to UTC before storage and convert back to the server TZ on retrieval
[09:42:37] artto: has joined #RubyOnRails
[09:42:41] artmann_: has joined #RubyOnRails
[09:42:46] acetoxy_: has joined #RubyOnRails
[09:42:53] jgrevich_: has joined #RubyOnRails
[09:42:56] Ryzokuken: people, anyone?
[09:42:58] workmad3: tjbiddle: but if you're going to be displaying times with formatting, you're basically down to two options - you can always display in one timezone (and always display that timezone) or you can pick up the user's timezone and display in that
[09:43:00] BaNzoune1: has joined #RubyOnRails
[09:43:16] lyoshaja_: has joined #RubyOnRails
[09:43:16] crankhar1er: has joined #RubyOnRails
[09:43:17] freedrul1: has joined #RubyOnRails
[09:43:17] antgel_: has joined #RubyOnRails
[09:43:35] n008f4g__: has joined #RubyOnRails
[09:43:37] phredus_: has joined #RubyOnRails
[09:43:59] hoodow_: has joined #RubyOnRails
[09:44:00] codelahoma_: has joined #RubyOnRails
[09:44:02] Mch1: has joined #RubyOnRails
[09:44:13] workmad3: ryzokuken: as a minimum, you can just use some form of self-referential association to store trees, but that can be inefficient on deep trees/graphs... awesome_nested_set is a way of providing more efficient traversal
[09:44:41] bronson: has joined #RubyOnRails
[09:44:53] EasyCo_: has joined #RubyOnRails
[09:47:23] mhenrixon_: has joined #RubyOnRails
[09:47:48] apeiros_: has joined #RubyOnRails
[09:47:59] exchgr`: has joined #RubyOnRails
[09:48:04] DiabolikFreenode: has joined #RubyOnRails
[09:48:04] KorriX_: has joined #RubyOnRails
[09:48:46] gambl0re: has joined #RubyOnRails
[09:48:46] gambl0re: has joined #RubyOnRails
[09:50:35] Devalo: has joined #RubyOnRails
[09:51:29] Pathfinder: boena: Even with unicorn set on production I am still getting that message..damn! unicorn master -c myapp/current/config/unicorn/production.rb -E production -D
[09:52:03] kadoppe: has joined #RubyOnRails
[09:53:19] pfg: has joined #RubyOnRails
[09:53:19] daemonwrangler: has joined #RubyOnRails
[09:53:21] acalewin: has joined #RubyOnRails
[09:53:37] jcp: has joined #RubyOnRails
[09:53:44] jcugno__: has joined #RubyOnRails
[09:54:16] skislak: has joined #RubyOnRails
[09:55:19] jwang: has joined #RubyOnRails
[09:55:44] swiftie: has joined #RubyOnRails
[09:56:05] Pathfinder: Hey channel, I am very stuck with this issue: http://pastie.org/10796123. If anyone can help point me in the right direction I would really appreciate it
[09:56:31] egray: has joined #RubyOnRails
[09:57:00] mikecmpbll: has joined #RubyOnRails
[09:57:02] Pathfinder: It is basically a missing secret_key_base on production after deployment using capistrano
[09:57:31] Meow-J: has joined #RubyOnRails
[09:57:59] sevenseacat: "Note: I can also access ENV["SECRET_KEY_BASE"] from RAILS_ENV=production rails c" on your machine, or the server?
[09:58:25] Pathfinder: sevenseacat on the server
[09:58:27] bruce_lee: has joined #RubyOnRails
[09:58:27] bruce_lee: has joined #RubyOnRails
[09:58:51] sevenseacat: what about secret_token? where is that defined
[09:59:27] Pathfinder: In fact I have even changed the secret_key_base on the server secrets.yml to the value in the ENV directly
[09:59:59] Pathfinder: I am quite unsure whether I need that since I can't see any mention of that on the interwebs
[10:00:19] sevenseacat: so is the linking happening correctly when you deploy?
[10:01:02] pawnbox: has joined #RubyOnRails
[10:01:46] Pathfinder: sevenseacat: Linking happens correctly since I can see symlinks are correctly set
[10:01:47] sevenseacat: of your secrets.yml
[10:02:40] sevenseacat: so when you run `RAILS_ENV=production rails c` you can access Rails.application.config.secret_key_base
[10:03:19] sevenseacat: given you telling me 'correctly' doesnt mean anything
[10:04:19] Pathfinder: Looks like Rails.application.config.secret_key_base returns nil but ENV["SECRET_KEY_BASE"] returns my rake secret
[10:04:32] Pathfinder: What may I be doing wrongly
[10:05:21] kitsuneyo: what's a good way to find a collaborator for a rails project?
[10:05:50] sevenseacat: so your symlinking is not being done correctly, because your Rails app is not reading your secrets.yml
[10:05:56] kitsuneyo: non-professional
[10:06:01] sevenseacat: Pathfinder: what ends up symlinked to what in your app
[10:07:05] Pathfinder: sevenseacat: secrets.yml -> /var/www/myapp/shared/config/secrets.yml
[10:07:24] sevenseacat: and where is that secrets.yml located
[10:07:38] Pathfinder: in myapp/current/config/secrets.yml
[10:08:08] Pathfinder: I am using capistrano that is why the convestions are a bit different because the actual rails files are inside the current folder :)
[10:08:17] workmad3: Pathfinder: in `myapp/current` on the server, do you get sensible output when you run `less config/secrets.yml`?
[10:08:27] sevenseacat: i am aware you're using capistrano and what the conventions of it are
[10:09:02] Pathfinder: workmad3: I get the exact output that is on /var/www/myapp/shared/config/secrets.yml
[10:09:14] pacMakaveli: has joined #RubyOnRails
[10:09:22] Pathfinder: sevenseacat: I was informing you in case you use another tool..sorry
[10:09:41] sevenseacat: Pathfinder: you posted a capistrano config file
[10:09:59] sevenseacat: you've mentioned repeatedly you're using capistrano
[10:10:49] jds_: has joined #RubyOnRails
[10:11:00] sevenseacat: Pathfinder: what permissions are on that config file? maybe your server can't read it?
[10:11:07] Pathfinder: Hahahaha...I really don't want to blow up any help I am getting since I have been stuck for hours already and I feel I am out of my breadth. Apologies for the repetition
[10:12:58] Pathfinder: Running ls -la returns www-data www-data
[10:12:59] quazimodo: has joined #RubyOnRails
[10:13:22] sevenseacat: okay, but whats the permissions?
[10:14:01] walidvb_: universa1: fyi the error was in assing the namespace_name to the can declaration
[10:15:06] Pathfinder: sevenseacat: On current it
[10:15:33] Pathfinder: And on shared folder it is 775
[10:15:57] blackhuey: has joined #RubyOnRails
[10:16:08] Pathfinder: The shared/config/secrets.yml is 664
[10:17:15] nickenchuggets: has joined #RubyOnRails
[10:17:15] nickenchuggets: has joined #RubyOnRails
[10:17:23] sevenseacat: oh right, you told me the folder permissions
[10:19:17] Pathfinder: sevenseacat: But the database is being accessed in this format too and it works. I have updated some more info on this paste: http://pastie.org/10796155
[10:20:07] quazimod1: has joined #RubyOnRails
[10:22:11] sp1rs: has joined #RubyOnRails
[10:22:26] workmad3: Pathfinder: just out of curiosity... what path are you launching `unicorn master` from?
[10:22:34] pacMakaveli: Pathfinder, you should use Figaro for your environment keys ( my 2 cents ) or, when you provision the server, export those key with source mysecretfile.conf
[10:23:08] sevenseacat: pacMakaveli: that seems entirely irrelevant to this discussion and only confuses the situation
[10:23:25] pacMakaveli: It looks like he's having problems setting environment keys to me
[10:23:28] pacMakaveli: Sorry if that's not the case
[10:23:37] workmad3: pacMakaveli: no, the problem is that his rails app isn't finding `config/secrets.yml`
[10:24:53] Pathfinder: workmad3: I am launching the unicorn master from /var/www/myapp/current/config/unicorn/production.rb
[10:25:07] workmad3: Pathfinder: no, that's the config file you're pointing it at
[10:25:12] tagaulap: has joined #RubyOnRails
[10:25:35] workmad3: Pathfinder: not the current path when `unicorn master` is being run
[10:26:21] workmad3: Pathfinder: basically, I'm wondering a couple of things - 1) does `working_directory` actually change the value of `CWD` for the process? 2) if it does, does it do so prior to preloading the app?
[10:26:47] sevenseacat: workmad3: would that affect the actual rails console, though?
[10:26:50] workmad3: Pathfinder: because I'm betting that rails is looking for `config/secrets.yml` based on the current working directory
[10:27:21] workmad3: sevenseacat: oh, good point... that should have meant the secrets were visible from the rails console still...
[10:27:41] Pathfinder: workmad3: But the config/secrets.yml in current directory is a symlink to shared/config/secrets.yml
[10:27:48] itkin: has joined #RubyOnRails
[10:28:19] Pathfinder: The root of the unicorn/production.rb file points to "/var/www/myapp/current/"
[10:29:32] codelahoma: has joined #RubyOnRails
[10:31:20] dionysus69: has joined #RubyOnRails
[10:33:06] swiftie: has joined #RubyOnRails
[10:33:20] mikecmpb_: has joined #RubyOnRails
[10:33:53] pragmatism: has joined #RubyOnRails
[10:34:27] Kilo`byte: has joined #RubyOnRails
[10:35:17] conta_: has joined #RubyOnRails
[10:36:06] artto: has joined #RubyOnRails
[10:37:05] workmad3: Pathfinder: hmm, really weird :/
[10:37:08] jacobat: has joined #RubyOnRails
[10:37:17] sevenseacat: yeah I'm out of ideas.
[10:37:26] czerasz: has joined #RubyOnRails
[10:37:38] Pathfinder: Lol..I restarted the process from scratch. Maybe one of those try once more to expect a different result :p
[10:37:42] sevenseacat: at this point i want to start suggesting weird shit like dodgy indentation in the yaml file
[10:37:58] sevenseacat: or hidden dodgy whitespace characters
[10:38:17] braincrash: has joined #RubyOnRails
[10:38:18] Puffball: has joined #RubyOnRails
[10:38:28] Detch: has joined #RubyOnRails
[10:38:28] blackhuey: has joined #RubyOnRails
[10:38:31] veloutin: has joined #RubyOnRails
[10:38:35] Shidash: has joined #RubyOnRails
[10:38:50] sevenseacat: suggest re-typing the yaml from scratch ensuring its correct
[10:38:55] lxsameer: has joined #RubyOnRails
[10:39:02] bob434: has joined #RubyOnRails
[10:39:23] FailBit: has left #RubyOnRails: ("WeeChat 0.4.2")
[10:40:16] merida: has joined #RubyOnRails
[10:40:24] svkurowski: has joined #RubyOnRails
[10:40:47] yfeldblum: has joined #RubyOnRails
[10:41:07] morfin: has joined #RubyOnRails
[10:41:31] bruno-: has joined #RubyOnRails
[10:42:49] siaw_: has joined #RubyOnRails
[10:43:43] krz: has joined #RubyOnRails
[10:43:56] dgncn: has joined #RubyOnRails
[10:44:12] MuffinPimp: has joined #RubyOnRails
[10:45:04] brunto: has joined #RubyOnRails
[10:46:15] joaumg: has joined #RubyOnRails
[10:47:26] Liothen: has joined #RubyOnRails
[10:48:14] johnflux: has joined #RubyOnRails
[10:48:14] johnflux: has joined #RubyOnRails
[10:48:35] andatche: has joined #RubyOnRails
[10:50:16] andrew9184: has joined #RubyOnRails
[10:50:17] kitsuneyo: i want to use carrierwave to upload a profile photo for people records. but my app has other kinds of images too. so i'm thinking of having one central Images table, and using join tables to associate images with different kinds of records. good idea, bad idea?
[10:52:00] Didac: has joined #RubyOnRails
[10:53:19] triptec: has joined #RubyOnRails
[10:53:27] pawnbox: has joined #RubyOnRails
[10:54:40] lxsameer: is there any solution to fetch assets path based on a regex ? for example path to all files matching xyz*.js.coffee
[10:56:43] rknLA: has joined #RubyOnRails
[10:58:09] rknLA: hi, i'm trying to figure out how to use open classes to add a method to a class that lives inside of a module, but am getting a method not found error, like so: https://gist.github.com/rknLA/f38fef042db59b2a3b59a968819ede5c
[10:58:48] rknLA: does anyone know what I might be doing wrong there?
[10:59:38] tetraktys: has joined #RubyOnRails
[11:00:00] triptec: has joined #RubyOnRails
[11:01:30] GodFather: has joined #RubyOnRails
[11:01:42] lxsameer: rknLA: use class_eval to define that method
[11:02:08] rknLA: lxsameer: is that because it's a classmethod rather than an instance method?
[11:03:13] lxsameer: in your case not i don't think so
[11:03:14] rails690: has joined #RubyOnRails
[11:03:21] lxsameer: but in case of class_eval yes
[11:04:27] rails690: im currently using phusion passenger as a webserver, but i recently added websockets technology to my app and so it requires me to use Thin to work... Now I'm asking myself the following questions: 1. can I use passenger with thin, just using thin for the WS technology? 2. Will there be any major noticable difference if I switched from Passenger to Thin altogether?
[11:04:40] rodfersou: has joined #RubyOnRails
[11:04:57] rknLA: lxsameer: so, in this case, rather than re-opening the module and class, you'd just define the method in a do block directly?
[11:05:34] lxsameer: rknLA: yeah, for example AClass.class_eval do; def a_class_method; end; end;
[11:05:40] nickjj: rails690, i would separate both servers
[11:06:02] rails690: nickjj: ok and so how exactly does that work
[11:06:05] nickjj: they have completely different needs in a web server, and having them as separate processes will also let you scale them independently
[11:06:22] rails690: nickjj: running them as separate processes is what i want to do, however
[11:06:34] Fernando-Basso: has joined #RubyOnRails
[11:06:37] rails690: nickjj: i dont understand how Thin would be able to work that way
[11:06:40] aaronr: has joined #RubyOnRails
[11:06:44] nickjj: it depends, i would first start with using a websocket implementation that allows you to easily decouple it from your app
[11:06:53] triptec: has joined #RubyOnRails
[11:06:58] nickjj: one that doesn't even depend on thin, or any specific ruby app server
[11:07:20] nickjj: (unless it happens to use it interally)
[11:07:33] nickjj: *internally
[11:07:35] rails690: nickjj: i see
[11:07:46] rknLA: lxsameer: would that let me add things like `has_one` as well? (`has_one` specifically, because the foreign key lives in the DB on the other object?)
[11:07:53] nickjj: rails690, for example http://faye.jcoglan.com/
[11:08:27] nickjj: if you use something like that, than you can continue using passenger and then you'd just make HTTP requests to your dedicated websocket (faye based) server
[11:11:05] renegadeandy: has joined #RubyOnRails
[11:11:05] brunto: has joined #RubyOnRails
[11:11:09] hmarr: has joined #RubyOnRails
[11:12:52] rails690: im using private_pub gem for example, and it uses Faye, however it also has a dependency on Thin
[11:13:22] rails690: there is websocket-rails, but you can only use it with Passenger if you use Redis and that's because of the way it was designed
[11:14:31] rails690: the way Passenger was designed
[11:14:49] iwada: has joined #RubyOnRails
[11:15:07] rknLA: lxsameer: the `class_eval` approach isn't working either, but i think it's because the model file is never being loaded?
[11:15:29] iwada: Please can someone assist with this - http://stackoverflow.com/questions/36586158/undefined-method-id-for-activerecordassociationscollectionproxy/
[11:15:36] rknLA: should that go into a helper file or something?
[11:16:13] lxsameer: rknLA: it's possible but in the first scenario it doesn't matter if it loaded or not, what is the error you get ?
[11:16:24] lxsameer: rknLA: also where do you put your patch file ?
[11:16:28] rknLA: the same undefined method error
[11:16:40] rknLA: as shown in the gist, app/models/[foo].rb
[11:17:03] triptec: has joined #RubyOnRails
[11:17:37] lxsameer: rknLA: you have to put the patch file somewhere where loads first , for example require it in an initializer
[11:17:40] nickjj: rails690, i would just use faye natively and communicate with it by sending post requests
[11:17:48] nickjj: there's a railscasts that goes over how you can set that up
[11:18:04] lxsameer: rknLA: also you have to require the original class file first
[11:19:50] baweaver: has joined #RubyOnRails
[11:20:00] petor: has joined #RubyOnRails
[11:20:05] artto: has joined #RubyOnRails
[11:22:10] kitsuneyo: has joined #RubyOnRails
[11:24:46] triptec: has joined #RubyOnRails
[11:27:27] rknLA: that's still not working, but i think this is indicative of a larger code organization issue on my part, so i'm going to take a completely different approach entirely. thanks for the help!
[11:31:34] ldnunes: has joined #RubyOnRails
[11:31:47] ellen_: has joined #RubyOnRails
[11:32:11] arup_r: has joined #RubyOnRails
[11:33:58] artto_: has joined #RubyOnRails
[11:34:06] duderono_: has joined #RubyOnRails
[11:34:06] Macca: has joined #RubyOnRails
[11:34:07] hotpancakes: has joined #RubyOnRails
[11:34:15] SnowyLAD_: has joined #RubyOnRails
[11:34:21] amortimer1: has joined #RubyOnRails
[11:34:47] watersoul_: has joined #RubyOnRails
[11:35:15] ZerGabriel: has joined #RubyOnRails
[11:36:16] Terens: has joined #RubyOnRails
[11:36:43] chouhoulis: has joined #RubyOnRails
[11:36:55] ruby-lang235: has joined #RubyOnRails
[11:37:07] ereslibre_laptop: has joined #RubyOnRails
[11:37:15] jbermudes: has joined #RubyOnRails
[11:37:32] shaman42: has joined #RubyOnRails
[11:37:42] w0bni: has joined #RubyOnRails
[11:37:46] chouhoulis: has joined #RubyOnRails
[11:37:55] queequeg1: has joined #RubyOnRails
[11:38:02] codelahoma: has joined #RubyOnRails
[11:38:02] jamo: has joined #RubyOnRails
[11:38:26] lawton: has joined #RubyOnRails
[11:38:30] creature: has joined #RubyOnRails
[11:38:31] creature: has joined #RubyOnRails
[11:38:31] King_Rex: has joined #RubyOnRails
[11:38:34] hoylemd: has joined #RubyOnRails
[11:38:39] zpe_: has joined #RubyOnRails
[11:38:45] unreal: has joined #RubyOnRails
[11:38:54] RegulationD: has joined #RubyOnRails
[11:39:50] matt_d: has joined #RubyOnRails
[11:40:25] moei: has joined #RubyOnRails
[11:40:47] M-shine: has joined #RubyOnRails
[11:41:05] moei: has joined #RubyOnRails
[11:41:30] cydrobolt: has joined #RubyOnRails
[11:41:30] cydrobolt: has joined #RubyOnRails
[11:41:31] greenhat: has joined #RubyOnRails
[11:41:32] mwlang: has joined #RubyOnRails
[11:41:39] jhass: has joined #RubyOnRails
[11:41:42] alevy: has joined #RubyOnRails
[11:41:43] merida: has joined #RubyOnRails
[11:41:44] Vircung: has joined #RubyOnRails
[11:41:45] atrius: has joined #RubyOnRails
[11:42:01] maxmanders: has joined #RubyOnRails
[11:42:13] g3funk: has joined #RubyOnRails
[11:42:26] sp1rs: has joined #RubyOnRails
[11:42:36] Thai_: has joined #RubyOnRails
[11:42:41] gmas: has joined #RubyOnRails
[11:43:34] null__: has joined #RubyOnRails
[11:43:34] null__: has joined #RubyOnRails
[11:43:40] rubyonrails572: has joined #RubyOnRails
[11:44:13] rubyonrails572: we're trying out rails5beta3 and run into an odd issue
[11:44:16] swistak35: has joined #RubyOnRails
[11:44:43] rubyonrails572: I can't seem to disable controller caching in development
[11:45:13] rubyonrails572: I've tried with webrick, updated puma, nothing seems to work
[11:45:25] fox_mulder_cp: has joined #RubyOnRails
[11:46:16] rubyonrails572: anyone got any ideas whats going on?
[11:46:32] bronson: has joined #RubyOnRails
[11:47:06] artto: has joined #RubyOnRails
[11:47:08] vanderkerkoff: has joined #RubyOnRails
[11:47:34] smoitra: has joined #RubyOnRails
[11:47:49] vanderkerkoff: is this the wrong place to ask questions about rails5beta?
[11:48:33] scrooloose: has joined #RubyOnRails
[11:48:45] [dmp]: has joined #RubyOnRails
[11:49:12] gremly: has joined #RubyOnRails
[11:49:18] AlexJakeGreen: has joined #RubyOnRails
[11:49:20] aganov: has joined #RubyOnRails
[11:49:29] rapha: has joined #RubyOnRails
[11:49:36] egray: has joined #RubyOnRails
[11:50:00] jerohm: has joined #RubyOnRails
[11:50:40] jwang: has joined #RubyOnRails
[11:50:45] arup_r: no it is correct place as long as it is Rails.. :D vanderkerkoff
[11:50:51] existensil: has joined #RubyOnRails
[11:50:52] wldcordeiro: has joined #RubyOnRails
[11:51:18] vanderkerkoff: we’re having some issues with controller caching in development
[11:51:52] vanderkerkoff: the only way I can disbale it, is to add this line to development.rb
[11:51:55] vanderkerkoff: config.reload_classes_only_on_change = false
[11:52:05] vanderkerkoff: but that causes a shit load of other errors to pop up
[11:53:12] FooMunki: has joined #RubyOnRails
[11:53:17] vanderkerkoff: disbale = disable
[11:54:31] universa1: vanderkerkoff: code causing errors => gist
[11:54:59] vanderkerkoff: um, that’s going to be hard
[11:55:10] universa1: ok, then it's going to be impossible to help you.
[11:55:36] vanderkerkoff: I can delete the entire contents of a controller, refresh the page in the browser, or open and close the browser, and the page still works
[11:56:43] vanderkerkoff: let me see if I can reproduce the issue in a brand new rails app
[12:00:00] mat-svol: has joined #RubyOnRails
[12:00:13] srinidhi: has joined #RubyOnRails
[12:00:45] tetraktys: has joined #RubyOnRails
[12:02:32] workmad3: vanderkerkoff: you probably can... removing classes entirely is an edge case that I'm not sure rails autoloading handles particularly well
[12:02:33] conta_: has joined #RubyOnRails
[12:03:34] vanderkerkoff: I’m testing by changing a variable that’s getting set in the controller workmad3
[12:03:34] vanderkerkoff: maybe that’s a bad test?
[12:03:47] artto: has joined #RubyOnRails
[12:04:07] maxx88: has joined #RubyOnRails
[12:04:45] Sylario: has joined #RubyOnRails
[12:05:08] workmad3: vanderkerkoff: that should be fine... so you're not getting changes when you change the file and reload?
[12:05:08] sp1rs: has joined #RubyOnRails
[12:05:10] Akuma0n3: has joined #RubyOnRails
[12:05:40] workmad3: vanderkerkoff: is your dev server setup out of the ordinary? (e.g. are you editing in a host OS and running the dev server in a VM?)
[12:05:42] Pathfinder: has joined #RubyOnRails
[12:05:58] vanderkerkoff: we’re using docker locally, yes
[12:06:29] Sylario: I do not understand the concern :class_name syntax of this class : https://github.com/ivaldi/brimir/blob/master/app/models/concerns/reply_notifications.rb
[12:06:30] workmad3: vanderkerkoff: the file-change detection rails uses has a habit of breaking in situations like that
[12:06:33] vanderkerkoff: I’m editing on my mac, the app is running in a container on my boot2docker host
[12:06:56] Sylario: Every doc about concerns says it's module extending concern and here it is a concern do
[12:07:02] workmad3: vanderkerkoff: afaik, it's a known issue with guest directories in virtualbox (which is what docker uses on a mac)
[12:07:16] vanderkerkoff: ahh, that old chestnut
[12:07:28] pawnbox: has joined #RubyOnRails
[12:07:29] vanderkerkoff: I’ve already had some fun with that
[12:07:44] workmad3: vanderkerkoff: I bet you can't reproduce it if you run the dev server on your mac rather than in a docker container ;)
[12:07:47] vanderkerkoff: we couldn’t setup local data stores becuase of it
[12:08:00] vanderkerkoff: makes sense now you mention it
[12:08:16] vanderkerkoff: one solution was to use NFS, but that’s a ballache as well
[12:08:44] vanderkerkoff: I’ve got the beta of the new docker app that is supposed to resolve this, but I’ve got 12 devs here, they’ll all need it if it works
[12:08:50] tbuehlmann: sylario, see http://api.rubyonrails.org/classes/Module/Concerning.html#method-i-concern
[12:09:21] workmad3: the annoyances, irritations and odd edge-cases of running apps inside containers inside a VM have always put me off adopting that as a primary workflow :)
[12:09:32] merida_: has joined #RubyOnRails
[12:09:48] Sylario: tbuehlmann: thx ! by curiosity, did you knew this syntax or did you manage to find it by google?
[12:09:59] vanderkerkoff: my boss runs it from a VM unix box, and thinks it’s great
[12:10:12] tbuehlmann: I didn't know the method and found it at http://api.rubyonrails.org/
[12:10:25] vanderkerkoff: but all the other devs want to use their macs, and virtualbox, which means it fails often with issues like this
[12:10:28] tjbiddle: has joined #RubyOnRails
[12:10:30] kitsuneyo: can i create class Image < ActiveRecord::Base with no activerecord table, add validations and methods that are common to all my images, then create (for example) and active record model PersonPortrait < Image and have access to all those methods and validations from the original Image class?
[12:10:50] arup_r: kitsuneyo: use ActiveModel
[12:10:53] merida__: has joined #RubyOnRails
[12:10:59] vanderkerkoff: anyway, I’m way off rails track, thanks workmad3
[12:11:14] kitsuneyo: ActiveModel arup_r?
[12:11:26] arup_r: kitsuneyo: read railsguide of ActiveModel ..
[12:11:55] vanderkerkoff: universa1: wasn’t that impossible was it?
[12:11:58] pontiki: has joined #RubyOnRails
[12:11:58] kitsuneyo: ok reading now, thanks arup_r
[12:12:07] arup_r: kitsuneyo: http://edgeguides.rubyonrails.org/active_model_basics.html
[12:12:22] pontiki: has left #RubyOnRails: ()
[12:12:41] arup_r: ohh.. cool. if you read the introduction, you will see why this exist.. :D
[12:13:19] vanderkerkoff: has left #RubyOnRails: ()
[12:16:43] FooMunki: has joined #RubyOnRails
[12:17:07] djellemah_: has joined #RubyOnRails
[12:18:30] jglauche: has joined #RubyOnRails
[12:20:45] acosonic: Hi All, how would I access value from this data structure value is at bottom http://apaste.info/iAU
[12:21:14] jglauche: heya. So I am doing this kind of workflow again for a new job and was wondering if there's any kind of plugin that does that for me. I have an editor and in that editor I have a button that jumps to a list to search, collect or create a new item that references to the original editor. I need it that when you go back, the original form would have all the data that the user entered
[12:21:53] tetraktys: has joined #RubyOnRails
[12:21:56] arup_r: acosonic: how you reach to data.. let me know that first..
[12:22:40] arup_r: from that code we may extend it..
[12:23:21] acosonic: arup_r: I'm developing a Redmine plugin, and I'm trying to reach value of custom field for project... Project.find(issue_details[:project_id]).custom_field_values
[12:23:57] eyck: has joined #RubyOnRails
[12:24:26] arup_r: acosonic: use gist, and show the method defn of custom_field_values
[12:25:18] kitsuneyo: arup_r if i make Image < ActiveModel, can I inherit methods in an ActiveRecord class later?
[12:25:44] kitsuneyo: maybe i should just make a module and include it in all my image classes?
[12:26:19] acosonic: arup_r: uh that's like too much trouble :) I'll first try to figure something out...
[12:26:56] edwinvdgraaf: has joined #RubyOnRails
[12:27:04] kitsuneyo: after reading the guide i don't see the point of using activemodel instead of activerecord, when i WILL need to use active record with the classes that inherit from this one
[12:27:24] arup_r: kitsuneyo: that guide said what it supports.. so those module only your active model class will be able to use..
[12:28:12] arup_r: kitsuneyo: You will have validations, callbacks, serialization ..
[12:28:24] arup_r: attributes to create AR like columns.. so what else you need..
[12:28:27] herpless: has joined #RubyOnRails
[12:28:43] arup_r: You can not do query like joins, which is make sense why not
[12:29:45] arup_r: we do query to tables, not our vaniall ruby class etc..
[12:30:23] arup_r: kitsuneyo: now tell why you don't see the point of use it.. That modile people use to build form objects.. for example..
[12:31:18] acosonic: arup_r: https://github.com/redmine/redmine/blob/5d9b87de3a9df6fcb256efa5f2274845b6050085/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb
[12:31:19] kitsuneyo: my aim is to build an Image class with methods common to all of my activerecord image models
[12:31:36] arup_r: like what kind of methods?
[12:32:01] arup_r: what operations you want to do?
[12:32:23] kitsuneyo: like handling usage rights data
[12:32:35] arup_r: means validations?
[12:32:45] kitsuneyo: and validations as well
[12:32:57] arup_r: look http://edgeguides.rubyonrails.org/active_model_basics.html#validations
[12:33:02] arup_r: and then what next?
[12:33:18] kitsuneyo: the point is though, the classes that inherit from it are active record
[12:33:34] epochwolf: arup_r: please don't link to edgeguides unless someone is using edge rails.
[12:34:10] vladr: has joined #RubyOnRails
[12:34:30] arup_r: epochwolf: that's ok. But it is in rails. not new those features..
[12:35:10] Rubie: has joined #RubyOnRails
[12:35:29] arup_r: kitsuneyo: when you don't have table, then to get some activerecord like behaviours, ActiveModel is way..
[12:36:09] Spami: has joined #RubyOnRails
[12:38:13] vladr: has joined #RubyOnRails
[12:38:49] pawnbox: has joined #RubyOnRails
[12:39:54] kitsuneyo: arup_r, ok, but i will have tables for the child classes
[12:40:03] kitsuneyo: so i guess activemodel is right for this
[12:40:42] WilfredTheGreat: has joined #RubyOnRails
[12:42:05] vladr: has joined #RubyOnRails
[12:42:22] vladr: has joined #RubyOnRails
[12:43:32] njero: has joined #RubyOnRails
[12:46:58] petor: has joined #RubyOnRails
[12:51:05] kadoppe: has joined #RubyOnRails
[12:51:06] srinidhi: has joined #RubyOnRails
[12:51:06] mat-svol: has joined #RubyOnRails
[12:52:16] wolfravenous: has joined #RubyOnRails
[12:52:26] artto: has joined #RubyOnRails
[12:54:48] flashpoint9: has joined #RubyOnRails
[12:56:58] acosonic: so I narrowed down structure to this http://apaste.info/Pn8 how do I access @value ?
[12:57:39] juanca_: has joined #RubyOnRails
[12:58:22] Malgorath: has joined #RubyOnRails
[12:58:42] arup_r: acosonic: try this http://api.rubyonrails.org/classes/Object.html#method-i-instance_values on the object of CustomFieldValue
[12:58:59] merida: has joined #RubyOnRails
[12:59:36] Logico: has joined #RubyOnRails
[13:01:06] ramortegui: has joined #RubyOnRails
[13:01:12] joshkovach: has joined #RubyOnRails
[13:02:01] kadoppe: has joined #RubyOnRails
[13:03:00] tjbiddle: has joined #RubyOnRails
[13:03:50] joshkovach: has joined #RubyOnRails
[13:04:51] Malgorath: Can someone look at https://gist.github.com/5b3dc7f313e855041033c396ed3b067c and tell me why the def set_todolist is not working? I am getting this error: undefined method `id' for #<Class:0x007f2c80083370>
[13:05:20] GodFather: has joined #RubyOnRails
[13:06:42] pwnd_nsfw`: malgorath, what do your rotes look like? And what is the URL when you're calling whatever action
[13:06:57] ekinmur: has joined #RubyOnRails
[13:08:19] Malgorath: the browser url is http://localhost:3000/todolist/todolists trying to do a new item creation. Gist for Routes: https://gist.github.com/3087d9075bde97ced9877fc29881025f this is all in an engine, if you need info from the parent, I can do that also
[13:08:19] DragonPunch: has joined #RubyOnRails
[13:08:53] pwnd_nsfw`: if you're trying to do a new one... you shouldn't be setting todolist to anything but a new instance of todolist
[13:09:19] Malgorath: I'm doing the tutorial http://guides.rubyonrails.org/engines.html
[13:09:22] pwnd_nsfw`: the url should be /todolist/new
[13:10:06] pawnbox: has joined #RubyOnRails
[13:10:12] pwnd_nsfw`: the way the routes are setup is... if you do todolist/todolist
[13:10:24] pwnd_nsfw`: it think todolist is a parameter, and passes that through params[:id]
[13:10:29] zpe: has joined #RubyOnRails
[13:10:39] pawnbox: has joined #RubyOnRails
[13:11:03] squiercaster: has joined #RubyOnRails
[13:11:57] sp1rs: has joined #RubyOnRails
[13:12:09] Malgorath: pwnd_nsfw`: I understand what your going towards and I'll look at that, but this was working till I added the user_id field to the table
[13:12:29] pwnd_nsfw`: I doubt it, but *shrugs*
[13:13:08] juanca99: has joined #RubyOnRails
[13:13:59] artto: has joined #RubyOnRails
[13:15:37] context: malgorath: funny. you gist stuff, and say the error is 'undefined method id' except your code never calls id.
[13:16:07] context: for all we know you are doing nil.id and asking for help for the kicks
[13:16:39] context: the browser url is http://localhost:3000/todolist/todolists
[13:16:54] context: malgorath: also, read your own damn code, RIGHT above the new method you see: # GET /todolists/new
[13:17:01] context: NOT /todolist/todolists
[13:17:15] pwnd_nsfw`: dem scaffolds dough
[13:17:17] context: that should be giving you a route not found exception, or you are just lying about everything you are doing
[13:17:29] ekinmur: has joined #RubyOnRails
[13:17:55] context: malgorath: i suggrest slowing down. `rake routes` and try again.
[13:19:51] zpe: has joined #RubyOnRails
[13:22:40] Spami: has joined #RubyOnRails
[13:23:51] fmcgeough: has joined #RubyOnRails
[13:25:12] antgel: has joined #RubyOnRails
[13:25:47] Malgorath: context: that # GET /todolists/new is generated doing scaffolding. here is the full page error, and oddly enough it says the exact error I stated so perhaps I am not LYING nor am I being a tool to others without understanding whats going on. I am going by the ruby engine guide for building plugins. so namespacing is something they say to do, hence the added items to the urls. If that is not correct perhaps you should correct the rails doc guys not
[13:26:01] Malgorath: https://gist.github.com/malgorath/8df7e34225f87d8574b5858f8a797420
[13:26:15] lxsameer: is there any different way in rails5 to use asset_path helpers in controllers ?
[13:27:39] eljimmy: has joined #RubyOnRails
[13:28:03] ekinmur: has joined #RubyOnRails
[13:28:57] enkristoffer: I have a model that accepts nested attributes. I'd like to somehow get the value of one of those nested attributes before save, so that I can use it in my parent model. Is that even possible?
[13:29:03] chagel: has joined #RubyOnRails
[13:31:19] hotpancakes: has joined #RubyOnRails
[13:32:22] Malgorath: context: also if you read my actual question you see me say CREATE a new item, never did I say it happens on the def new, so perhaps reading EVERYTHING as it is written and not guess what you think is happening and call someone a liar?
[13:33:46] workmad3_: has joined #RubyOnRails
[13:34:12] duderonomy: has joined #RubyOnRails
[13:34:23] hotpanca_: has joined #RubyOnRails
[13:34:31] brunto_: has joined #RubyOnRails
[13:34:34] morfin60: has joined #RubyOnRails
[13:34:51] arup_r: enkristoffer: you have access to them through params inside a controller.. you can access it using `#[]` method.
[13:36:17] creature_: has joined #RubyOnRails
[13:36:44] Skelz0r_: has joined #RubyOnRails
[13:36:54] LowLifePerv: has joined #RubyOnRails
[13:37:22] context: malgorath: alright. you 'got' me there. so error really shows nothing at all for line #40 ? doesnt tell you the filename its failing on ?
[13:37:30] swav_: has joined #RubyOnRails
[13:37:58] context: also, puts whatever.inspect to see what exactly you are trying to call .id on
[13:37:59] futilegames: has joined #RubyOnRails
[13:38:00] drbayer: has joined #RubyOnRails
[13:38:03] context: ^^ troubleshooting
[13:38:06] Samiz: has joined #RubyOnRails
[13:38:13] bitemyap1: has joined #RubyOnRails
[13:38:21] Alek: has joined #RubyOnRails
[13:38:40] Jamo_: has joined #RubyOnRails
[13:38:43] Wobni: has joined #RubyOnRails
[13:38:44] croberts: has joined #RubyOnRails
[13:38:56] jbermudes_: has joined #RubyOnRails
[13:38:57] jbermudes_: has joined #RubyOnRails
[13:38:59] tw1sted_: has joined #RubyOnRails
[13:39:24] hinbody_: has joined #RubyOnRails
[13:39:40] juanca_: has joined #RubyOnRails
[13:40:04] Malgorath: context: NoMethodError in OpenprojectTodolist::TodolistsController#create at top of error, and when I look in app/controllers/openproject_todolist/todolist_controller.rb the line @todolist = Todolist.find(params[:id]) seemds to be an issue.(in the def set_todolist)
[13:40:25] reaVer_: has joined #RubyOnRails
[13:41:11] beingjohnm_: has joined #RubyOnRails
[13:41:26] akshat: has joined #RubyOnRails
[13:42:06] universa1: malgorath: easy to find out:
[13:42:09] Haydos_: has joined #RubyOnRails
[13:42:28] universa1: malgorath: id = params[:id]\n@todolist = Todolist.find(id)
[13:42:55] braidn_: has joined #RubyOnRails
[13:43:08] gaffo: has joined #RubyOnRails
[13:43:16] bruno-: has joined #RubyOnRails
[13:43:32] context: malgorath: you just said you are trouble shooting CREATING a todolist
[13:43:46] creature: has joined #RubyOnRails
[13:43:51] shamanime: has joined #RubyOnRails
[13:43:56] context: NoMethodError in OpenprojectTodolist::TodolistsController#create
[13:43:57] context: undefined method `id' for #<Class:0x007f918592b1e8>
[13:44:11] context: before_action :set_todolist, only: [:show, :edit, :update, :destroy]
[13:44:14] michael_mbp: has joined #RubyOnRails
[13:44:26] context: WHY would CREATE todolist call set_todolist ?!?!
[13:44:44] context: you cant find a todolist if you are creating it...
[13:44:46] pwnd_nsfw`: for the lulz
[13:45:05] context: also... wtf does that error (showing NOTHING on line 40) have to do with set_todolist ?
[13:45:15] srinidhi: has joined #RubyOnRails
[13:45:25] context: the code you gisted shows the update method on line 40.
[13:46:17] enkristoffer: has joined #RubyOnRails
[13:46:35] context: malgorath: try saying/gisting stuff that actually relates to each other.
[13:47:20] petor: has joined #RubyOnRails
[13:47:40] hotpanca_: has joined #RubyOnRails
[13:47:43] brunto: has joined #RubyOnRails
[13:47:45] maxdoubt: has joined #RubyOnRails
[13:48:23] context: malgorath: also, for future reference "params[:id]" is not calling a method named 'id' like.. at all...
[13:48:36] context: it IS calling a method called '[]'
[13:49:15] Malgorath: context: you can move along to someone else, I'll wait for someone that actually is here to help people not berate them.
[13:50:00] context: malgorath: id probably be nicer if anything you said made sense. you should go back and read everything you have gisted/said and ask yourself how it relates to each other.
[13:50:23] context: malgorath: help others help you you know?
[13:50:51] Malgorath: context: I don't think you would, your an elitest that if someone doesn't speak or rely how you prefer you bash them immediately
[13:51:32] epochwolf: malgorath: You're been in here since Feburary of 2013, your incompentence is legendary.
[13:51:38] myntcake: has joined #RubyOnRails
[13:52:00] patrick_star_3: has joined #RubyOnRails
[13:52:38] Devalo: has joined #RubyOnRails
[13:52:48] bmf: has joined #RubyOnRails
[13:53:38] Malgorath: epochwolf: oh I didn't say I was a know it all, I infact have on several occassions talked at length about my lack of understanding for Ruby on Rails, but when I talk to people here I never speak to people calling them a lair or being a jerk to someone. if context would like to talk to someone as a person, he/she/it might find people will explain things a bit more clearly
[13:54:10] tildes: malgorath: I can't figure out your gists either. Why assume the worst about someone who is actually looking at your code?
[13:54:34] epochwolf: malgorath: I don't care. You've been here for 4 years and haven't learned basic programming.
[13:55:00] artto: has joined #RubyOnRails
[13:55:29] Malgorath: tildes: I didn't assume, if you read context's first 3 comments to me, he called me a liar because it makes complete logical sense that I'd come in here and try my best to just post the worst possible question for help
[13:55:52] epochwolf: context: take a hike,
[13:56:01] epochwolf: This isn't worth our time.
[13:56:59] artto: has joined #RubyOnRails
[13:57:27] epochwolf: tildes: My apologies for being a dick. Sometimes being polite just doesn't work anymore.
[13:57:47] matthias_: has joined #RubyOnRails
[13:58:59] tildes: epochwolf: no worries
[13:59:12] Malgorath: epochwolf: maybe I have been trying to do this then had a major surgery, took 8 months off and then came back and everytime I try to do something actually complicated beyond running scaffolding generators I get met with attitude instead of maybe informing me of the proper way. I've been helped by many people that actualy ask me questions instead of just assuming things.
[14:00:04] beingjohnm: has joined #RubyOnRails
[14:00:31] flashpoint9: has joined #RubyOnRails
[14:00:33] epochwolf: malgorath: unless it was invasive brain surgery, I can't really see that being relevant.
[14:00:40] arup_r: ok.. guys,, I am out.. I feel earthquake in our city,, :Kolkata :(
[14:00:51] arup_r: hope.. I will meet you agian
[14:00:56] Malgorath: be safe arup_r
[14:01:03] Ropeney: epochwolf, that's getting a bit harsh
[14:01:04] maxx88: good luck arup_r
[14:01:55] Malgorath: epochwolf: When I go under general anethestic I have had 2 micro strokes that effected my long term memory for years.
[14:02:07] epochwolf: ah, a stroke would do it.
[14:02:21] workmad3: come on guys, calm it down
[14:02:25] Macaveli: has joined #RubyOnRails
[14:02:35] context: alright. i apologize for 'jumping to conclusions.' i admit i have a problem at that.
[14:02:36] Malgorath: Its something that runs in our family genetically apparently.
[14:04:18] DragonPunch: has joined #RubyOnRails
[14:04:30] Malgorath: I mean I can probably rephrase what I said better, I'm just not sure what would make it clearer. I'm trying to buld an engine to do a 'todo list' for a parent table 'work_packages' in the Openproject.org opensource Project Management application. I was able to create and add list items fine until I added the user_id to the 'todolist' table to track who created the item.
[14:05:09] workmad3: malgorath: that sucks... and to answer your question of 'what would make it clearer' - when you have an issue, create a gist containing the code in the error, and the entire error trace, and start from there
[14:05:13] Malgorath: And I gisted what I thought was relevant but if there is a better way to track this, I'd love to learn it.
[14:05:39] Malgorath: workmad3: copy and pasting the html is not what works best?
[14:05:44] workmad3: malgorath: and go overboard in what you consider relevant... if you're not sure what's wrong, you can't really trust what you consider is relevant
[14:05:47] Malgorath: like the error on the page?
[14:05:50] context: malgorath: to which you will get: purely adding a column to a table or relation to a model will[should] not affect your routing/controller processing in anyway.
[14:07:09] context: malgorath: by default the error page only shows you BT for 'your' code. since from what you posted looks like showing nothing? try making it show all.
[14:07:10] Malgorath: context: I was thinking it shouldn't and I been grinding on this for over an hour and thats why I asked here, I am sorry I got so defensive, you can call me about anything and I'll laugh it off, but ascribing me to a liar can trigger me, and I apologize to you and everyone else for being so reactionary to that.
[14:07:29] workmad3: malgorath: depends on what's going on... and that's the point :) there's no single "This is the info you must provide" that fits all situations
[14:07:31] context: malgorath: also, if you look at your post, it shows nothing for line #40. is it really showing nothing for line #40 in the error on your screen ?
[14:07:55] Malgorath: workmad3: are you saying I should post the 'full trace' ?
[14:08:40] context: in debugging, generally speaking, having more context is generally more helpful.
[14:08:45] workmad3: malgorath: so the best way to get help is to go overboard, and if someone asks for more information try to provide it... and try not to assume that someone is calling you a liar if they say "Hmm, your error is complaining about a method that's not in the code you provided. Are you sure it's that code causing the error?" (or words to that effect, even if they're more abrasive)
[14:08:51] workmad3: malgorath: always
[14:09:04] Malgorath: context: yes, I literally cut and pasted what came up on my screen, but the line 40 in the log is here: NoMethodError (undefined method `id' for #<Class:0x007f918592b1e8>): app/middleware/params_parser_with_exclusion.rb:40:in `call'
[14:09:29] tildes: malgorath: definitely post the full trace
[14:09:50] IrishGringo: has joined #RubyOnRails
[14:10:00] Malgorath: I posted the full trace in the comment for https://gist.github.com/malgorath/8df7e34225f87d8574b5858f8a797420
[14:10:25] workmad3: malgorath: point 2 - try to use gist properly
[14:10:47] workmad3: malgorath: you can edit gists and add more files... it's much easier to read new information if you add it as a new file than if you cram it into a comment
[14:11:09] sevenseacat: has joined #RubyOnRails
[14:11:13] Malgorath: oh, never been asked to do that, usually use gist from commandline so never had to do that
[14:11:20] context: now look at that backtrace
[14:11:26] krz: has joined #RubyOnRails
[14:11:30] context: the first line gives you an idea on where to look
[14:12:53] bruno-: has joined #RubyOnRails
[14:13:25] Malgorath: context: are you talking about the set_author reference ?
[14:13:59] ql6wlld: has joined #RubyOnRails
[14:14:50] smatic1_1: has joined #RubyOnRails
[14:15:17] Malgorath: workmad3: I editted the gist and removed the comment.
[14:15:36] yellow5: has joined #RubyOnRails
[14:15:42] workmad3: malgorath: great, that's now much easier to read :)
[14:16:39] Malgorath: and I just added the controller and models, do you want to see a route file for the parent app or this engine?
[14:16:45] mikecmpb_: anyone got any experience with writing custom rubocop rules or know of any resources on this? i'm not a fan of the indentation rules for multiline assignment
[14:17:28] sandelius: has joined #RubyOnRails
[14:17:29] workmad3: malgorath: what you've provided now gives enough data to spot the issue :)
[14:17:31] workmad3: https://gist.github.com/malgorath/8df7e34225f87d8574b5858f8a797420#file-todolist-rb-L10
[14:17:45] sandelius: does rails provide any stub for changing the nevironment during testing?
[14:17:50] workmad3: malgorath: what are you trying to achieve here?
[14:18:01] emachnic: has joined #RubyOnRails
[14:18:06] sandelius: rails 5 that is
[14:18:50] Malgorath: workmad3: in my table for todolists I have a field I just added called user_id, to link the listed item to the User for openproject
[14:18:50] sevenseacat: sandelius: you should always test in the test environment.
[14:19:03] Malgorath: so I'm trying to get the active users id
[14:19:06] jgt: has joined #RubyOnRails
[14:19:16] openstruct: has joined #RubyOnRails
[14:19:33] morfin60: if i have belongs_to how can i remove all Tours without User entries?
[14:19:34] sandelius: sevenseacat well yeah but I need to test a few things that differes based on the current environment, staging or production
[14:19:35] workmad3: malgorath: right, so there's your mistake... inside the model, there's not a concept of an 'active user' (or current_user as it's normally called)
[14:19:42] sevenseacat: sandelius: no.
[14:19:51] sandelius: sevenseacat yes
[14:19:54] workmad3: malgorath: what you're doing there is calling `id` on the User class, which is a method that doesn't exist
[14:20:03] sevenseacat: sandelius: thats not how tests work.
[14:21:02] workmad3: malgorath: instead, what you should probably be doing is removing that method, and when you create a Todolist you need to pass `current_user` in as the author... `@todolist = Todolist.new(todolist_params.merge(author: current_user))` will probably do it
[14:21:23] Malgorath: oh.. hmm I was going by the little example on the rails engine tutorial that used self.author = User.find_or_create_by(name: author_name)
[14:22:22] drbayer: has joined #RubyOnRails
[14:22:22] Megamos: has joined #RubyOnRails
[14:22:29] tildes: malgorath: http://guides.rubyonrails.org/active_record_basics.html
[14:22:38] morfin60: or how can i delete all users withut articles?
[14:23:12] morfin60: ORMs are so limited :(
[14:23:36] workmad3: malgorath: right... but that example is somewhat different :) it's using some data passed in to the model (author_name) to look up a user, or create it if that user doesn't exist
[14:24:16] Malgorath: workmad3: I thought if I changed to find() it would just look up the id instead but I see what your saying
[14:24:37] workmad3: malgorath: sure... but you'd need to pass the id into the model still
[14:25:24] drbayer: has joined #RubyOnRails
[14:25:41] tildes: malgorath: I don't know if you are familiar with ActiveRecord (which I assume you are using), or the concept of class versus instance methods?
[14:25:45] Kus: has joined #RubyOnRails
[14:25:46] sevenseacat: ah, the old 'orms suck, prove me wrong' trollbait
[14:25:47] workmad3: malgorath: and the most obvious thing to do then would be to pass it in as `author_id`... but `self.author = User.find(author_id)` is a shorthand for `self.author_id = User.find(author_id).id`
[14:26:11] adaedra: by the magic of code, of course
[14:26:52] workmad3: morfin60: User.where.not(id: Article.select(:user_id)).delete_all, assuming the fairly common setup of Article belongs_to :user
[14:27:00] Malgorath: workmad3: undefined local variable or method `current_user' for #<OpenprojectTodolist::TodolistsController:0x007f917da24ed0> when I tried your first ida
[14:27:09] jhack: has joined #RubyOnRails
[14:27:32] workmad3: malgorath: that was based on the idea that your signed-in user was available under the fairly common convention of a method called `current_user`
[14:27:50] workmad3: malgorath: you'll need to modify that for your own setup, as it seems you're using something else to access that :)
[14:28:20] context: workmad3: you can write it for him.
[14:28:23] Malgorath: workmad3: yeah, I really do not like this openproject application, its not very friendly to use(IMO)
[14:28:37] workmad3: context: shush now :P
[14:28:43] Malgorath: context: I don't want him to
[14:28:45] arup_r: has joined #RubyOnRails
[14:28:55] Malgorath: welcome back arup_r , good to see you alive
[14:29:38] arup_r: 6.8 it was.. this is the 5th time since last year my hometown felt earthquake.. first and fouth one was deadly
[14:30:01] arup_r: current one is like 2-3 seconds I felt..
[14:30:02] Malgorath: wow 6.8 is pretty strong
[14:30:13] pwnd_nsfw`: da earf gon' blow up
[14:30:52] morfin60: User.includes(:contact).where(contacts: {id:null}}) worked but idk how
[14:31:16] morfin60: User.includes(:post).where(posts: {id:null}}) worked but idk how
[14:31:26] morfin60: no posts at all
[14:31:26] arup_r: problem is India is not Japan, knows how to deal with this
[14:31:36] arup_r: morfin60: set it as `nil`
[14:31:46] morfin60: oops it was nil
[14:32:09] morfin60: i am wondering wth is that
[14:32:40] kadoppe: has joined #RubyOnRails
[14:32:57] suffice: has joined #RubyOnRails
[14:33:00] arup_r: U mean u have no idea how the query works.. not getting you morfin60 :/
[14:33:13] ornerymoose: has joined #RubyOnRails
[14:33:54] morfin60: is posts here real table name?
[14:34:09] Malgorath: workmad3: does User.current seem it? I'm looking through the plugins for OPs 'vendor' plugins they have and in their create method I see this: @meeting.agenda.author = User.current
[14:34:19] ornerymoose: If I’m using Rails link_to with a param that has a space in it (example, localhost:3000/clients/SOME DATA) whats the best way to account for this? Using constraints in routes.rb?
[14:34:30] morfin60: :post is my relation but posts in condition seems to be real name so i get posts.id IS NULL
[14:34:53] arup_r: morfin60: look at the model, you have a belongs_to association in the User model
[14:35:10] hotpancakes: has joined #RubyOnRails
[14:35:15] arup_r: includes know how to get the table name from the association
[14:35:39] chouhoulis: has joined #RubyOnRails
[14:35:43] arup_r: The heavy lifting Rails is doing for you.. :D
[14:35:45] sevenseacat: ornerymoose: don't generate URLs with spaces in them. or encode them.
[14:36:28] n008f4g_: has joined #RubyOnRails
[14:36:40] ornerymoose: sevebseacat: ok, thank you
[14:36:41] conta_: has joined #RubyOnRails
[14:37:04] flashpoint9: has joined #RubyOnRails
[14:38:39] maxdoubt: has joined #RubyOnRails
[14:39:48] Skelz0r: has joined #RubyOnRails
[14:40:18] crankharder: has joined #RubyOnRails
[14:41:30] tw1sted: has joined #RubyOnRails
[14:43:17] beingjohnm: has joined #RubyOnRails
[14:44:09] Devalo: has joined #RubyOnRails
[14:44:44] Nuck: has joined #RubyOnRails
[14:45:16] walidvb_: i'm trying to remember the name of a function that makes a string css-selectorable, but can't remember nor find it online. ie "The tile & more" -> 'the-title-more'
[14:45:23] macsteps: has joined #RubyOnRails
[14:45:43] walidvb_: rings a bell to anyone?
[14:46:07] pwnd_nsfw`: parameterize
[14:46:32] jottr: has joined #RubyOnRails
[14:47:33] artto: has joined #RubyOnRails
[14:47:55] walidvb_: pwnd_nsfw`: thanks!
[14:49:12] bronson: has joined #RubyOnRails
[14:49:49] sypheren: has joined #RubyOnRails
[14:50:51] morfin60: if i use where and string it does not see what i wrote in includes?
[14:51:37] smathy: has joined #RubyOnRails
[14:51:39] morfin60: User.includes(:post).where("post.id IS NULL OR user.created_at <= ?", 1.week.ago.utc)
[14:52:45] smatic1: has joined #RubyOnRails
[14:52:53] arup_r: ok. that query should throw error by saying relation not found kind of.. no?
[14:53:43] fedexo: has joined #RubyOnRails
[14:54:15] arup_r: Inside where(..), you have actually SQl, and there u have to mention the actual table name, lile posts, users.. and when you will be using included assoc in where clause, you have to use .references(:posts) <again actual table nam>
[14:54:43] ekinmur: has joined #RubyOnRails
[14:54:51] arup_r: morfin60: ^
[14:55:49] Rubie: has joined #RubyOnRails
[14:58:10] AzaToth: has joined #RubyOnRails
[14:58:50] null__: has joined #RubyOnRails
[14:59:33] aegis3121: has joined #RubyOnRails
[15:01:09] Pathfinder: has joined #RubyOnRails
[15:03:00] e-r-a: has left #RubyOnRails: ()
[15:05:22] stannard: has joined #RubyOnRails
[15:08:59] adavia: has joined #RubyOnRails
[15:12:02] null__: has joined #RubyOnRails
[15:14:50] SeductiveError: has joined #RubyOnRails
[15:15:11] sp1rs: has joined #RubyOnRails
[15:16:04] Trynemjoel: has joined #RubyOnRails
[15:16:15] SeductiveError: hi all, what is the current best method to add auth. tokens to api? I see there is a standard library version implementation, and then there are numerous third parties that offer things like oauth. What is preferred?
[15:16:56] stannard: has joined #RubyOnRails
[15:17:02] crameth: has joined #RubyOnRails
[15:18:36] Rafcio: has joined #RubyOnRails
[15:18:46] kitsuneyo: has joined #RubyOnRails
[15:19:02] Rafcio: hey guys, what is the easiest and quickest way to generate pdf’s from an HTML?
[15:19:10] crameth: has joined #RubyOnRails
[15:19:33] arup_r: ofcourse,, a gem
[15:19:52] Rafcio: arup_r: which one? you used one that you’d recommend?
[15:20:15] smathy: seductiveerror, no consensus, use whichever fits in with your app and other gems best.
[15:20:41] arup_r: Rafcio: I used https://github.com/pdfkit/pdfkit
[15:22:22] baweaver: has joined #RubyOnRails
[15:22:44] Rafcio: arup_r: thanks i’ll check it out
[15:23:50] SeductiveError: smathy my current design is an engine inside a json api dedicated to handling different users of site, like admins or end users. sessions will be handled here.
[15:24:41] mat-svol: has joined #RubyOnRails
[15:24:49] ekinmur: has joined #RubyOnRails
[15:25:59] User458764: has joined #RubyOnRails
[15:27:08] smathy: seductiveerror, nothing you've said there makes any particular choice any more obvious.
[15:27:11] ekinmur: has joined #RubyOnRails
[15:27:36] smathy: seductiveerror, if there's no obvious winner, just pick one and see how it goes.
[15:27:42] ogpastaling: has joined #RubyOnRails
[15:28:05] SeductiveError: smathy I guess ill use standard library (SecureRandom) in conjunction with sessions controller
[15:29:18] smathy: seductiveerror, ah see, here's where details help. SecureRandom is the standard one you mentioned? I assumed you were talking about the standard Rails library, ie. http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Token.html
[15:29:52] SeductiveError: ahhh yes, sorry should have clarified =]
[15:30:42] smathy: seductiveerror, so yes, if you're just talking about generating the token then SecureRandom is definitely what I'd use, even other gems are probably using it underneath.
[15:31:23] SeductiveError: smathy thats what I thought, but just making sure i don't reinvent the wheel if theres a goto method. thanks!
[15:31:55] dopieee: has joined #RubyOnRails
[15:31:59] disgrntld: has joined #RubyOnRails
[15:32:31] smathy: seductiveerror, yeah, #uuid would be my pick.
[15:32:56] ereslibre: has joined #RubyOnRails
[15:32:56] ereslibre: has joined #RubyOnRails
[15:33:51] zave: has joined #RubyOnRails
[15:34:14] Quintasan: Hi, I'm trying to use ActiveAdmin to manage my nested objects but I'm getting undefined method "klass" for nil:NilClass when trying to manage WorkTypes associated with Projects - here's what I currently have https://gist.github.com/Quintasan/8ef3e9db02516ec7e8e2756071f6935b
[15:34:17] lxsameer: has joined #RubyOnRails
[15:35:25] minot: has joined #RubyOnRails
[15:35:42] artto: has joined #RubyOnRails
[15:35:51] yellow51: has joined #RubyOnRails
[15:36:32] ornerymoose_: has joined #RubyOnRails
[15:36:42] Rafcio_: has joined #RubyOnRails
[15:36:45] smathy: Quintasan, try #activeadmin - no one here really likes it.
[15:37:22] crdpink: has joined #RubyOnRails
[15:37:49] duaneb: has joined #RubyOnRails
[15:38:31] smathy: Quintasan, or mailing list might be more active too, see their README.
[15:38:52] c355E3B_: has joined #RubyOnRails
[15:38:59] w0bni: has joined #RubyOnRails
[15:39:06] iamvery_: has joined #RubyOnRails
[15:39:17] daemonwrangler_: has joined #RubyOnRails
[15:39:36] mwlang: any thoughts on how to visually analyze how solr (sunspot) computes it’s relevancy score for each item in it’s results?
[15:39:56] edwinvdgraaf: has joined #RubyOnRails
[15:40:17] unreal_: has joined #RubyOnRails
[15:40:20] adre: has joined #RubyOnRails
[15:40:32] mat-svol: has joined #RubyOnRails
[15:40:55] newjersey: has joined #RubyOnRails
[15:41:02] tw1sted: has joined #RubyOnRails
[15:41:22] Sylario_: has joined #RubyOnRails
[15:41:51] context: any sequel users here know how i can 'add' a dataset method for a Model. like AR::Relation still lets you access Model class methods/scopes, cant do that once you call a Dataset method in sequel
[15:42:57] null___: has joined #RubyOnRails
[15:43:21] mwlang: context: I use sequel regularly…don’t quite understand your question.
[15:43:38] morfin60: why you don't like activeadmin?
[15:43:53] morfin60: just interested because using it
[15:43:54] agent_white: has joined #RubyOnRails
[15:44:12] context: mwlang: i have Sequel::Model, i have a class method on it that returns a Dataset. so MyModel.search(..) #=> Dataset
[15:44:23] Ratler_: has joined #RubyOnRails
[15:44:30] context: mwlang: how can i get that method to be visible (chainable) to other Datasets originating from that Model
[15:44:36] g3funk: has joined #RubyOnRails
[15:44:39] context: mwlang: so i can do MyModel.eager(:something).search(..)
[15:44:45] CornishPasty: context: why not monkey patch it?
[15:44:45] gambl0re: has joined #RubyOnRails
[15:44:45] gambl0re: has joined #RubyOnRails
[15:44:47] fmcgeough: has joined #RubyOnRails
[15:45:19] mwlang: context, I think you need to go the other way: MyModel.search(…).eager(:something)
[15:45:23] tpendragon: has joined #RubyOnRails
[15:45:24] context: cornishpasty: well... that will happen if need be. I am trying to see if Sequel already has a way of doing this
[15:45:28] davidw: has joined #RubyOnRails
[15:45:43] CornishPasty: context: why not monkey patch it?
[15:45:56] context: mwlang: haha. yeah... thanks ;)
[15:46:26] CornishPasty: ugh irccloud dying :(
[15:46:41] JakFrist: has joined #RubyOnRails
[15:47:27] rails931: has joined #RubyOnRails
[15:47:32] EXCHGR: has joined #RubyOnRails
[15:49:47] jwang: has joined #RubyOnRails
[15:50:13] adavia: has joined #RubyOnRails
[15:50:14] Guest20975: has joined #RubyOnRails
[15:50:41] Devalo: has joined #RubyOnRails
[15:50:52] bmf: has joined #RubyOnRails
[15:51:01] timmyBsd: has joined #RubyOnRails
[15:51:20] rails931: Hi. I want to build a website in rails. There will be also a mobile application, made with Ionic, populated by API call. I want to use Angular for the client side because the website has to be very dynamics. I wonder how to build such a website in Rails. I saw there is 2 approach. One : Create the Angular part INSIDE the rails project (We have some ruby code in the angular routing). Two : We made 2 separates project and we crea
[15:51:21] arup_r: has joined #RubyOnRails
[15:51:28] ebryn: has joined #RubyOnRails
[15:51:28] Tarential: has joined #RubyOnRails
[15:51:30] rails931: Can anyone help me choosing the best option for me ?
[15:52:07] mcr-credil: has joined #RubyOnRails
[15:52:15] context: actually i can get around this cleanly
[15:52:39] smathy: morfin60, it's just one of those things that's good at one specific type of problem but a nightmare to extend/customize when one wants to.
[15:52:50] sloggerkhan: has joined #RubyOnRails
[15:53:09] context: that method was more for 'ease of use' anyway
[15:53:10] context: not needed
[15:53:11] smathy: morfin60, if you're only just into the project, not too late to switch, you might want to take a look at https://github.com/thoughtbot/administrate instead.
[15:53:54] reaVer: has joined #RubyOnRails
[15:53:58] [Butch]: has joined #RubyOnRails
[15:54:05] petor: has joined #RubyOnRails
[15:54:21] stannard: has joined #RubyOnRails
[15:55:29] arup_r: I would say build your own.
[15:55:53] arup_r: that thoughtbot one will be a complex one.. once it will start adding features into it.
[15:58:57] Sylario: What is this strange - [nil] syntax ? : https://github.com/ivaldi/brimir/blob/master/app/models/concerns/reply_notifications.rb#L175
[15:59:26] morfin60: it seems to be pretty simple for now
[16:00:04] eshea: has joined #RubyOnRails
[16:00:18] benlieb: has joined #RubyOnRails
[16:00:39] rafaelfranca: has joined #RubyOnRails
[16:01:16] conta_: has joined #RubyOnRails
[16:01:24] arup_r: sylario: they don't know .compact exist. :p
[16:01:44] arup_r: They just wanted to remove `nil` from the Array genrated by .map
[16:01:55] arup_r: Should I create a PR?
[16:01:58] shinnya: has joined #RubyOnRails
[16:02:30] Sylario: arup_r: I think it remove nil values from notified users, but is it interpreted before the each?
[16:03:56] smathy: sylario, there's no each in that method.
[16:03:58] arup_r: sylario: no.. the .map returns an array and from that they are removing all nil
[16:04:05] Sylario: arup_r: ok i get it, collect return an array, so it remove nil values after the loop
[16:04:15] arup_r: [1,nil,nil] - [nil] # [1]
[16:04:27] arup_r: or [1,nil,nil].cmpact # [1]
[16:04:33] morfin60: lol compact doing same thing
[16:04:34] arup_r: compact**
[16:04:42] petor: has joined #RubyOnRails
[16:04:47] morfin60: but looks better :)
[16:04:52] arup_r: yes.. who wrote it may be forgot that existence of .compact
[16:04:53] Sylario: i am not sure you could write end.compact
[16:05:05] morfin60: but don't you have wrap into ()?
[16:05:13] context: sylario: you would be surprised the things you can write
[16:05:35] context: from what i know it is valid, it is however, ugly as all get out
[16:05:58] arup_r: sylario: u can..
[16:06:10] Devalo: has joined #RubyOnRails
[16:06:18] crameth: has joined #RubyOnRails
[16:06:24] smathy: It's definitely valid, and beauty is in the eye of the beholder.
[16:06:30] morfin60: oh you can end.compact
[16:07:26] baweaver: has joined #RubyOnRails
[16:08:39] qejk: has joined #RubyOnRails
[16:08:50] morfin60: i thought have to write ([1,nil,2,3].each {|elem| elem + 1 unless elem.nil?}).compact
[16:09:28] Sylario: arup_r: context i just replaced with a compact and you are right, it works
[16:09:57] morfin60: or ([1,nil,2,3].each do |elem| elem + 1 unless elem.nil? end).compact
[16:10:00] flashpoint9: has joined #RubyOnRails
[16:10:01] morfin60: anyway work
[16:10:19] null__: has joined #RubyOnRails
[16:11:10] ekinmur: has joined #RubyOnRails
[16:11:28] cdnsteve: has joined #RubyOnRails
[16:12:00] mustmodify: has joined #RubyOnRails
[16:12:29] morfin60: there is no way to add or condition with ORM
[16:12:50] morfin60: unless using string
[16:13:13] morfin60: but when i do where(cond).where(another_cond) it adds where cond and another_cond
[16:13:16] arup_r: morfin60: like? example.. let me see
[16:13:31] arup_r: OR is not there
[16:13:41] arup_r: nothing.. I read late
[16:14:00] mustmodify: When I pass something like <objects><object><name>a</name></object><object><name>b</name></...></...> I get {objects: {object: [{name: 'a'}, {name: 'b'}]} rather than what I would expect, ie {objects: [{name: 'a'}, {name: 'b'}]} ... is that expected?
[16:14:27] arup_r: who is converting the html to ruby object mustmodify?
[16:14:38] arup_r: or xml to ruby?
[16:14:42] mustmodify: That's from params in the controller.
[16:14:43] morfin60: could be something like hmm .where(cond).or(cond) i think
[16:14:53] morfin60: but grouping could be a problem
[16:14:54] cdnsteve: Anyone using letsencrypt to sign their gems?
[16:14:54] mustmodify: arup_r: so I would assume ActionController.
[16:14:56] arup_r: morfin60: that is in rails master branch
[16:15:11] morfin60: but how it groups conditions?
[16:15:42] morfin60: i mean parenthesis
[16:15:57] arup_r: mustmodify: show your view?
[16:16:34] arup_r: morfin60: https://github.com/rails/rails/blob/52ce6ece8c8f74064bb64e0a0b1ddd83092718e1/activerecord/test/cases/relation/or_test.rb#L8
[16:16:36] artto: has joined #RubyOnRails
[16:16:47] mustmodify: arup_r: It's happening when I post, not when I output. This is in input params. I'm happy to put together a gist if it's unclear.
[16:16:58] arup_r: that full page is for varities of OR :D
[16:17:32] arup_r: yes.. if I/we see the construct of your view, then we can help you to explain why like that.. as u asked
[16:18:00] morfin60: let's say i do .where(cond).or(another_cond).where(some_another_cond) should probably generate (cond or another_cond) and some_another_cod
[16:20:59] sandelius: has joined #RubyOnRails
[16:21:38] ornerymoose: has joined #RubyOnRails
[16:23:04] chouhoulis: has joined #RubyOnRails
[16:23:12] icedragon: has joined #RubyOnRails
[16:24:20] mustmodify: arup_r: https://gist.github.com/mustmodify/a4b709dcb84e64d7cc0544e1eceb5c84
[16:24:44] smathy: morfin60, assuming you mean Rails5 - yes, that's how it would work.
[16:27:40] icedragon: Hello, I'm having really strange behaviour with my ActiveRecord when using table_name with a inherited base class: eg: https://gist.github.com/IceDragon200/75969fa5f96b752b41fbd5675001f57b
[16:27:52] null__: has joined #RubyOnRails
[16:28:20] arup_r: mustmodify: not seeing anything wrong. which part you feel is not what you expected from the gist..
[16:28:30] xardion: has joined #RubyOnRails
[16:29:14] diegoaguilar: has joined #RubyOnRails
[16:31:12] vladr: has joined #RubyOnRails
[16:32:52] arBmind: has joined #RubyOnRails
[16:34:27] istrasci: has joined #RubyOnRails
[16:35:46] ctrlrsf: has joined #RubyOnRails
[16:36:27] drbayer: has joined #RubyOnRails
[16:36:39] ddv: has joined #RubyOnRails
[16:36:42] tildes_: has joined #RubyOnRails
[16:38:30] conta_: has joined #RubyOnRails
[16:39:06] arup_r: mustmodify: call on params.to_hash.to_xml and see the xml it produced.. will be same as the one u have. I hope so..
[16:39:11] akshat_: has joined #RubyOnRails
[16:40:03] zpe: has joined #RubyOnRails
[16:40:21] FCser: Hmm I have some code that works locally and on staging. But on production it triggers unexpected validation errors for a related has_many model when attempting to create records...
[16:44:21] beingjohnm: has joined #RubyOnRails
[16:45:14] FCser: I think it is related to something weird weird symlinks to upload directory on production
[16:45:27] FCser: not sure how to debug it further at the moment
[16:45:43] smathy: IceDragon, you want to set abstract_class in your base class: http://devdocs.io/rails~4.2/activerecord/inheritance/classmethods#attribute-i-abstract_class
[16:46:49] manfrin: has joined #RubyOnRails
[16:46:50] smathy: fcser, !code and error
[16:46:50] helpa: fcser: 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.
[16:49:10] FCser: ok ok thanks
[16:49:41] Cohedrin: has joined #RubyOnRails
[16:52:13] rafaelfranca: has joined #RubyOnRails
[16:53:43] banister: has joined #RubyOnRails
[16:53:47] rafaelfr_: has joined #RubyOnRails
[16:55:56] FCser: ok so here are the two models in question. When MinimumNightStay is saving it's firing the Room image validations... https://gist.github.com/anonymous/a77b488815c1f3bd9f5f53ad16877f2e I'm only noticing this on production. Which leads me to believe it is something weird with symlinks / deployment and the image files...
[16:58:18] istrasci: My Rails apps all have their own database (naturally), but also access a 3rd-party database. As such, they have models to this 3rd-party database. I want to DRY up these models to be reusable instead of copy-pasting them in each app. Would it be better to do this as a gem or as a Rails engine?
[16:58:46] mat-svol: has joined #RubyOnRails
[16:59:16] gasm: has joined #RubyOnRails
[17:00:08] Macaveli: has joined #RubyOnRails
[17:00:27] aegis3121: has joined #RubyOnRails
[17:01:49] gasm: Hey guys, i'm building an app and I want to have a class to use Twilio to send SMS for reminders, emergencies, etc. I don't really wanna instantiate it but I don't care at this point. I thent rying to do the same thing in /libs with the same effect. The code is more or less class Something; def hello; print 'hello';end I'd like it to do more obviously
[17:01:58] gasm: if I want this kind of 3rd party random functionality I build myself
[17:02:07] gasm: where does it go to be avalable to my rails controllers and models?
[17:02:25] polyidus: has joined #RubyOnRails
[17:02:38] gasm: Does it go in /lib? Does it go in /initializers? What's the difference anyway between the two folders?
[17:02:58] sleungcy: has joined #RubyOnRails
[17:03:56] djbkd: has joined #RubyOnRails
[17:04:09] pramsky: has joined #RubyOnRails
[17:04:38] dionysus69: has joined #RubyOnRails
[17:05:59] istrasci: fryguy: Then package it as a gem after it's first created?
[17:06:53] nodejunkie: has joined #RubyOnRails
[17:07:19] vladr: has joined #RubyOnRails
[17:07:44] gasm: istrasci: I don't want to make it as a gem, Twilio is already a great gem. All I want is to have a class I can call like `Reminders::ProgressReady.to user`
[17:08:00] gasm: My question is how come none of th classes I make or instantiatedon't work anywhere else in the app?
[17:08:01] istrasci: gasm: I'm not talking about your issue.
[17:08:07] gasm: Oh, sorry
[17:09:01] wldcordeiro: has joined #RubyOnRails
[17:10:13] mikecmpbll: has joined #RubyOnRails
[17:10:53] n008f4g_: has joined #RubyOnRails
[17:11:42] smathy: fcser, you have a real filesystem in prod? Like you're not using heroku or something?
[17:12:11] bool_: has joined #RubyOnRails
[17:12:27] smathy: fcser, I'd know more if you included the error.
[17:12:41] smathy: fcser, !gist-usage also this, especially the "Add file" button.
[17:12:41] helpa: fcser: How to use Gist properly: https://github.com/radar/guides/blob/master/using-gist.markdown
[17:14:08] smathy: gasm, better to put it in a subdirectory of app - like app/services
[17:14:22] icedragon: smathy: Thanks a bunch :D
[17:14:24] smathy: gasm, files in lib are not autoloaded by Rails.
[17:14:27] smathy: IceDragon, you're welcome.
[17:14:47] mdel: has joined #RubyOnRails
[17:15:37] stannard: has joined #RubyOnRails
[17:16:22] gasm: smathy: Alright that makes sense. But initializers ARE supposed to be autoloaded so what gives? Just for fun I did a $expletive="expletive" in /initializers/twilio.rb and $expletive was avilableeverwhere
[17:16:27] djbkd: has joined #RubyOnRails
[17:16:27] FCser: smathy: correct a real filesystem
[17:16:30] stannard: has joined #RubyOnRails
[17:16:46] gasm: smathy: Also if I add another folder to app structure don't I have to "register" the new folder somewhere?
[17:16:51] smathy: gasm, initializers don't go in lib they go in config/initializers
[17:17:05] FCser: smathy: just ubuntu server - no heroku or anything
[17:17:10] gasm: smathy: yeah those are the ones I was talking abouit
[17:17:17] smathy: gasm, but a class to help you interact with a remote API isn't an initializer.
[17:17:50] lacrosse: has joined #RubyOnRails
[17:18:11] smathy: fcser, maybe your public/system isn't symlinked to a shared location, so you're losing all your files each deploy?
[17:18:14] gasm: smathy: What kind of stuff goes into initializers then? Every time I need to have something I always put it there because that's the olny place I found that actually rails loads from. I can see the neatness of having it a servicebut again don't I have to register it or does Rails just kind automatically scan it and read the .rb files
[17:18:36] Devalo: has joined #RubyOnRails
[17:18:38] smathy: fcser, or public/wherever-you-have-configured-for-your-uploads
[17:18:51] mustmodify: has left #RubyOnRails: ()
[17:19:21] smathy: gasm, I suppose I only *implied* this, but everything under app/* is autoloaded by Rails.
[17:19:49] gasm: smathy: Thank a lot, I'll give it a shot right now
[17:19:57] smathy: gasm, the "why" re not putting it in config/initializers I think I already covered - because it's not an initializer.
[17:20:05] gasm: smathy: Since you're here i've a nother question if you've a minute
[17:20:09] merida: has joined #RubyOnRails
[17:20:14] djbkd: has joined #RubyOnRails
[17:20:26] smathy: gasm, can ask me, or just the room, there are others here too.
[17:20:29] DoctorMonocular: has joined #RubyOnRails
[17:21:06] macsteps: has joined #RubyOnRails
[17:22:02] FCser: smathy: I have set :linked_dirs, %w{public/uploads}
[17:22:08] FCser: in deploy/production.rb
[17:22:19] FCser: so from my understanding - that makes a symlink
[17:22:25] FCser: the files do exist if I visit the urls directly
[17:22:40] djbkd: has joined #RubyOnRails
[17:22:54] FCser: but saving the MinimumNightStay with a specific room checked triggers the image missing validation for some reason...
[17:23:06] drbayer: has joined #RubyOnRails
[17:23:31] arup_r: has joined #RubyOnRails
[17:23:39] gasm: Well I'm still learning rails as you an probably tell. When it comes to routing and having multiple users - I was reading about using scope - so like you dont have to write /usertype/dashboard and instead have /dashboard. But what if you have multiple users which use scope in routes - how does r ails know that generated "dashboard_path" will take me to WidgetsController#dashboard and not MidgetsController#dashboard
[17:24:20] smathy: fcser, ok, so we're back to where we began, need to see the error.
[17:24:29] smathy: ...and full stacktrace.
[17:26:22] smathy: gasm, !gist what you're talking about here, it's not clear from your question
[17:26:22] helpa: gasm: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[17:26:51] chouhoulis: has joined #RubyOnRails
[17:26:52] smathy: gasm, the short answer is that obviously a URL has to uniquely identify a route somehow, and if it doesn't then the first route in your routes.rb wins.
[17:27:52] FCser: smathy: Thanks - I'll see what I can find - it technically isn't an error / exception as far as I can tell - going to debug more.
[17:28:19] Disavowed: has joined #RubyOnRails
[17:29:46] gambl0re: has joined #RubyOnRails
[17:29:46] gambl0re: has joined #RubyOnRails
[17:30:40] PedramT: has joined #RubyOnRails
[17:30:41] gasm: smathy: http://bit.ly/1oY7WC8
[17:31:34] gasm: I omitted stuff like accountants, chiefs, but they all that have same dash/account/etc
[17:31:46] gasm: I'm thinking of moving acount or entry management to separate controllers
[17:31:49] gasm: and just managing access or something
[17:32:05] meoblast001: has joined #RubyOnRails
[17:32:25] gasm: Writing urls on links by hand seems wrong. I figured scope would give me nice things like firefighters_dashboard_path but I'm having trouble here. Hope that makes sense
[17:32:36] myntcake: has joined #RubyOnRails
[17:33:11] edwinvdgraaf: has joined #RubyOnRails
[17:33:27] smathy: gasm, !routing - too much work there for me, I'm happy to answer a specific question, but I'm not sifting through all your routes giving advice.
[17:33:27] helpa: gasm: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[17:33:45] jsrn: has joined #RubyOnRails
[17:35:00] gasm: smathy: Thanks for the help anywya though
[17:41:15] stannard: has joined #RubyOnRails
[17:41:50] sloggerkhan: What determines if/when a fix gets added to the 4.2.x or not?
[17:41:59] aegis3121: has joined #RubyOnRails
[17:42:05] sloggerkhan: 4.2.x stable releases
[17:42:39] epochwolf: SloggerKhan: given that Rails 5 is just around the corner, probably only security patches as needed.
[17:43:02] arup_r: has joined #RubyOnRails
[17:44:31] go-nuts: has joined #RubyOnRails
[17:45:15] go-nuts: i have get 'clients/:ids'. and get 'clients/' how to write it in onliner
[17:45:27] go-nuts: not resouce* i just want get
[17:46:11] go-nuts: baiscally ids should be optional
[17:47:35] drbayer: has joined #RubyOnRails
[17:47:47] joesavage: has joined #RubyOnRails
[17:48:17] smathy: gasm, np.
[17:48:35] joesavage: has left #RubyOnRails: ()
[17:49:10] smathy: go-nuts, !routing
[17:49:10] helpa: go-nuts: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[17:49:57] go-nuts: smathy: i couldnt find the onliner in the doc, could you?
[17:50:09] smathy: go-nuts, search for "optional"
[17:50:15] smathy: go-nuts, it's all there.
[17:50:21] Pathfinder: has joined #RubyOnRails
[17:51:27] smathy: go-nuts, so then yes is my answer, very clear how to have a single route that does both /client and /client/:ids
[17:51:40] bruno-: has joined #RubyOnRails
[17:51:55] bronson: has joined #RubyOnRails
[17:52:37] n008f4g_: has joined #RubyOnRails
[17:54:05] baweaver: has joined #RubyOnRails
[17:54:27] arup_r: go-nuts: http://guides.rubyonrails.org/routing.html#bound-parameters
[17:56:46] JakFrist: has joined #RubyOnRails
[17:57:26] diegoaguilar: has joined #RubyOnRails
[17:58:00] gasm: has joined #RubyOnRails
[17:58:37] boboc: has joined #RubyOnRails
[18:00:34] eshear: has joined #RubyOnRails
[18:03:09] akshat: has joined #RubyOnRails
[18:05:54] zacts: has joined #RubyOnRails
[18:05:59] Frem: has joined #RubyOnRails
[18:06:58] naftilos76: has joined #RubyOnRails
[18:07:09] phredus: has joined #RubyOnRails
[18:09:28] edwinvdgraaf: has joined #RubyOnRails
[18:12:34] ramfjord: has joined #RubyOnRails
[18:13:52] yellow5: has joined #RubyOnRails
[18:14:27] pawnbox: has joined #RubyOnRails
[18:15:43] yellow5: has joined #RubyOnRails
[18:16:03] jtd: has joined #RubyOnRails
[18:16:08] jtd: so I have someone logging into something with Devise LDAP with an email string. I'd like to chomp the login so that instead of "bob@thing.com" Devise just gets "bob" so I can use the sAMAccountName LDAP attribute. what's the easiest way to do this?
[18:16:17] petor: has joined #RubyOnRails
[18:16:27] barajasfab: has joined #RubyOnRails
[18:16:45] merida: has joined #RubyOnRails
[18:16:59] baweaver: has joined #RubyOnRails
[18:18:04] yellow5: has joined #RubyOnRails
[18:19:21] lemur: has joined #RubyOnRails
[18:19:26] Ropeney: jtd, easiest? email.split("@").first
[18:19:26] zpe: has joined #RubyOnRails
[18:19:43] jtd: alternately, is there a way to get Devise to only look at the first part of the email address?
[18:20:16] ur5us: has joined #RubyOnRails
[18:20:39] jtd: ropeney: so the problem is I'm not entirely sure how to do that. the way this app is written, it looks at the domain name of the email address and if it matches the internal domain it decides it's an internal login and passes it to the LDAP bits.
[18:20:58] Ropeney: probably wanna paste some code then
[18:21:18] jtd: preferred paste app?
[18:22:05] pwnd_nsfw: has joined #RubyOnRails
[18:22:57] gambl0re: has joined #RubyOnRails
[18:23:03] jtd: ACTION can't find where login happens :-/
[18:23:33] jtong: has joined #RubyOnRails
[18:23:49] Ropeney: makes life harder
[18:24:12] FooMunki: has joined #RubyOnRails
[18:24:29] jtong: how do you get the rendered html for a mailer action? like if i wanted to send the email html to someone without it going to gmail where it's hard to inspect
[18:24:48] petor: has joined #RubyOnRails
[18:25:55] adaedra: On the reply menu, you have Show Original on GMail, to inspect real mail HTML.
[18:26:20] adaedra: Otherwise, you have tools like MailCatcher or letter_opener which can help you test mails without really sending them.
[18:26:24] jenrzzz: has joined #RubyOnRails
[18:26:24] jenrzzz: has joined #RubyOnRails
[18:26:41] M-shine: has joined #RubyOnRails
[18:26:57] jtong: thank you so much! super helpful
[18:26:58] yellow5: has joined #RubyOnRails
[18:27:15] dopamean_: has joined #RubyOnRails
[18:28:09] [Butch]: has joined #RubyOnRails
[18:29:48] jgt1: has joined #RubyOnRails
[18:34:16] SteenJobs: has joined #RubyOnRails
[18:35:22] Megamos: has joined #RubyOnRails
[18:35:27] SteenJobs: hey guys - i have a checkbox i’m using for terms_of_service, but if it’s left blank rails’ “field_with_errors” class and html is added, and it messes up my css classes because the DOM hierarchy changes - how do you generally deal with this?
[18:35:56] Ropeney: fix your css?
[18:36:00] dopie: has joined #RubyOnRails
[18:36:30] manfrin_: has joined #RubyOnRails
[18:36:43] darutoko: has joined #RubyOnRails
[18:36:55] mozzarel1: has joined #RubyOnRails
[18:36:58] tercenya_: has joined #RubyOnRails
[18:37:19] Pathfinder_: has joined #RubyOnRails
[18:37:46] istrasci1: has joined #RubyOnRails
[18:38:03] SteenJobs: ropeney: in order to customize the checkbox based on the designs i need the hidden input checkbox to be siblings with the label, but field_with_errors divs are changing the dom and they’re no longer siblings
[18:38:09] jenrzzz_: has joined #RubyOnRails
[18:38:32] GG: has joined #RubyOnRails
[18:38:33] yellow5: has joined #RubyOnRails
[18:38:35] mat-svol_: has joined #RubyOnRails
[18:38:52] Cache_Money: has joined #RubyOnRails
[18:39:13] joshuakovach: has joined #RubyOnRails
[18:39:37] diegoviola: has joined #RubyOnRails
[18:39:43] a1fa: has joined #RubyOnRails
[18:39:56] croberts: has joined #RubyOnRails
[18:40:24] eyck: has joined #RubyOnRails
[18:40:37] rtl: has joined #RubyOnRails
[18:40:41] Ropeney: SteenJobs, I can't really see your code. But it sounds like... you need to change the way that css works then.
[18:40:53] mosez: has joined #RubyOnRails
[18:40:56] SteenJobs: your telepathic powers aren’t working?!
[18:41:18] arup_r: if anybody here upgrades the Spree project, would you give me advises about how do you handle the Spree extension gem dependency errors. I see here 7 extension gems are placed. And if I change the spree version to little up, all id breaking. If I comment the spree extension gems, then upgrade Spree gem, and then again uncomment those extension gems, will it be a good idea?
[18:41:22] crankharder: has joined #RubyOnRails
[18:41:23] ale: has joined #RubyOnRails
[18:41:30] hive-mind: has joined #RubyOnRails
[18:41:33] arup_r: I stuck in this since long hours.
[18:42:33] SteenJobs: ropeney: can i gist you the ensuing html after validations fail, as well as my CSS
[18:42:46] Ropeney: arup_r, what version?
[18:43:16] Ropeney: SteenJobs, you can and I can see what I can do. But it's generally easier to play with the CSS in the browser and test
[18:43:30] SteenJobs: yea yea, i’ve become a frontend wizard building this app haha
[18:44:02] Ropeney: I am not the best at CSS though
[18:44:17] tubbo: wizards are so 2002 SteenJobs
[18:44:22] podman: has joined #RubyOnRails
[18:44:24] cydrobolt: has joined #RubyOnRails
[18:44:24] cydrobolt: has joined #RubyOnRails
[18:44:24] Paradox: has joined #RubyOnRails
[18:44:32] constantinexvi: has joined #RubyOnRails
[18:44:37] arup_r: ropeney: trying from gem 'spree', '~> 3.0.0.rc4' to gem 'spree', '~> 3.0.3' .. extensions are https://gist.github.com/aruprakshit/2bfb236a4b55bf926ab34e201fb6b793
[18:44:42] context: has joined #RubyOnRails
[18:44:42] hyperdrive: has joined #RubyOnRails
[18:44:43] Vircung: has joined #RubyOnRails
[18:44:45] teaearlgraycold: has joined #RubyOnRails
[18:44:48] SteenJobs: ropeney: yea i’ve had to force this front-end to do quite a bit…because the designer doesn’t know shit about frontend programming
[18:44:57] Ropeney: arup_r, isn't there a 3-0-stable?
[18:44:59] SteenJobs: tubbo: ironically there are 1000 wizards in this design’s flow
[18:45:01] SteenJobs: and it was a nightmare
[18:45:19] llakey: has joined #RubyOnRails
[18:45:19] SteenJobs: although some random dude on github put together a pretty dope service that handles wizard logic really well
[18:45:20] arup_r: ropeney: I put it there, and still some of them are failing.
[18:45:29] IceBear: has joined #RubyOnRails
[18:45:29] bahar: has joined #RubyOnRails
[18:45:37] Ropeney: in your gist, your spree doesnt match the rest
[18:45:52] Ropeney: you want spree to goto same branch, then bundle update --source spree
[18:46:00] arup_r: yes, but they are working with current gem 'spree', '~> 3.0.0.rc4'
[18:46:28] arup_r: what is --source? I was doing bundle update spree only.
[18:46:35] Ropeney: it targets spree only
[18:46:49] arup_r: oh.. never knew it
[18:46:59] mat-svol: has joined #RubyOnRails
[18:47:12] conta_: has joined #RubyOnRails
[18:47:15] Wingar: has joined #RubyOnRails
[18:47:18] funnel: has joined #RubyOnRails
[18:47:32] arup_r: so if I upgrade to 3-0-stable as you said, will the extension still work, because I didn't update them with current upgraded spree version?
[18:47:35] arup_r: ropeney: ^
[18:47:57] Ropeney: arup_r, you have to check all those extensions have a version for the version you want to goto
[18:48:07] jlyndon: has joined #RubyOnRails
[18:48:25] brent__: has joined #RubyOnRails
[18:48:36] marr: has joined #RubyOnRails
[18:48:40] arup_r: ok.. if they don't have.. I checked some. and they probably don't have..
[18:48:53] Ropeney: then fork it, change it to your version and hope to god
[18:49:33] Ropeney: is the app old?
[18:49:56] Palsson: has joined #RubyOnRails
[18:50:13] arup_r: it has 3.0.1 in gemfile.lock
[18:51:02] jord: has joined #RubyOnRails
[18:51:02] renanoronfle: has joined #RubyOnRails
[18:51:34] Ropeney: yeah your going to have fun, I think most plugins stopped doing stuff for spree since its no longer supported
[18:53:00] bronson: has joined #RubyOnRails
[18:53:19] Ropeney: arup_r, https://github.com/solidusio/solidus is the new spree
[18:53:31] Silex: has joined #RubyOnRails
[18:53:50] mdel: has joined #RubyOnRails
[18:53:57] arup_r: I know, but there are 4 spree sites I have to upgrade :( , some of them is in 2.0+
[18:54:11] meinside: has joined #RubyOnRails
[18:54:48] Ropeney: arup_r, why not just stay at 3.0-stable untill 3.1.0-stable comes out?
[18:54:52] smathy: ropeney, spree itself has been resurrected too.
[18:54:56] arup_r: ahh. I am going to meet some worst time I for see
[18:55:26] Ropeney: smathy, just reading now it is seeming that way
[18:56:00] patrick_star: has joined #RubyOnRails
[18:56:19] macsteps: has joined #RubyOnRails
[18:56:47] FCser: smathy: thanks for your suggestions - it does appear capistrano deployments must not be linking files properly or something. If I re-upload room images I'm able to save the minimum night stays....
[18:57:02] arup_r: I am trying now gem 'spree', github: 'spree/spree', branch: '3-0-stable' again, I know it will not work. Lets see..
[18:57:32] daxroc: has joined #RubyOnRails
[18:57:48] smathy: fcser, which is very odd because you said you could request the missing files directly.
[18:57:49] Ropeney: arup_r, post your dependancy conflicts too
[18:57:56] lbotos_: has joined #RubyOnRails
[18:58:00] arup_r: ok sure.. thanks ropeney
[18:58:11] phaza: has joined #RubyOnRails
[18:58:12] SteenJobs: ropeney: https://gist.github.com/jesiegel1/88a8d0216722baf2851d039b8d16c2ed
[18:58:42] Cohedrin: has joined #RubyOnRails
[18:58:49] bob434: has joined #RubyOnRails
[18:59:11] SteenJobs: ropeney: it also adds an extra input checkbox field for some reason
[18:59:17] Ropeney: you have... a seperate errors page?
[18:59:24] SteenJobs: that’s a lie
[18:59:34] SteenJobs: i’m just showing you the html after validations fail
[18:59:41] SteenJobs: that’s from the browser
[18:59:41] Ropeney: you had .erb at end is all
[19:00:01] FCser: smathy: yes I'm not quite sure - unless it was cached or something
[19:00:08] n008f4g_: has joined #RubyOnRails
[19:00:28] gambl0re: has joined #RubyOnRails
[19:00:28] gambl0re: has joined #RubyOnRails
[19:00:32] smathy: Maybe, yes.
[19:00:34] FCser: smathy: but I went to each room record and re-uploaded the files and then it 'just worked'... I don't know - going to have to double check the capistrano / shared file setup.
[19:00:46] smathy: Good luck.
[19:00:48] fox_mulder_cp: what keywords i can google about allowed params when create/update object, but when it use admin - it extendeds
[19:01:25] phredus: has joined #RubyOnRails
[19:01:25] fox_mulder_cp: scoped required params?
[19:01:50] smathy: fox_mulder_cp, just use a different controller for your admin.
[19:02:29] RubyNewbey_____: has joined #RubyOnRails
[19:03:44] MrPunkin: has joined #RubyOnRails
[19:03:46] Ropeney: SteenJobs, can you put another class on center-checkbox, use that as a wrapper and get rid of the + selectors?
[19:04:09] pawnbox: has joined #RubyOnRails
[19:05:03] SteenJobs: ropeney: oh oh oh, ok i see what’s going on. i was thrown off by the second input, with no type…but then remembered that rails makes a hidden field with value “0” when using the rails helper in case the checkbox is unchecked
[19:05:13] SteenJobs: so it’s creating divs for each input
[19:05:35] SteenJobs: nope for one input
[19:05:53] arup_r: ropeney: error is https://gist.github.com/aruprakshit/2bfb236a4b55bf926ab34e201fb6b793
[19:05:54] Ropeney: its wrapping your field with errors in a div
[19:05:59] SteenJobs: but for some reason field_with_errors divs are added twice, one for my checkbox and one for label
[19:06:13] Ropeney: so you want that center-checkbox with another class
[19:06:16] Ropeney: then replace the + with a ,
[19:06:23] Ropeney: and you ::should:: be set
[19:06:46] jxf: has joined #RubyOnRails
[19:06:49] Ropeney: arup_r, where in your gemfile does it say '3-0-stable' for spree?
[19:07:09] arup_r: ok. Let me add it. I didn't update Gemfile, only erro added..
[19:07:51] SteenJobs: ropeney: can’t do that - i need them to be siblings so i can associate the <div class=“tos”></div> (which is the box i’m using for the checkbox instead of the browser checkbox) with a checkbox that’s :checked or not
[19:08:39] Ropeney: but the way your adding errors, ruins that
[19:08:54] arup_r: that is the error I got.
[19:08:54] Ropeney: SteenJobs, ^
[19:09:21] SteenJobs: ropeney: right - although i’m not adding those errors, it’s doing that by default
[19:09:22] MrPunkin: has left #RubyOnRails: ()
[19:09:31] c355E3B: has joined #RubyOnRails
[19:09:43] Ropeney: arup_r, be brave and locally run "bundle update" and hope?
[19:09:57] Ropeney: SteenJobs, you must be using some plugin to do that
[19:10:14] arup_r: ok with the current spree gem you meant? ropeney
[19:10:21] fox_mulder_cp: smathy: i said about this http://www.sitepoint.com/rails-4-quick-look-strong-parameters/
[19:10:32] arup_r: gem 'spree', github: 'spree/spree', branch: '3-0-stable' with this one placed, right?
[19:10:42] SteenJobs: ropeney: i’m pretty sure it’s default rails behavior
[19:11:02] arup_r: ok.. but erroring gem will work with this https://github.com/spree-contrib/spree_active_shipping/blob/3-1-stable/spree_active_shipping.gemspec .. should I point there?
[19:11:28] SteenJobs: ropeney: it’s just being added twice which is the problem, because it’s messing up the dom..whatevs i’ll figure something out
[19:11:31] arup_r: ok.. let me try first what you said
[19:12:05] Ropeney: SteenJobs, what rails version?
[19:12:45] SteenJobs: i’m using 4.2, but there are things online about this functionality from a while ago
[19:12:49] SteenJobs: maybe they got rid of it?
[19:14:07] srinidhi: has joined #RubyOnRails
[19:15:05] fox_mulder_cp: where i get :admin in attr_accessible :name, :author, :public as : :admin
[19:15:39] Ropeney: fox_mulder_cp, what?
[19:16:16] fox_mulder_cp: ropeney: sitepoint.com/rails-4-quick-look-strong-parameters
[19:16:47] fox_mulder_cp: i try lock some attributes from wild internet attackers
[19:17:33] Ropeney: fox_mulder_cp, you need a new guide
[19:18:23] fox_mulder_cp: may be u recommend it for me?
[19:18:24] kitsuneyo: has joined #RubyOnRails
[19:18:34] Ropeney: what rails version are you working with?
[19:18:50] fox_mulder_cp: ropeney: now - rails5 beta 2
[19:19:09] Ropeney: is this your first time using rails?
[19:19:19] User458764: has joined #RubyOnRails
[19:19:32] fox_mulder_cp: ropeney: no, i try learn it deeply and secure
[19:19:58] macsteps: has joined #RubyOnRails
[19:19:58] njero: :\ unstable =~ insecure :P
[19:20:07] Ropeney: http://weblog.rubyonrails.org/2012/3/21/strong-parameters/ might help you then
[19:20:44] Ropeney: fox_mulder_cp, or http://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.html
[19:20:45] istrasci1: has left #RubyOnRails: ()
[19:20:51] fox_mulder_cp: ropeney: i write some small apps, but now start 'big' project - applications hosting control panel - dns, mail, docker containers, sql, billing, domain registrations
[19:21:11] Ropeney: fox_mulder_cp, or http://edgeguides.rubyonrails.org/action_controller_overview.html#strong-parameters
[19:21:29] SteenJobs: ropeney: fixed - http://stackoverflow.com/a/5268106
[19:21:42] baweaver: has joined #RubyOnRails
[19:21:47] SteenJobs: ropeney: check out who answered it haha
[19:21:53] Ropeney: SteenJobs, I saw that but didn't think thats "fixed" since now it removes everywhere else
[19:21:59] SteenJobs: i know i know, agreed
[19:22:03] SteenJobs: that’s why i avoided it at first
[19:22:11] SteenJobs: ropeney: but i have my flash messages so it should be ok
[19:22:21] SteenJobs: Radar: thanks - http://stackoverflow.com/a/5268106
[19:22:29] stannard: has joined #RubyOnRails
[19:22:40] fox_mulder_cp: ropeney: thanks. i find nested params example here too, it's good for me.
[19:22:48] Ropeney: fox_mulder_cp, enjoy :)
[19:22:50] stannard: has joined #RubyOnRails
[19:22:57] Ropeney: arup_r, all good? about to get off
[19:23:29] fox_mulder_cp: ropeney: yep, php-based idiotic monsters, such as plesk/cpanel - make me berserker )
[19:24:50] arup_r: ropeney: still updating.. they have their own gemserver and rubygems.org .. but their own gemserver tremendous slow.
[19:25:12] Ropeney: arup_r, well goodluck then i gotta hit the bed :D
[19:25:23] arup_r: ropeney: u r from?
[19:25:38] arup_r: Australia .. right?
[19:26:04] arup_r: it is 5:25 AM here. omg!
[19:26:07] arup_r: go sleep..
[19:26:29] njero: hm.. timezones...
[19:26:30] arup_r: I used to go at 3 AM. :( little earlier than you.. hehe
[19:26:49] arup_r: ropeney: good night and morning..
[19:26:49] kitsuneyo: has joined #RubyOnRails
[19:26:56] arup_r: it failed :/
[19:28:05] Devalo: has joined #RubyOnRails
[19:28:14] zpe: has joined #RubyOnRails
[19:28:55] arup_r: but that is internal..
[19:29:01] arup_r: I think I can manage it
[19:31:28] DoctorMonocular: has joined #RubyOnRails
[19:31:31] VeryBewitching: has joined #RubyOnRails
[19:34:09] fox_mulder_cp: gmt +2 summertime, ~22-33. Kyiv ^)_
[19:34:14] pawnbox: has joined #RubyOnRails
[19:35:32] djbkd: has joined #RubyOnRails
[19:35:54] Synthead: has joined #RubyOnRails
[19:35:58] Rubie: has joined #RubyOnRails
[19:36:02] squiercaster: has joined #RubyOnRails
[19:36:10] ekinmur: has joined #RubyOnRails
[19:36:54] szulak: has joined #RubyOnRails
[19:37:57] Logico: has joined #RubyOnRails
[19:38:40] ekinmur: has joined #RubyOnRails
[19:38:46] Paradox: has joined #RubyOnRails
[19:38:57] moei: has joined #RubyOnRails
[19:43:24] bahar_: has joined #RubyOnRails
[19:44:41] shaman42_: has joined #RubyOnRails
[19:46:09] mfilipe_: has joined #RubyOnRails
[19:46:34] DoubleMalt: has joined #RubyOnRails
[19:47:12] ferr: has joined #RubyOnRails
[19:48:35] kanzure_: has joined #RubyOnRails
[19:48:49] PaulePanter: has joined #RubyOnRails
[19:49:32] drptbl: has joined #RubyOnRails
[19:49:54] michael_mbp: has joined #RubyOnRails
[19:50:49] rodfersou: has joined #RubyOnRails
[19:51:11] rubyonrails667: has joined #RubyOnRails
[19:53:28] fcser_: has joined #RubyOnRails
[19:54:09] p8m_: has joined #RubyOnRails
[19:54:17] Ratler^: has joined #RubyOnRails
[19:54:20] d0nn1e: has joined #RubyOnRails
[19:54:26] szulak: has joined #RubyOnRails
[19:54:40] icedp: has joined #RubyOnRails
[19:54:53] snowy: has joined #RubyOnRails
[19:55:50] jottr: has joined #RubyOnRails
[19:55:59] urkle-: has joined #RubyOnRails
[19:57:28] PedramT: has joined #RubyOnRails
[19:58:23] capin: afternoon o/
[19:58:47] FooMunki_: has joined #RubyOnRails
[19:58:47] baweaver: has joined #RubyOnRails
[20:00:02] johnflux_: has joined #RubyOnRails
[20:00:02] johnflux_: has joined #RubyOnRails
[20:00:26] shamanime_: has joined #RubyOnRails
[20:03:11] wmoxam_: has joined #RubyOnRails
[20:03:25] constantinexvi: has joined #RubyOnRails
[20:03:25] FooMunki: has joined #RubyOnRails
[20:03:25] diegoaguilar: has joined #RubyOnRails
[20:03:25] aegis3121: has joined #RubyOnRails
[20:03:25] Ratler_: has joined #RubyOnRails
[20:03:25] shamanime: has joined #RubyOnRails
[20:03:25] gaffo: has joined #RubyOnRails
[20:03:26] Haydos_: has joined #RubyOnRails
[20:03:26] duderonomy: has joined #RubyOnRails
[20:03:26] [dmp]: has joined #RubyOnRails
[20:03:26] fox_mulder_cp: has joined #RubyOnRails
[20:03:26] jhass: has joined #RubyOnRails
[20:03:26] ldnunes: has joined #RubyOnRails
[20:03:26] aaronr: has joined #RubyOnRails
[20:03:26] andrew9184: has joined #RubyOnRails
[20:03:26] johnflux: has joined #RubyOnRails
[20:03:26] wmoxam: has joined #RubyOnRails
[20:03:26] urkle: has joined #RubyOnRails
[20:03:26] noah256: has joined #RubyOnRails
[20:03:26] ericmeds: has joined #RubyOnRails
[20:03:26] eduardodeoh: has joined #RubyOnRails
[20:03:26] FCser: has joined #RubyOnRails
[20:03:26] targaf: has joined #RubyOnRails
[20:03:26] Radar: has joined #RubyOnRails
[20:03:26] p8m: has joined #RubyOnRails
[20:03:26] avelldiroll: has joined #RubyOnRails
[20:03:26] Scient: has joined #RubyOnRails
[20:03:26] shtirlic: has joined #RubyOnRails
[20:03:26] jbrinkmusic: has joined #RubyOnRails
[20:03:26] hendrici1s: has joined #RubyOnRails
[20:03:41] plantigrade: has joined #RubyOnRails
[20:04:19] jhass|off: has joined #RubyOnRails
[20:05:02] tildes: has joined #RubyOnRails
[20:05:40] DragonPunch: has joined #RubyOnRails
[20:05:45] constantinexvi: has joined #RubyOnRails
[20:06:50] dshah: has joined #RubyOnRails
[20:07:39] dshah: So - I've never been on the rails IRC channel before - but had a question and wanted to see if anyone could help...
[20:08:05] dshah: Does anyone know of a way to force recompilation of prepared statements within a rails app?
[20:08:10] AckZ: has joined #RubyOnRails
[20:08:45] lacrosse: has joined #RubyOnRails
[20:08:48] gaf_: has joined #RubyOnRails
[20:11:10] mdel: has joined #RubyOnRails
[20:11:48] FooMunki: has joined #RubyOnRails
[20:11:56] Scient: has joined #RubyOnRails
[20:11:56] ja: has joined #RubyOnRails
[20:11:56] targaf: has joined #RubyOnRails
[20:11:56] diegoaguilar: has joined #RubyOnRails
[20:11:56] aegis3121: has joined #RubyOnRails
[20:11:57] Haydos_: has joined #RubyOnRails
[20:11:57] duderonomy: has joined #RubyOnRails
[20:11:57] fox_mulder_cp: has joined #RubyOnRails
[20:11:57] ldnunes: has joined #RubyOnRails
[20:11:57] aaronr: has joined #RubyOnRails
[20:11:57] andrew9184: has joined #RubyOnRails
[20:11:57] noah256: has joined #RubyOnRails
[20:11:57] ericmeds: has joined #RubyOnRails
[20:11:57] eduardodeoh: has joined #RubyOnRails
[20:11:57] Radar: has joined #RubyOnRails
[20:11:57] jbrinkmusic: has joined #RubyOnRails
[20:11:57] hendrici1s: has joined #RubyOnRails
[20:12:46] ericmeds_: has joined #RubyOnRails
[20:13:29] aegis3121: has joined #RubyOnRails
[20:14:42] pawnbox: has joined #RubyOnRails
[20:14:53] andrew9184: has joined #RubyOnRails
[20:15:42] petor: has joined #RubyOnRails
[20:16:03] duderonomy: has joined #RubyOnRails
[20:17:14] FooMunki: has joined #RubyOnRails
[20:17:20] fox_mulder_cp: has joined #RubyOnRails
[20:17:39] FooMunki: has joined #RubyOnRails
[20:19:44] aaronr: has joined #RubyOnRails
[20:20:22] baweaver: has joined #RubyOnRails
[20:20:42] epochwolf: dshah: what do you mean "force recompilation"?
[20:21:08] dshah: basically invalidate the cached statements
[20:21:14] Haydos: has joined #RubyOnRails
[20:21:18] jgt1: has joined #RubyOnRails
[20:21:18] Radar: has joined #RubyOnRails
[20:21:24] Scient: has joined #RubyOnRails
[20:21:35] noah256: has joined #RubyOnRails
[20:21:38] targaf: has joined #RubyOnRails
[20:21:39] epochwolf: In the database or the current request?
[20:22:03] Technodrome: has joined #RubyOnRails
[20:22:18] dshah: What's the difference? (Maybe I don't know enough about how prep. stmts actually work with rails)
[20:22:25] eduardodeoh: has joined #RubyOnRails
[20:22:35] dshah: BTW - for context, this is for a postgress db
[20:22:45] dshah: (with prepared statements enabled by default)
[20:22:58] epochwolf: dshah: so... how much SQL do you know exactly?
[20:23:19] hendricius: has joined #RubyOnRails
[20:23:19] kitsuneyo: has joined #RubyOnRails
[20:23:37] dshah: LOL - I know enough to do some damage, but when it comes to some of the advanced stuff not so much
[20:24:35] epochwolf: dshah: okay, then what are you having problems with that you need to start messing with things?
[20:24:56] dshah: Just trying to address some concerns our DBA's have
[20:26:22] dshah: The concerns being that if we do something like remove a table in postgress, what exactly will ActiveRecord do
[20:26:24] ldnunes: has joined #RubyOnRails
[20:26:31] epochwolf: Also, a warning, any DBA is going to absolutely hate rails applications and what they do with the database.
[20:26:41] dshah: LOL - I've found that out
[20:27:20] epochwolf: dshah: is any other application using the same database as the rails app?
[20:27:45] kitsuneyo: i don't understand why this foreign key violation is happening: https://gist.github.com/kitsuneyo/d87e462aef8a8ec4d9357bd8d1cc53ee
[20:27:45] bruno-: has joined #RubyOnRails
[20:27:45] kitsuneyo: i think the relationship is set up right
[20:27:58] kadoppe: has joined #RubyOnRails
[20:28:00] petor: has joined #RubyOnRails
[20:28:08] renegadeandy: has joined #RubyOnRails
[20:28:38] kitsuneyo: what am i missing here?
[20:28:41] epochwolf: dshah: well then, you'll need to be careful to synchronize changes. Rails uses the Active Record design pattern for ORMs. It takes field names directly from the database. If a table goes missing, the app will crash when the model is loaded.
[20:29:11] epochwolf: If you rename a column, you need to rename all instance in your app where you use that column.
[20:29:13] jstransky: has joined #RubyOnRails
[20:29:25] kitsuneyo: i've added portrait_attributes to person_params, although it's not shown in the gist
[20:29:44] jstransky: I have a weird issue with sanitize and unicode characters.
[20:29:45] Devalo: has joined #RubyOnRails
[20:29:55] eshea: has joined #RubyOnRails
[20:30:02] jstransky: I have this line in my layout.html.erb <p class="help-message"><%= sanitize get_site_option_value("help_blurb") %></p>
[20:30:08] epochwolf: The standard rails package is designed to tightly integrate with the database schema.
[20:30:27] diegoaguilar: has joined #RubyOnRails
[20:30:31] jstransky: where the value of “help_blub” in the db is <p>Nā ʻŌkuhi Hoʻokele</p>
[20:30:32] epochwolf: You can swap out ActiveRecord for a different ORM library if you need something more flexiable.
[20:31:01] jstransky: the result is the value rendering outside of the element.
[20:31:22] epochwolf: But, you can get ActiveRecord to play nice with existing schemas in some cases. If you don't have multiple primary keys or wierd datatypes, you'll be fine.
[20:31:27] jstransky: so <p class="help-message"></p><p>Nā ʻŌkuhi Hoʻokele</p> is the result
[20:31:34] eshea: has joined #RubyOnRails
[20:31:51] dshah: epochwolf: thx. I def. get how ActiveRecord works and at this point feel like I'm probably just chasing down the answer to an unclear concern on the DBA side
[20:31:57] jstransky: works fine when the value is normal characters
[20:32:04] dshah: Thanks for your help though!
[20:32:10] dshah: I appreciate it :)
[20:32:16] djbkd: has joined #RubyOnRails
[20:32:48] epochwolf: dshah: rails doesn't do much automatically on the database. It's pretty basic.
[20:33:24] epochwolf: It is completely unaware of database tuning.
[20:34:43] epochwolf: dshah: I'd keep an eye on that DBA. A lot of DBAs are finding modern tools don't require their existence as much as they did before.
[20:34:45] dshah: That's what I've been seeing. I've been digging into the Postgres Adapter code
[20:35:03] dshah: pretty straightforward
[20:35:29] epochwolf: DBAs are useful but they aren't necessary for most application anymore.
[20:35:56] epochwolf: Any guy that can read manuals and follow tutorials can do a half-decent job with modern hardware.
[20:36:05] antgel: has joined #RubyOnRails
[20:36:53] [dmp]: has joined #RubyOnRails
[20:37:47] Aherin_: has joined #RubyOnRails
[20:37:53] stannard_: has joined #RubyOnRails
[20:38:38] i: has joined #RubyOnRails
[20:38:56] uxp_: has joined #RubyOnRails
[20:38:59] diprotic: has joined #RubyOnRails
[20:39:08] rickmasta: has joined #RubyOnRails
[20:39:40] Dreamer3: has joined #RubyOnRails
[20:39:56] Disavowed: has joined #RubyOnRails
[20:40:05] _djbkd: has joined #RubyOnRails
[20:40:06] context-: has joined #RubyOnRails
[20:40:17] MuffinPimp_: has joined #RubyOnRails
[20:40:45] arBmind: has joined #RubyOnRails
[20:41:48] neanderslob__: has joined #RubyOnRails
[20:41:54] raenk_: has joined #RubyOnRails
[20:41:56] speaking1ode: has joined #RubyOnRails
[20:41:58] Zadrel: has joined #RubyOnRails
[20:42:20] oweff_: has joined #RubyOnRails
[20:42:24] Fridtjof-: has joined #RubyOnRails
[20:42:29] dshah: Also out of curiosity, do most folks disable prepared statements in their rails apps?
[20:42:36] \13k_: has joined #RubyOnRails
[20:42:38] apotry: has joined #RubyOnRails
[20:42:48] dshah: Like, is that a "normal" thing if you've got a postgres db?
[20:43:05] masscrx_: has joined #RubyOnRails
[20:43:19] Dreamer3_: has joined #RubyOnRails
[20:43:25] jenrzzz: has joined #RubyOnRails
[20:43:25] jenrzzz: has joined #RubyOnRails
[20:43:27] ltd_: has joined #RubyOnRails
[20:44:06] snowy: has joined #RubyOnRails
[20:44:21] akhkharu: has joined #RubyOnRails
[20:45:03] pawnbox: has joined #RubyOnRails
[20:45:26] codelahoma_: has joined #RubyOnRails
[20:45:44] greenhat|: has joined #RubyOnRails
[20:46:03] kitsuneyo: my gist is at https://gist.github.com/kitsuneyo/d87e462aef8a8ec4d9357bd8d1cc53ee. when i delete a person in rails console, the associated portrait is destroyed too. when i do it in test, it says FK violation. don't get it
[20:46:32] dustinm`_: has joined #RubyOnRails
[20:46:33] Malgorath: has joined #RubyOnRails
[20:46:42] maxx88_: has joined #RubyOnRails
[20:46:54] braincra-: has joined #RubyOnRails
[20:47:01] fmcgeough_: has joined #RubyOnRails
[20:47:22] joeytwiddle_: has joined #RubyOnRails
[20:47:25] Davey: has joined #RubyOnRails
[20:47:25] Davey: has joined #RubyOnRails
[20:47:38] boontdustie: has joined #RubyOnRails
[20:47:39] armyriad: has joined #RubyOnRails
[20:47:46] spectra: has joined #RubyOnRails
[20:48:04] Malgorath: I am working on an engine and using the main apps layouts/base.html.erb (which loads) but issue I have is expecting <title><%= html_title %></title> in my application_controller.rb
[20:48:39] joelsmith: has joined #RubyOnRails
[20:48:41] Pro|: has joined #RubyOnRails
[20:48:45] Rixius: has joined #RubyOnRails
[20:48:45] joshkovach: has joined #RubyOnRails
[20:48:49] Malgorath: problem is that I have tried a few methods to set the html_title value but nothing seems to work (in the app controller, in the child view)
[20:48:50] bphogan: has joined #RubyOnRails
[20:49:46] cfloare: has joined #RubyOnRails
[20:49:47] martinbjeldbak: has joined #RubyOnRails
[20:50:14] polyidus: has joined #RubyOnRails
[20:50:14] mat-svol: has joined #RubyOnRails
[20:50:54] callumacrae: has joined #RubyOnRails
[20:51:01] SeductiveError: whats with an existing instance of a model (user) not being able to saved due to validations without any changes? just a=User.find_by(...) a.save!
[20:51:51] humd1ng3r: has joined #RubyOnRails
[20:52:48] arup_r1: has joined #RubyOnRails
[20:53:10] jwang: has joined #RubyOnRails
[20:53:14] adavia: has joined #RubyOnRails
[20:54:13] bronson: has joined #RubyOnRails
[20:54:30] mclee: has joined #RubyOnRails
[20:54:42] Zackio: has joined #RubyOnRails
[20:54:46] Raphal: has joined #RubyOnRails
[20:56:39] djbkd: has joined #RubyOnRails
[20:57:11] tweeeaks: has joined #RubyOnRails
[20:57:34] djbkd: has joined #RubyOnRails
[20:58:46] Guest9427: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[20:58:53] djbkd: has joined #RubyOnRails
[20:59:08] Radar: has joined #RubyOnRails
[21:02:38] SanguineAnomaly: has joined #RubyOnRails
[21:02:49] singleton_method: has joined #RubyOnRails
[21:03:20] Rubie: has joined #RubyOnRails
[21:04:16] rashkov: has joined #RubyOnRails
[21:04:46] kadoppe: has joined #RubyOnRails
[21:05:09] rashkov: Is it normal for rails params to turn an array into an object like this: {"0"=>{"percent"=>"", "alias_id"=>"2"}} ? How do I avoid that? I'd like it to be just a regular ruby array of objects. Not sure if my ajax settings are wrong maybe?
[21:09:27] fox_mulder_cp: rashkov: nested objects
[21:10:20] fox_mulder_cp: http://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.html
[21:10:30] fox_mulder_cp: accepts_nested_attributes_for :pets
[21:11:21] rashkov: fox_mulder_cp: I'll give that a try, thank you
[21:11:48] Radar: GOOD MORNING
[21:11:56] yfeldblum: has joined #RubyOnRails
[21:13:31] fox_mulder_cp: Radar: glad to see u again. where u now?
[21:13:38] Radar: fox_mulder_cp: everywhere
[21:13:45] dblessing: has joined #RubyOnRails
[21:15:01] pawnbox: has joined #RubyOnRails
[21:18:08] Trynemjoel: has joined #RubyOnRails
[21:18:53] Cohedrin: has joined #RubyOnRails
[21:20:12] SteenJobs: heh i’m listening to that song rn
[21:21:35] aegis3121: has joined #RubyOnRails
[21:21:50] polyidus: has joined #RubyOnRails
[21:25:41] fox_mulder_cp: how pass action into internal function? pastebin.com/LPzrf6KY
[21:26:02] fox_mulder_cp: now it says undefined
[21:27:56] MrPunkin: has joined #RubyOnRails
[21:29:19] eljimmy: has joined #RubyOnRails
[21:32:11] SteenJobs: what do you usually use for url validation? (say someone is submitting links in a form)
[21:32:53] macsteps: has joined #RubyOnRails
[21:34:05] fox_mulder_cp: SteenJobs: u want check tons of (http|https|callto|ftp|blackjack|fbi|gopher):// ?)
[21:34:41] SteenJobs: nah, but i also don’t want to simply check for a prefix
[21:34:54] fox_mulder_cp: SteenJobs: u may check predefined protocols and domain part of link
[21:35:25] SteenJobs: ah rails URI has a method parse()
[21:35:30] davidw: has joined #RubyOnRails
[21:36:09] fox_mulder_cp: uri = URI('http://10.0.0.4:4243/containers/create')
[21:36:23] fox_mulder_cp: res = Net::HTTP.start(uri.hostname, uri.port)
[21:37:26] SteenJobs: http://stackoverflow.com/a/7167988 ?
[21:38:37] codelahoma: has joined #RubyOnRails
[21:39:07] baweaver: has joined #RubyOnRails
[21:39:29] macsteps_: has joined #RubyOnRails
[21:40:30] SteenJobs: fox_mulder_cp: yea what i linked to isn’t great
[21:41:15] SteenJobs: reading thru uri docs now
[21:41:19] a1fa_: has joined #RubyOnRails
[21:41:24] wmoxam: has joined #RubyOnRails
[21:41:30] VeryBewitching: has joined #RubyOnRails
[21:42:50] shaman42: has joined #RubyOnRails
[21:43:08] urkle: has joined #RubyOnRails
[21:43:27] bruno-: has joined #RubyOnRails
[21:44:58] pawnbox: has joined #RubyOnRails
[21:45:41] benlieb: has joined #RubyOnRails
[21:45:44] n008f4g_: has joined #RubyOnRails
[21:46:23] s2013: has joined #RubyOnRails
[21:46:24] icedp: has joined #RubyOnRails
[21:46:37] teaearlgraycold: has joined #RubyOnRails
[21:46:44] targaf: has joined #RubyOnRails
[21:47:31] Vircung: has joined #RubyOnRails
[21:48:13] s2013: hello all. im having a brain fart.. i have a block model.. its basically model of users that are blocked by certain user.. https://gist.github.com/ss2k/487687a9b7a7ff2a906df7f82aeaa02f
[21:48:25] phredus_: has joined #RubyOnRails
[21:48:35] context: has joined #RubyOnRails
[21:48:40] s2013: what would the ideal way be to do something like user.blocked_users .. for some reason its totally escaping me
[21:48:43] kadoppe: has joined #RubyOnRails
[21:48:45] null__: has joined #RubyOnRails
[21:48:50] s2013: i can do a blocked_users method in the user.rb
[21:48:54] s2013: but i feel there is a better way
[21:49:23] llakey: has joined #RubyOnRails
[21:49:31] s2013: just add belongs_to :user ?
[21:49:47] kanzure: has joined #RubyOnRails
[21:52:16] s2013: i updated the gist, but still seems a bit odd
[21:52:35] Paradox: has joined #RubyOnRails
[21:52:47] rake_db_migrate: has joined #RubyOnRails
[21:54:49] maxx88: has joined #RubyOnRails
[21:55:26] FernandoBasso: has joined #RubyOnRails
[21:57:03] p8m: has joined #RubyOnRails
[21:57:09] s2013: nevermind got it
[21:57:58] petor: has joined #RubyOnRails
[21:58:37] bob434: has joined #RubyOnRails
[21:59:19] mostlybadfly: has joined #RubyOnRails
[22:04:11] SteenJobs: has joined #RubyOnRails
[22:06:50] jenrzzz_: has joined #RubyOnRails
[22:07:01] pwnd_nsfw`: has joined #RubyOnRails
[22:07:40] marr123: has joined #RubyOnRails
[22:08:55] dshah: has joined #RubyOnRails
[22:09:20] thorgi: has joined #RubyOnRails
[22:11:16] ornerymoose: has joined #RubyOnRails
[22:11:28] nickenchuggets: has joined #RubyOnRails
[22:11:28] nickenchuggets: has joined #RubyOnRails
[22:11:43] rake_db_migrate: has joined #RubyOnRails
[22:12:15] jarib: has joined #RubyOnRails
[22:12:15] jarib: has joined #RubyOnRails
[22:12:29] smathy: seductiveerror, easy, there are new validations that weren't there when that record was originally created, or a previous save skipped validations.
[22:14:10] vedu: has joined #RubyOnRails
[22:14:44] drbayer: has joined #RubyOnRails
[22:15:03] pawnbox: has joined #RubyOnRails
[22:15:26] FLeiXiuS: has joined #RubyOnRails
[22:15:29] mat-svol: has joined #RubyOnRails
[22:15:55] FLeiXiuS: Is there a way to convery a hash into parameters? I want to go from {foo: bar} to foo: bar
[22:16:46] _fortis: has joined #RubyOnRails
[22:17:43] smathy: FLeiXiuS, you mean named params? Just pass the hash.
[22:18:43] FLeiXiuS: I have a method that is def foo(*args)
[22:18:48] FLeiXiuS: I want the the hash to get passed as arguments.
[22:19:24] smathy: FLeiXiuS, foo(the_hash)
[22:19:43] tbuehlmann: has joined #RubyOnRails
[22:20:18] smathy: FLeiXiuS, let's try to get to the real issue here, what do *you* think the difference between `{foo: bar}` and `foo: bar` is?
[22:22:46] smathy: FLeiXiuS, actually, let's try to get to the REAL real issue here, how do you think IRC works? You think you ask a question, someone tries to help, and you just stop responding?
[22:24:38] SteenJobs: fox_mulder_cp: i used something similar in the end, i used NET::HTTP.get_response and check the response status
[22:25:15] smathy: Your validation for a URL is to hit the URL?
[22:25:17] smathy: How rude!
[22:25:30] SteenJobs: well they’re supplying it…it’s a link to their portfolio!
[22:25:36] SteenJobs: i’m sure they won’t mind an extra ping
[22:25:54] smathy: ACTION goes searching for non-idempotent GET URLs
[22:26:35] SteenJobs: is that a thing?
[22:26:48] PedramT: has joined #RubyOnRails
[22:27:02] SteenJobs: and is doing that actually frowned upon…?
[22:29:35] smathy: SteenJobs, it's definitely a thing that there are sites who make state changes upon GET requests, whether someone would bother using YOUR site to proxy such an attack is something you'll find out. Whether you hitting a URL just to validate it will be frowned upon will depend on the frequency of that, and how often you're doing it to the same domain/site.
[22:30:12] macsteps: has joined #RubyOnRails
[22:30:25] smathy: SteenJobs, the biggest problem is really that if you momentarily can't reach that URL then you'll probably think it's invalid.
[22:30:36] SteenJobs: smathy: got it - basically when an agency submits a portfolio, they can submit links to their portfolio, so i only check upon link submission to validate the model
[22:31:18] SteenJobs: smathy: i actually haven’t added the method to the model’s validations yet - right now i check the if the uri is http or https, and i check the suffix
[22:31:32] quazimodo: has joined #RubyOnRails
[22:31:52] smathy: SteenJobs, it's the sort of side-effect check that my stupid Samsung Smart TV does to tell if it has an internet connection. Problem is when the host it's trying to reach is unreachable (for any other reason than my connection being down) then it reports my connection as down and doesn't even try getting to what I want to get to.
[22:32:21] SteenJobs: yea i hear that
[22:32:29] SteenJobs: worst case user would just have to submit their links again
[22:32:40] SteenJobs: but i’m gonna leave it out for now and just use the parsing validators
[22:33:39] smathy: Why wouldn't you just use URI::regexp ?
[22:34:22] Devalo: has joined #RubyOnRails
[22:35:12] shinnya: has joined #RubyOnRails
[22:35:53] eshea: has joined #RubyOnRails
[22:36:07] DragonPunch: has joined #RubyOnRails
[22:36:29] SteenJobs: smathy: is there a default regexp scheme that comes with it?
[22:36:53] eshea: has joined #RubyOnRails
[22:36:59] smathy: By "regexp scheme" do you mean URI scheme?
[22:37:16] SteenJobs: no i mean like a regexp that parses URIs in particular
[22:37:21] SteenJobs: or would i have to write my own
[22:38:15] smathy: Huh? Do you think when I wrote "URI::regexp" I was just talking about some generic notion?
[22:38:51] SteenJobs: smathy: yea, i thought it’s just a helper for plugging in your own custom regexp
[22:38:53] SteenJobs: but i guess not
[22:39:20] smathy: http://lmgtfy.com/?q=URI::regexp
[22:39:31] SteenJobs: i deserve that
[22:39:38] Sawbones: has joined #RubyOnRails
[22:39:57] SteenJobs: although it only checks the scheme
[22:40:04] kadoppe: has joined #RubyOnRails
[22:40:05] SteenJobs: so wouldn’t http://whatup pass?
[22:42:22] smathy: Actually, it's useless - that would have been a good answer to why you weren't using it.
[22:42:30] smathy: "h:/" passes!
[22:43:22] SteenJobs: so i check both the scheme and the suffix
[22:43:33] SteenJobs: i’ll be back in a bit
[22:43:41] Technodrome: has joined #RubyOnRails
[22:44:33] smathy: Looks like you need to parse it and then check that it has a host, path, etc. And yes, "http://xyz/" will still work, but really, aren't the people submitting this only hurting themselves if they can't copy/paste?
[22:44:43] pawnbox: has joined #RubyOnRails
[22:45:01] ur5us: has joined #RubyOnRails
[22:45:05] smathy: ACTION is surprised how terrible that URI::regexp is
[22:45:08] dopie: has joined #RubyOnRails
[22:47:17] Cooooo: has joined #RubyOnRails
[22:47:27] djbkd: has joined #RubyOnRails
[22:48:23] rake_db_migrate: has joined #RubyOnRails
[22:51:33] jenrzzz: has joined #RubyOnRails
[22:52:09] GodFather: has joined #RubyOnRails
[22:52:45] djbkd: has joined #RubyOnRails
[22:52:56] quazimod1: has joined #RubyOnRails
[22:54:05] _djbkd: has joined #RubyOnRails
[22:54:13] rafaelfranca: has joined #RubyOnRails
[22:54:13] rafaelfranca: has joined #RubyOnRails
[22:56:03] bronson: has joined #RubyOnRails
[22:57:17] aguynamedben: has joined #RubyOnRails
[22:57:26] neanderslob: has joined #RubyOnRails
[22:59:05] valetudo: has joined #RubyOnRails
[23:00:01] rake_db_migrate: has joined #RubyOnRails
[23:00:54] aguynamedben: hello, if anybody is interested in working at a VC firm in San Francisco (First Round Capital), please DM me!
[23:00:56] jstransky: has joined #RubyOnRails
[23:01:36] ivanskie: has joined #RubyOnRails
[23:02:43] wldcordeiro: has joined #RubyOnRails
[23:04:04] chouhoulis: has joined #RubyOnRails
[23:04:31] ornerymoose: has joined #RubyOnRails
[23:05:45] Vlatiska: has joined #RubyOnRails
[23:05:53] Vlatiska: Hello, i have a post page with a form to post comment. When i validate form, if that dont pass, i render :new, but i lost all post page when i do that. What is the best way to achieve this?
[23:07:24] edwinvdgraaf: has joined #RubyOnRails
[23:07:40] kadoppe: has joined #RubyOnRails
[23:08:56] eshear: has joined #RubyOnRails
[23:09:22] baweaver: has joined #RubyOnRails
[23:09:40] gambl0re: has joined #RubyOnRails
[23:12:04] eshea__: has joined #RubyOnRails
[23:12:48] smathy: Vlatiska, there could be so many places you've messed up, it's impossible to say anything other than: the right way.
[23:13:15] eshea: has joined #RubyOnRails
[23:14:37] Vlatiska: smathy: I think its because i lost variable with render, but i can just reinit variable in my comment controller
[23:15:50] smathy: Vlatiska, !code
[23:15:50] helpa: Vlatiska: 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.
[23:16:44] Vlatiska: Ok, i will try something and come back if that dont work, i have an idea
[23:19:13] baweaver: has joined #RubyOnRails
[23:19:50] jenrzzz: has joined #RubyOnRails
[23:21:19] hinbody: has joined #RubyOnRails
[23:23:24] maxdoubt: has joined #RubyOnRails
[23:24:34] pawnbox: has joined #RubyOnRails
[23:25:09] codezomb: has joined #RubyOnRails
[23:25:44] twilling: has joined #RubyOnRails
[23:28:44] dopamean1: has joined #RubyOnRails
[23:29:09] superlou: has joined #RubyOnRails
[23:33:25] DLSteve: has joined #RubyOnRails
[23:33:45] SteenJobs: has joined #RubyOnRails
[23:34:09] watersoul: has joined #RubyOnRails
[23:34:30] macsteps: has joined #RubyOnRails
[23:35:01] Devalo: has joined #RubyOnRails
[23:35:33] Haydos: has joined #RubyOnRails
[23:35:46] kadoppe: has joined #RubyOnRails
[23:38:35] diegoaguilar: has joined #RubyOnRails
[23:38:46] FLeiXiuS`: has joined #RubyOnRails
[23:38:57] zave: has joined #RubyOnRails
[23:45:32] watersoul: has joined #RubyOnRails
[23:49:19] mozzarella: has joined #RubyOnRails
[23:51:03] zave: has joined #RubyOnRails
[23:51:05] fernandomm: has joined #RubyOnRails
[23:53:52] polyidus: has joined #RubyOnRails
[23:54:34] macsteps: has joined #RubyOnRails
[23:54:42] pawnbox: has joined #RubyOnRails
[23:54:48] FooMunki: has joined #RubyOnRails
[23:59:22] petor: has joined #RubyOnRails