« Back to channel list

#RubyOnRails - 16 March 2016

« Back 1 day Forward 1 day »
[00:00:10] godzillaenlacasa: has joined #RubyOnRails
[00:01:19] mattwithoos: has joined #RubyOnRails
[00:01:53] pawnbox: has joined #RubyOnRails
[00:04:38] mattwithoos: has joined #RubyOnRails
[00:06:10] stannard: has joined #RubyOnRails
[00:06:39] [gmi]: has joined #RubyOnRails
[00:12:06] Bugson: has joined #RubyOnRails
[00:14:10] ensyde__: has joined #RubyOnRails
[00:14:12] baash05: has joined #RubyOnRails
[00:14:43] BBonifield: has joined #RubyOnRails
[00:15:30] jstransky: hey guys. I’m getting this error couldn't find file 'dragula' with type 'text/css'
[00:15:34] jstransky: not really sure how to troubleshoot
[00:15:36] jkahn: has joined #RubyOnRails
[00:16:02] jstransky: it’s highlighting this line in my application.css.scss
[00:16:03] jstransky: *= require dragula
[00:16:11] pwnd_nsfw: then error is gone
[00:16:14] akshat: has joined #RubyOnRails
[00:17:02] jstransky: the usage seems pretty straight forward https://github.com/why-el/dragula-rails
[00:17:32] sevenseacat: did you restart your server after bundling the gem?
[00:17:47] jstransky: hmm, let me try that
[00:19:02] jstransky: hah, not sure if that fixed it because now I have a big passenger error screen “Web application could not be started"
[00:20:21] _Tariq: has joined #RubyOnRails
[00:20:26] sevenseacat: i wouldnt recommend using passenger in development
[00:21:14] jstransky: k fixed that, was missing some .yml file
[00:21:20] jstransky: sevenseacat: why not?
[00:21:31] mattwithoos: sevenseacat: as a newbie I’m curious why not?
[00:21:32] jstransky: I don’t even know what it is :)
[00:21:35] sevenseacat: because its added overhead that just makes things more complicated
[00:21:56] mattwithoos: but what if you’re using docker and have the env all packaged up for dev/stage/prod?
[00:22:08] sevenseacat: i have no experience with docker.
[00:22:14] sevenseacat: but i wouldnt use that in dev either.
[00:22:16] jstransky: our vagrant is using apache, I guess that’s why we use it.
[00:22:36] sevenseacat: i tend to keep things simple and just use `rails server` :)
[00:23:00] mattwithoos: fair enough, what context is that in, though? big team? just yourself? small projects?
[00:23:14] jstransky: Ah, I guess our tech leads want perfect parity between our local and production servers
[00:23:17] mattwithoos: because docker is great for large teams, but a burden for just one person
[00:24:03] sevenseacat: i work on small teams
[00:24:33] jstransky: btw, thanks for the tip on restarting the server
[00:24:50] trosborn: has joined #RubyOnRails
[00:25:07] Arcaire: I don't think I've ever been in a situation where I've thought "you know what's great? Docker."
[00:25:14] mattwithoos: how do you mitigate the risk of deploying something that works on the built-in server in dev/stage but potentially breaks in passenger in Prod?
[00:25:37] sevenseacat: thats the point of staging, no, to be a clone of prod?
[00:25:55] mattwithoos: so you’re saying not to use passenger full stop?
[00:26:03] mattwithoos: rather than specifically not on dev/local
[00:26:11] sevenseacat: use passenger in staging/prod if you like
[00:26:58] mattwithoos: oops misread the above, sorry
[00:27:00] sneakerhax: has joined #RubyOnRails
[00:27:18] hahuang65: has joined #RubyOnRails
[00:27:22] mattwithoos: for some reason I misread dev as stage
[00:27:39] mwlang: mattwithoos: she’s saying, K.I.S.S. in your dev environment. Passenger rocks as a production deployment option.
[00:28:03] mwlang: in my experience, something working on development pretty much works on deployed server.
[00:28:08] theblang: has joined #RubyOnRails
[00:28:16] mattwithoos: the 10% is the voices in my head from all the SysAdmins I know advocating for Docker
[00:28:33] pwnd_nsfw: unless you're using windows for dev
[00:28:45] d0nn1e: has joined #RubyOnRails
[00:28:45] mattwithoos: ha ha ha ha ha
[00:28:45] sevenseacat: in my experience, thats not the case because everyone goes nuts for osx in dev for some reason.
[00:29:19] mwlang: two “gotchas” I’ve encountered over the years: 1) sprockets and fingerprinted assets different behavior in development vs. production 2) charset encoding issues where Apache returns a page full of diamonds and questionmarks whereas local environment did not.
[00:29:47] mattwithoos: cool! coming from a PHP background the issues are usually PHP mods
[00:30:23] mattwithoos: “oh no I forgot that I have to install the JSON php mod in order to use JSON functions GREAT”
[00:30:48] mwlang: mattwithoos: if you have a team of more than 10 developers or you’re regularly starting new Rails projects for each new client, then docker starts to make sense as a development tool.
[00:31:13] mattwithoos: we’re close, but not quite there mwlang
[00:31:36] mwlang: mattwithoos: meaning, if you need to deal with code-rot where you build for a customer, deploy and nothing happens for 6 - 8 months…then need to quickly get back into the project exactly as left off.
[00:31:56] mwcmitchell: has joined #RubyOnRails
[00:31:57] mattwithoos: ahh right… thanks for the tip :)
[00:32:32] mwlang: development environments tend to drift as you’re continuously upgrading Ruby or Rails and other gems. Bundler helps, but its not sure-fire cure.
[00:33:34] robbyoconnor: has joined #RubyOnRails
[00:35:38] dalbusch1t: has joined #RubyOnRails
[00:40:31] i8igmac: has any one worked with actioncontroller::live and jquery to deliver live stream to a client browser?
[00:41:18] i8igmac: my working example works, but its like a never ending loop
[00:41:50] i8igmac: the client browser will append the stream to a <div> but its a never ending loop of reconnect's
[00:42:01] i8igmac: maybe this is the expected behavior?
[00:42:09] petor: has joined #RubyOnRails
[00:42:46] d0nn1e: has joined #RubyOnRails
[00:43:41] rubyonrailed: has joined #RubyOnRails
[00:43:52] bronson: has joined #RubyOnRails
[00:46:39] smoitra: has joined #RubyOnRails
[00:46:49] emachnic: has joined #RubyOnRails
[00:48:45] tenderlove: has joined #RubyOnRails
[00:49:24] i8igmac: i dont know if its a controller issue or my jquery
[00:49:47] mwlang: i8igmac: I have mostly avoided streaming with rails: http://old.blog.phusion.nl/2012/08/03/why-rails-4-live-streaming-is-a-big-deal/
[00:49:58] mwlang: the story may be different today.
[00:50:13] stannard: has joined #RubyOnRails
[00:50:18] mwlang: in the past, if I wanted to do streaming apps in Ruby, I used Goliath
[00:50:52] i8igmac: ill check out goliath
[00:50:58] mwlang: i8igmac: https://github.com/postrank-labs/goliath
[00:51:28] pawnbox: has joined #RubyOnRails
[00:52:25] Arcaire: mattwithoos: I generally do that by standardising things and not using software that comes with security issues in its default configuration.
[00:52:50] gbgdev_: has joined #RubyOnRails
[00:52:51] Arcaire: See also: Puppet, Chef, Ansible, Saltstack.
[00:53:00] Arcaire: I've used the former three.
[00:53:21] diegoviola: has joined #RubyOnRails
[00:53:34] mwlang: Arcaire: I guess that rules out anything Windoze.
[00:53:38] mattwithoos: haha - docker has security issues in it’s default config?
[00:53:49] Arcaire: mwlang: Not one bit.
[00:53:49] mattwithoos: that’s comforting
[00:53:56] Arcaire: mattwithoos: Zero to root.
[00:54:14] silverdust: a1fa: fixed? Sorry I had to leave
[00:56:23] Arcaire: mwlang: Why would it rule out Windows?
[00:56:54] mwlang: Arcaire: Notorious for favoring non-secure settings out of the box.
[00:57:03] IFrank00: has joined #RubyOnRails
[00:57:03] Arcaire: They're a lot better now.
[00:57:11] Arcaire: Windows Server 2008R2 and beyond are really, really good.
[00:57:16] Arcaire: Same with Windows 8+.
[00:57:39] mwlang: Arcaire: well, I just installed Win10 a couple weeks back. So far, quite impressed with it.
[00:57:54] Arcaire: It does very well for itself.
[00:58:16] Arcaire: If you're super privacy conscious I recommend running Win10-Unfuck by Cuckmaster Flash.
[00:58:36] Arcaire: It removes a bunch of apps and modifies a bunch of settings to stop all the analytics that Windows 10 does.
[00:59:01] ramortegui: has joined #RubyOnRails
[00:59:03] mwlang: Arcaire: sounds like a performance booster
[00:59:10] theblang: has joined #RubyOnRails
[00:59:10] Arcaire: It's mostly a declutterer, really.
[00:59:16] Arcaire: Removes all the apps like XBOX and stuff.
[00:59:32] mwlang: The thing that drives me totally batty is the number of times per day I have to answer yes to install some silly update.
[00:59:43] Arcaire: I believe you can make that automatic.
[01:00:05] Arcaire: I'm not sure, I use OS X almost exclusively.
[01:00:14] Didac: has joined #RubyOnRails
[01:00:14] mwlang: same here.
[01:00:16] mattwithoos: Acaire if you’re super privacy conscious you don’t install win10
[01:00:18] Arcaire: I have a Win10 VM but I don't actually use it for anything.
[01:00:25] Arcaire: mattwithoos: ok
[01:00:25] mwlang: running SQL Server 2005 project at the moment.
[01:00:58] atrius: has joined #RubyOnRails
[01:02:29] mwlang: insane — I was once a hard-core windows developer => drivers, API, hardware interfacing, etc. with Delphi. Much happier as a Ruby developer. :-D
[01:02:35] [gmi]: has joined #RubyOnRails
[01:04:16] Gmi_: has joined #RubyOnRails
[01:04:37] mattwithoos: fairly sure the privacy conscious go for open source…
[01:05:34] mattwithoos: but even that is ultimately pointless if the theory that major HDD vendors allow NSA backdoors is true
[01:05:42] mattwithoos: cuz who has time to make their own HDD >.<
[01:06:33] diegoviola: has joined #RubyOnRails
[01:06:56] Us54er: has joined #RubyOnRails
[01:09:17] chouhoulis: has joined #RubyOnRails
[01:10:18] jkahn: has joined #RubyOnRails
[01:10:52] mattwithoos: is there a big pay difference between being a windows developer doing that kind of stuff and working on Rails?
[01:11:57] mrgreenfur: has joined #RubyOnRails
[01:12:40] pawnbox: has joined #RubyOnRails
[01:13:07] _Tariq: has joined #RubyOnRails
[01:14:01] mwlang: mattwithoos: you basically earn what you can command (or are willing to command). The best developers, no matter what field or programming language they’re in, tend to command top-dollar across the board.
[01:14:23] mwlang: I would argue that today, the easiest route to higher pay is in web apps.
[01:14:29] uglybandersnatch: has joined #RubyOnRails
[01:14:45] i8igmac: so, with actioncontroller::live, the example posted on the api, i think there maybe a problem with
[01:14:45] i8igmac: response.stream.close
[01:14:48] i8igmac: it dont seem to close the clients connection?
[01:15:10] mattwithoos: I totally agree, I was more curious from a general market perspective, because I perceive that windows work as harder (and would reason that it generally pays more)
[01:15:24] mattwithoos: but it seems to be the opposite so often!
[01:15:25] i8igmac: if i place in my jquery on the client side, source.close(); it closes just fine
[01:15:39] mattwithoos: sorry for interrupting i8igmac
[01:16:12] i8igmac: i may have to send a "stream_end" to the client, then close on there side
[01:16:14] kdough: has joined #RubyOnRails
[01:16:33] i8igmac: but i thought this was already implemented
[01:16:39] mwlang: mattwithoos: I wouldn’t necessarily call it harder. It’s a different programming environment, though. API calls are message-driven and often, you’re debugging other people’s compiled DLLs
[01:17:10] Darmani: has joined #RubyOnRails
[01:17:28] theblang: has joined #RubyOnRails
[01:17:35] mwlang: In a way, micro-services and RESTful interfaces built with Rails and other web apps is similar to message-driven development of Windows.
[01:18:08] Burnzoire: has joined #RubyOnRails
[01:19:13] Darmani: Hello! ^.^
[01:19:32] mattwithoos: interesting comparison mwlang, thanks for enlightening me :)
[01:20:20] Darmani: I ran a scaffold for practice, then I deleted it but now I can't create a new model with the same name.
[01:20:23] Darmani: What's going on Q.Q
[01:20:30] neanderslob: has joined #RubyOnRails
[01:21:00] mwlang: Darmani: use the force
[01:21:29] Darmani: That won't ruin anything will it? I don't like to force things.
[01:21:37] Darmani: I don't like to force anything really xD
[01:21:37] mattwithoos: btw, any Melbourne (AU) based contractor/freelancer devs looking for work? we have a project coming up and are looking for anyone on the spectrum from Junior, Mid to Senior. I can sell you on our company if you want (flat hierarchy, no micromanaging (manage yourself), low-stress, new project!) - send me a DM if interested :)
[01:21:48] rogue_koder: has joined #RubyOnRails
[01:21:52] Burnzoire: Question: Should I go for MTI via a gem (ActsAs), or put up with STI with application level validation? I'm currently undoing ugly reverse polymorphic associations as they don't play well with strong params
[01:22:04] mwlang: Darmani: do you care about any of the files you previously generated?
[01:22:18] Darmani: mwlang: nah. It's all for practice really.
[01:22:18] mwlang: if not, then just run it and answer Y/N to each file it prompts you about.
[01:22:35] Darmani: Alright sounds good captain ^.^
[01:23:12] tenderlove: has joined #RubyOnRails
[01:23:49] Darmani: mwlang: Oh noess. wait I don't think I was clear.
[01:23:55] Darmani: What I mean is I can't run a migration.
[01:24:08] mwlang: Darmani: as in rake db:migrate
[01:24:30] mwlang: so you want to rake db:rollback ?
[01:24:49] phredus: has joined #RubyOnRails
[01:25:10] Burnzoire: rollback may break if you've changed code since
[01:25:25] mwlang: Darmani: rake -T db => may be enlightening.
[01:25:29] timdotrb: has joined #RubyOnRails
[01:26:06] Darmani: rake db:migrate version=0
[01:26:08] EdwardIII: has joined #RubyOnRails
[01:26:12] Darmani: that's how you reset it right?
[01:26:44] Burnzoire: so, any opinions on rails and inheritance here?
[01:27:20] Burnzoire: darmani, do you care about the data in your db?
[01:27:33] mwlang: Burnzoire: I tend to find a way to build without STI or polymorphism
[01:27:42] Darmani: Burnzoire: No, it's just practice.
[01:28:01] Burnzoire: then just db:drop and db:create again
[01:28:34] Us54er: has joined #RubyOnRails
[01:29:14] Miron: has joined #RubyOnRails
[01:29:24] Burnzoire: mwlang, not sure I can avoid it
[01:29:50] tjbiddle: has joined #RubyOnRails
[01:30:00] emachnic: has joined #RubyOnRails
[01:30:03] Darmani: Burnzoire: That worked!
[01:30:07] Darmani: You are a god amongst men
[01:30:19] Burnzoire: the way to avoid it would be to have multiple has_one associations and push validation to the appliation, which doesn't seem very robust
[01:31:04] Darmani: I'm pretty new to Rails, I'm trying to recreate all the pieces from the "Scaffold" command as practice ^.^
[01:31:08] Burnzoire: darmani, read up on db:schema:load as well
[01:31:26] moeabdol: has joined #RubyOnRails
[01:31:34] mwlang: Burnzoire: just my humble opinion. :-) I don’t really know much abut the MTI options.
[01:32:02] mwlang: Darmani: rake db:reset is a quick way to drop, create, and reload migrations
[01:32:03] Burnzoire: yeah i understand mwlang... we all prefer to avoid pushing shit uphill but sometimes it happens
[01:32:04] eyeamaye: has joined #RubyOnRails
[01:32:19] dopie: has joined #RubyOnRails
[01:32:43] Uo9er_: has joined #RubyOnRails
[01:33:02] mwlang: Burnzoire: I’m curious, though, what breaks with strong params?
[01:33:40] mwlang: I’m thinking, “why not just solve the strong params problem?”
[01:33:53] Burnzoire: yeah i went there but it's ugly
[01:34:11] Burnzoire: so strong params and nested attributes only work parent->child
[01:34:28] rogue_koder: has joined #RubyOnRails
[01:34:42] Burnzoire: but reverse poly is the other way around, so you get rather awkward strong params, i.e the child with the parent nested in it
[01:34:43] sleungcy: has joined #RubyOnRails
[01:34:55] Darmani: Hey by any chance, would any of you be open to tutoring a newbie? I'd be willing to pay you ^.^
[01:34:56] Burnzoire: which is not nice for consumers of my API
[01:35:21] Maletor: has joined #RubyOnRails
[01:35:49] Burnzoire: i'm referring to accepts_nested_parameters_for
[01:36:15] rogue_koder: has joined #RubyOnRails
[01:36:33] jkahn: has joined #RubyOnRails
[01:37:28] hnanon: has joined #RubyOnRails
[01:37:50] Burnzoire: I wouldn't be a good tutor darmani, you'd inherit all of my bad practices ;)
[01:38:05] Burnzoire: like reverse polymorphic associations :S
[01:38:28] Tref: has joined #RubyOnRails
[01:38:36] Darmani: Burnzoire: Lol at least you're honest... I am looking to hire someone though to help me develop good Rails practices =P
[01:39:00] DmitryBochkarev: has joined #RubyOnRails
[01:39:18] jenrzzz: has joined #RubyOnRails
[01:40:04] Burnzoire: mwlang do you see where I'm coming from?
[01:40:49] hnanon: I have a list of jobs. They are sorted in views by the created_at attribute in descending order. The jobs expire after x days. I want to give users the option to renew their expired jobs (same job id so the url doesn't change). What's the best way to show the renewed jobs first (their created_at date would push them down the list). I can't use the updated_at attribute since users can game their position by editing their active j
[01:40:54] mwlang: Burnzoire: yeah, I see — so I’m guessing the field list fluxuates quite a bit between the parents.
[01:41:10] hnanon: Can/should I override the created_at attribute?
[01:41:19] hnanon: Should I just create a new job id?
[01:42:09] Burnzoire: hnanon. Not really. If you don't want to use default behavior maybe don't use timestamps in your migration and use your own fields?
[01:42:17] bePolite: has joined #RubyOnRails
[01:43:02] Burnzoire: mwlang: yeah they do, which is why i'd steer away from STI, though it's the 'rails way'
[01:44:22] Burnzoire: though STI would result in a lot of nulls in the table, it would at least be easier to write my controllers. I guess this actsas gem might be worth a spike
[01:46:32] mwlang: Burnzoire: I think if I were in this spot, I’d still focus on just solving the current strong params issue in a way that’s easily maintained and set it up to dynamically determine the reverse parent’s permitted attributes
[01:47:22] mwlang: however, I haven’t looked at actsas — it may already be solving the problem.
[01:48:02] pulgalipe: has joined #RubyOnRails
[01:48:24] Burnzoire: I guess I'm trying to avoid hacky controller code by getting the models right in the first place
[01:49:03] Burnzoire: it's a large project and this same problem has cropped up 3 times now... I feel like it's a sign i'm designing things the wrong way
[01:49:57] Burnzoire: being that I learned rails on this project it's hard to see things clearly, which is why I jumped in this channel for some fresh perspective
[01:50:25] chouhoulis: has joined #RubyOnRails
[01:50:50] someish: has joined #RubyOnRails
[01:50:54] SteenJobs: has joined #RubyOnRails
[01:51:12] Burnzoire: thanks for your input... time for lunch
[01:57:36] stannard: has joined #RubyOnRails
[02:01:44] ramortegui: has joined #RubyOnRails
[02:02:18] pawnbox: has joined #RubyOnRails
[02:02:39] lessless: has joined #RubyOnRails
[02:05:12] ramortegui_: has joined #RubyOnRails
[02:09:16] i8igmac: i did it LOL
[02:10:55] rubyonrailed: has joined #RubyOnRails
[02:13:23] sevenseacat: has joined #RubyOnRails
[02:14:48] tjbiddle: has joined #RubyOnRails
[02:16:14] blackmesa: has joined #RubyOnRails
[02:16:44] ensyde: has joined #RubyOnRails
[02:17:46] ensyde: has joined #RubyOnRails
[02:17:57] AnoHito_: has joined #RubyOnRails
[02:18:59] rtom_: has joined #RubyOnRails
[02:22:07] Tyrant505: has joined #RubyOnRails
[02:24:54] BrianJ: has joined #RubyOnRails
[02:25:03] mattwithoos: has joined #RubyOnRails
[02:28:01] chagel: has joined #RubyOnRails
[02:28:18] ensyde: has joined #RubyOnRails
[02:28:24] i8igmac: i have a very noob question... extremely... please give me crap...
[02:28:36] fschuindt: has joined #RubyOnRails
[02:28:39] pluralism: has joined #RubyOnRails
[02:28:43] i8igmac: if i want to add a new tools.html.erb . . .
[02:28:54] i8igmac: should i just write a new file or use rails g
[02:29:14] fschuindt: Radar: Just used your railsbot tips.sql on it, haha ty :P https://github.com/fschuindt/ruby-slack-friend
[02:30:39] Devalo: has joined #RubyOnRails
[02:31:20] Uber|Dragon: has joined #RubyOnRails
[02:31:59] Ropeney: has joined #RubyOnRails
[02:32:13] pawnbox: has joined #RubyOnRails
[02:33:35] Radar: fschuindt: nice :)
[02:33:57] pluralism: Hi everyone
[02:34:32] bePolite: has joined #RubyOnRails
[02:34:46] pluralism: What's the difference between bundle exec rails s and just rails ?
[02:35:03] sleungcy: has joined #RubyOnRails
[02:37:53] U7se6: has joined #RubyOnRails
[02:38:34] rtom_: has left #RubyOnRails: ()
[02:38:40] aloneintheworld: has joined #RubyOnRails
[02:39:46] stannard: has joined #RubyOnRails
[02:40:29] hahuang61: has joined #RubyOnRails
[02:43:17] petor: has joined #RubyOnRails
[02:44:32] pluralism: has joined #RubyOnRails
[02:49:30] chagel: has joined #RubyOnRails
[02:51:55] pluralism: has joined #RubyOnRails
[02:52:47] mbergek: has joined #RubyOnRails
[02:54:01] Burnzoire: has left #RubyOnRails: ()
[02:57:54] tjbiddle: has joined #RubyOnRails
[03:00:11] chagel: has joined #RubyOnRails
[03:01:58] trosborn: has joined #RubyOnRails
[03:06:40] uglybandersnatch: has joined #RubyOnRails
[03:06:47] chagel: has joined #RubyOnRails
[03:08:08] IFrank00: has joined #RubyOnRails
[03:11:46] chagel: has joined #RubyOnRails
[03:14:23] _Tariq: has joined #RubyOnRails
[03:16:45] chagel: has joined #RubyOnRails
[03:17:12] blackmesa: has joined #RubyOnRails
[03:20:34] havenwood: pluralism: If you're using RVM, nothing, but generally the former is in the context of your Bundle and the latter isn't.
[03:21:30] dopamean_: has joined #RubyOnRails
[03:25:21] pluralism: havenwood: Thanks! So, using bundle exec it should be safer if we're working in a team?
[03:29:25] chagel: has joined #RubyOnRails
[03:33:50] stannard: has joined #RubyOnRails
[03:34:16] Uo9er_: has joined #RubyOnRails
[03:35:26] djbkd: has joined #RubyOnRails
[03:35:47] claytonzaugg: has joined #RubyOnRails
[03:36:06] Us54er: has joined #RubyOnRails
[03:37:39] jenrzzz: has joined #RubyOnRails
[03:39:44] chagel: has joined #RubyOnRails
[03:40:52] wreet: has joined #RubyOnRails
[03:41:34] dmarr_: has left #RubyOnRails: ()
[03:44:04] duncannz: has joined #RubyOnRails
[03:45:31] jenrzzz_: has joined #RubyOnRails
[03:45:51] RegulationD: has joined #RubyOnRails
[03:50:23] jenrzzz: has joined #RubyOnRails
[03:54:13] ruind: has joined #RubyOnRails
[03:55:18] Miron: has joined #RubyOnRails
[03:55:32] Uo9er_: has joined #RubyOnRails
[03:59:31] godzillaenlacasa: has joined #RubyOnRails
[04:00:33] ukazap: has joined #RubyOnRails
[04:02:12] configged-: has joined #RubyOnRails
[04:07:12] fedexo: has joined #RubyOnRails
[04:08:22] creature: has joined #RubyOnRails
[04:08:22] creature: has joined #RubyOnRails
[04:11:54] jenrzzz: has joined #RubyOnRails
[04:12:14] braincrash: has joined #RubyOnRails
[04:19:24] eyeamaye: has joined #RubyOnRails
[04:20:14] blackmesa: has joined #RubyOnRails
[04:20:47] chagel: has joined #RubyOnRails
[04:22:16] greengriminal: has joined #RubyOnRails
[04:22:26] rubyonrails163: has joined #RubyOnRails
[04:24:00] rubyonrails163: how do i do i change the value of a model
[04:24:12] Radar: Inflate the market arbitrarily.
[04:24:18] Radar: rubyonrails163: !explain
[04:24:18] helpa: rubyonrails163: Please explain your problem better as we are having trouble understanding what you mean. A Gist (http://gist.github.com) is always helpful!
[04:25:17] davee_: has joined #RubyOnRails
[04:25:58] rubyonrails163: im making an app where i can keep a record of the amount of times a politician promises something
[04:26:18] rubyonrails163: so i have 3 politicians, clinton, sanders and trump
[04:26:30] rubyonrails163: i made a scaffold of that
[04:26:40] _bogus_: hey, i created a method to do custom search on database, and from this query I want to render a json object, but I only want in this json object 2 parameters: the id, and the url(:small) for the paperclip field, how can I do this?
[04:27:01] rubyonrails163: and each politician has a name:string and promises:integer
[04:27:11] rubyonrails163: how do i increment 'promises' from a view
[04:28:34] rubyonrails163: im just looking to have a button next to each of their names which when pressed will increment their 'promises' value
[04:28:36] barajasfab: has joined #RubyOnRails
[04:28:38] Radar: rubyonrails163: You increment it from a controller. Views should not be modifying the database.
[04:29:03] Radar: rubyonrails163: You should use code like `button_to "Made a promise!", promises_path` and then have the controller action increment that value.
[04:30:28] rubyonrails163: but promises is just a number
[04:30:31] treaki__: has joined #RubyOnRails
[04:32:03] rubyonrails163: do i make a method called "promises_path" in politician_controller.rb?
[04:33:46] ashishsingh173: has joined #RubyOnRails
[04:34:18] sevenseacat: promises_path is a route. routes map to controller actions
[04:34:40] sevenseacat: then the controller action would load the right politician, and update the number of promises
[04:37:27] konsolebox: has joined #RubyOnRails
[04:38:39] codezomb: has joined #RubyOnRails
[04:39:32] rubyonrails163: No route matches {:action=>"edit", :controller=>"politician"} missing required keys: [:id]
[04:39:57] rubyonrails163: here is my edit code: def edit @politician.promises += 1 end
[04:39:58] sevenseacat: rubyonrails163: which politician are you editing?
[04:41:30] rubyonrails163: how do i set which politician i should edit
[04:41:53] sevenseacat: thats what the ID attribute is for :) it will make a URL like /politicians/2/edit
[04:41:55] rubyonrails163: currently the button is just <%= button_to "Add Promise", edit_politician_path %>
[04:42:05] rubyonrails163: so what do i change?
[04:42:10] sevenseacat: right, so it would be edit_politician_path(politician_to_edit)
[04:42:20] sevenseacat: if you used a scaffold, this is all already there
[04:43:49] rubyonrails163: ok that sort of works but now when i click "add promise" the error is "No route matches [POST] "/politician/1/edit"
[04:44:29] ukazap: update your routes.rb
[04:44:40] sevenseacat: because editing isnt a POST route and shouldnt use a button_to
[04:44:46] petor: has joined #RubyOnRails
[04:44:56] sevenseacat: editing is a GET route, which typically renders a form for editing the politician
[04:44:57] rubyonrails163: so what should it be?
[04:45:03] sevenseacat: rubyonrails163: !gettingstarted
[04:45:03] helpa: rubyonrails163: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy and Ryan Bigg
[04:45:10] sevenseacat: get the basics into ya :)
[04:45:32] rubyonrails163: i already did that twice lol
[04:45:38] sevenseacat: us telling you everything to do isnt you learning how to program
[04:45:57] sevenseacat: well tbh it sounds like you need to do it again for real this time
[04:45:58] merida: has joined #RubyOnRails
[04:46:06] sevenseacat: understanding it, not just copying and pasting commands
[04:46:10] ukazap: we can't spoonfeed you, we're not your mother
[04:46:29] norc: has joined #RubyOnRails
[04:47:15] sevenseacat: ukazap: a little harsh, but still truthful
[04:47:23] bronson: has joined #RubyOnRails
[04:47:51] ukazap: i'm sorry for my words, but still.
[04:49:37] Radar: rubyonrails163: Here's all the parts you need: https://gist.github.com/radar/f2be53dd29772c4df350
[04:49:52] rubyonrailed: has joined #RubyOnRails
[04:49:57] ruind: has joined #RubyOnRails
[04:50:00] Radar: I've intentionally left the context of those things out.
[04:50:00] rubyonrails163: thank you thats what im looking for
[04:50:06] Radar: But it'll give you a gist
[04:50:15] rubyonrails163: im coming from java so this stuff is really unfamiliar to me
[04:50:17] Radar: Get it? Gist? :D
[04:50:46] Radar: rubyonrails163: !r4ia is a book for Rails that both sevenseacat and I wrote. It provides a gentle introduction to Rails and is suitable for anyone who knows Ruby.
[04:50:46] helpa: rubyonrails163: Rails 4 in Action - http://manning.com/bigg2 - An excellent book combining Rails and TDD/BDD development. Written by Rebecca Skinner, Steve Klabnik, Ryan Bigg, Yehuda Katz
[04:51:10] rubyonrails163: cheers i'll look into it :) thanks for the help!
[04:52:26] Arcaire: I you're intending to use this in product you might want to look into a language or framework that's faster in order to keep up with the speed at which promises are made.
[04:52:36] Arcaire: Flat Assembly is probably one good example, but that might not be fast enough.
[04:53:16] mwcmitchell: has joined #RubyOnRails
[04:53:42] Arcaire: My recommendation from mock HFT would probably be to build a solid base of previous promises, their topic, and their frequency, and use that to predict the next few hundred million promises in advance over a distributed network of systems.
[04:54:10] Arcaire: Given that the politicians will forget the promises anyway, you could store this in MongoDB.
[04:54:18] Arcaire: Since, you know, MongoDB works just like most politicians.
[05:02:42] uglybandersnatch: has joined #RubyOnRails
[05:04:14] chagel: has joined #RubyOnRails
[05:05:26] akshat: has joined #RubyOnRails
[05:07:17] hahuang61: has joined #RubyOnRails
[05:07:22] moeabdol: has joined #RubyOnRails
[05:07:34] bronson: has joined #RubyOnRails
[05:07:55] mytrile: has joined #RubyOnRails
[05:10:09] _bogus_: https://gist.github.com/andreycwb/4969f70358b9a6e8cc9a please, when I create those radiobuttons, the second one comes checked by default. is there any way to change this? and better, is there a way to have both come unchecked by default?
[05:11:50] pixelhandler: has joined #RubyOnRails
[05:12:02] pawnbox: has joined #RubyOnRails
[05:12:58] rickmasta: has joined #RubyOnRails
[05:13:14] rakm: has joined #RubyOnRails
[05:18:31] Chagel_: has joined #RubyOnRails
[05:21:06] Maletor: has joined #RubyOnRails
[05:22:45] blackmesa: has joined #RubyOnRails
[05:24:08] chagel: has joined #RubyOnRails
[05:25:19] timdotrb: has joined #RubyOnRails
[05:26:05] rubyonrails163: has joined #RubyOnRails
[05:27:58] Devalo: has joined #RubyOnRails
[05:28:10] rubyonrails163: i dont understand what links the promised_politician_path method name to the 'promised' method
[05:28:33] FLeiXiuS: has joined #RubyOnRails
[05:28:53] sp1rs: has joined #RubyOnRails
[05:29:43] IFrank00: has joined #RubyOnRails
[05:30:33] rubyonrails163: like in here https://gist.github.com/radar/f2be53dd29772c4df350 why would calling promised_politician_path(@politician) invoke promised
[05:34:58] akshat: has joined #RubyOnRails
[05:35:58] rewmi: has joined #RubyOnRails
[05:36:11] Radar: rubyonrails163: !routing
[05:36:11] helpa: rubyonrails163: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[05:36:26] Radar: rubyonrails163: It's a route helper to to the promised action in the PoliticansController
[05:36:49] Radar: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions
[05:36:54] Radar: That section explains it pretty well imo
[05:44:56] chagel: has joined #RubyOnRails
[05:45:08] tomatoes: has joined #RubyOnRails
[05:46:48] merida: has joined #RubyOnRails
[05:50:36] arup_r: has joined #RubyOnRails
[05:51:38] jtong: has joined #RubyOnRails
[05:54:30] chagel: has joined #RubyOnRails
[05:55:29] stannard: has joined #RubyOnRails
[05:55:58] IFrank00: has joined #RubyOnRails
[05:59:59] chagel: has joined #RubyOnRails
[06:02:40] njero: has joined #RubyOnRails
[06:02:52] hyperdrive: has joined #RubyOnRails
[06:04:11] jnylen: has joined #RubyOnRails
[06:08:58] PlasmaStar: has joined #RubyOnRails
[06:08:58] U7se6: has joined #RubyOnRails
[06:09:36] baweaver: has joined #RubyOnRails
[06:10:38] bePolite: has joined #RubyOnRails
[06:11:20] rvanlieshout: has joined #RubyOnRails
[06:12:18] Tref: has joined #RubyOnRails
[06:16:22] uglybandersnatch: has joined #RubyOnRails
[06:23:00] ur5us: has joined #RubyOnRails
[06:24:12] htmldrum: has joined #RubyOnRails
[06:24:14] hyperdrive: has joined #RubyOnRails
[06:28:20] n00bDev: has joined #RubyOnRails
[06:28:26] cxadams: has joined #RubyOnRails
[06:28:28] aganov: has joined #RubyOnRails
[06:29:22] pawnbox: has joined #RubyOnRails
[06:31:06] jenrzzz: has joined #RubyOnRails
[06:31:26] n00bDev: is this a valid query?
[06:31:27] n00bDev: https://gist.github.com/anonymous/14b49ef994133ec45a46
[06:32:21] greengriminal: has joined #RubyOnRails
[06:36:36] arup_r: n00bdev: in SQL, Assignment.joins(:user).where("users.login_count > ?", 10 }.pluck("DISTINCT title")
[06:36:58] Mafuihij: has joined #RubyOnRails
[06:37:06] arup_r: n00bdev: or, Assignment.joins(:user).where("users.login_count > ?", 10 }.select("DISTINCT title")
[06:39:14] n00bDev: but that query
[06:39:20] n00bDev: would it run?
[06:39:27] kp666: has joined #RubyOnRails
[06:39:27] n00bDev: my intuition says no
[06:39:36] n00bDev: or would it work
[06:39:41] raunicolae: has joined #RubyOnRails
[06:40:50] draig: has joined #RubyOnRails
[06:41:06] arup_r: have you tried?
[06:42:59] blackmesa: has joined #RubyOnRails
[06:44:49] syndikate: has joined #RubyOnRails
[06:45:32] n00bDev: no i dont have the schema and model setup
[06:45:38] n00bDev: i just stumbled upon this
[06:46:01] petor: has joined #RubyOnRails
[06:46:12] n00bDev: the documents show that .select needs to pass a :column and this doesnt
[06:46:13] ereslibre: has joined #RubyOnRails
[06:46:13] n00bDev: so its no?
[06:47:13] arup_r: n00bdev: what is this -> select("DISTINCT title") then?
[06:47:46] ModusPwnens: has joined #RubyOnRails
[06:48:30] arup_r: n00bdev: You can't guess and learn any topic .. You need try by yourself.. So if you are that curious to know how things work, fire your code editor, and set up relevant models, and add some data.. and play with AR as much as you want..
[06:48:41] arup_r: but asking like that, wouldn't help at all
[06:48:58] ModusPwnens: Does anyone know how to click a download link with capybara and poltergeist? Even when the download request seems to hit the server and succeed, when I check the headers they appear to be for the original html request.
[06:49:26] kp666: has joined #RubyOnRails
[06:49:40] arup_r: because, you read the document, and understood it. Now while applied the same method code, you are not getting what is going on. That is the hints to you try by yourself..
[06:49:51] raunicolae: has left #RubyOnRails: ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is")
[06:50:47] rogue_koder_: has joined #RubyOnRails
[06:54:34] emilkarl: has joined #RubyOnRails
[06:54:38] netzfisch: has joined #RubyOnRails
[06:54:42] bronson: has joined #RubyOnRails
[06:55:07] greengriminal: Hey all, can I get some eyes on: https://gist.github.com/davidpatters0n/9b39b0120695e60e1c46
[06:55:19] tvw: has joined #RubyOnRails
[06:55:49] moeabdol: has joined #RubyOnRails
[06:56:13] greengriminal: Everything in the gist works great however the issue is when I try to download the PDF, it returns `Failed to load PDF content`.
[06:56:45] chipotle: has joined #RubyOnRails
[06:59:08] pawnbox: has joined #RubyOnRails
[06:59:21] greengriminal: Think this: http://s23.postimg.org/u51q22nmi/Screen_Shot_2016_03_16_at_03_00_07.jpg may potentially be why I am getting that error.
[07:01:21] emilkarl: when is a error message translated in activerecord? If i add a custom foo.errors.add(:card, 'card_declined') will I be able to translate this?
[07:01:52] adre: has joined #RubyOnRails
[07:02:58] someish: has joined #RubyOnRails
[07:03:02] Zadrel: has joined #RubyOnRails
[07:03:25] chagel: has joined #RubyOnRails
[07:04:33] solars_: has joined #RubyOnRails
[07:08:23] chagel: has joined #RubyOnRails
[07:08:38] lxsameer: has joined #RubyOnRails
[07:08:50] adre: has joined #RubyOnRails
[07:09:17] djbkd: has joined #RubyOnRails
[07:09:27] Palsson: has joined #RubyOnRails
[07:09:53] pyemkey: has joined #RubyOnRails
[07:15:13] arup_r: emilkarl: right, but you will to need pass a key there, instead of a message string. If you look the doc: http://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-add ... it says, **If message is a symbol, it will be translated using the appropriate scope (see generate_message)**
[07:15:18] bricker: has joined #RubyOnRails
[07:15:57] arup_r: and now to understand, how it translates while you pass the second argument as `Symbol`, read this documentation: http://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-generate_message
[07:16:31] arup_r: after reading this 2 links, you will be confident enough to answer your question by yourself.
[07:17:30] _bogus_: hey there.. i need to submit my form via ajax... its a long form and it has image uploaded included. i didnt tried yet but i saw some solutions using serialize(), but Im fearing it'll not be possible to upload the image using this method
[07:17:40] _bogus_: any ideas on how to do this ?
[07:18:24] ayonkhan: has joined #RubyOnRails
[07:18:40] emilkarl: I think you need some gem or so to be able to post files with ajax? I've been using dropzone.js and implemented it with rails.
[07:19:08] emilkarl: https://github.com/enyo/dropzone
[07:20:23] _bogus_: hmmm... but didnt it uploads only the image? I need to submit the whole form...
[07:20:43] dionysus69: has joined #RubyOnRails
[07:23:41] emilkarl: i've made it so the they are separated (files upload on drop/select), and then when you post the form tey are connected as the have their own model ids
[07:24:14] codelahoma_: has joined #RubyOnRails
[07:24:15] emilkarl: so files is uploaded directly and not in the post, makes it a pretty good experience for the user imo as well.
[07:25:23] pawnbox: has joined #RubyOnRails
[07:25:28] nerium: has joined #RubyOnRails
[07:26:25] codelahoma: has joined #RubyOnRails
[07:27:04] emachnic: has joined #RubyOnRails
[07:29:50] wethu: has joined #RubyOnRails
[07:29:59] petor: has joined #RubyOnRails
[07:33:24] _bogus_: isnt there another way? my form is already done and working, its a long form
[07:36:38] yardenbar: has joined #RubyOnRails
[07:37:52] jenrzzz: has joined #RubyOnRails
[07:38:08] Pazician: has joined #RubyOnRails
[07:38:41] EdwardIII: has joined #RubyOnRails
[07:39:09] davee_: has joined #RubyOnRails
[07:39:54] emilkarl: _bogus_ I think you need some kind of JS solution for it and connect with rails. This might be it using jQuery Upload. https://github.com/JangoSteve/remotipart
[07:40:10] emilkarl: never tried it
[07:44:47] blackmesa: has joined #RubyOnRails
[07:45:35] systemsgotyou: has joined #RubyOnRails
[07:47:20] RegulationD: has joined #RubyOnRails
[07:47:20] syndikate: has joined #RubyOnRails
[07:51:34] sp1rs: has joined #RubyOnRails
[07:53:35] chagel: has joined #RubyOnRails
[07:53:43] darutoko: has joined #RubyOnRails
[07:53:47] sp1rs: has joined #RubyOnRails
[07:54:58] jas02: has joined #RubyOnRails
[07:55:22] emilkarl: has joined #RubyOnRails
[07:59:38] yardenbar: has joined #RubyOnRails
[08:01:17] chagel: has joined #RubyOnRails
[08:03:28] roshanavand: has joined #RubyOnRails
[08:03:47] Pazician: has joined #RubyOnRails
[08:03:59] GriffinHeart: has joined #RubyOnRails
[08:04:21] someish: has joined #RubyOnRails
[08:05:59] sevenseacat: has joined #RubyOnRails
[08:07:00] roshanavand: has joined #RubyOnRails
[08:08:53] ensyde: has joined #RubyOnRails
[08:09:03] Uo9er_: has joined #RubyOnRails
[08:10:36] adre: has joined #RubyOnRails
[08:11:10] duncannz: has joined #RubyOnRails
[08:11:34] emilkarl: has joined #RubyOnRails
[08:14:25] roshanavand: has joined #RubyOnRails
[08:14:32] Pazician: has joined #RubyOnRails
[08:15:30] Pazician: has joined #RubyOnRails
[08:18:38] Bakekok: has joined #RubyOnRails
[08:19:27] rubyonrails163: has joined #RubyOnRails
[08:19:54] norc: has joined #RubyOnRails
[08:20:02] j0llyr0tten: has left #RubyOnRails: ()
[08:20:14] yxejamir: has joined #RubyOnRails
[08:20:28] arup_r: has joined #RubyOnRails
[08:21:05] rubyonrails163: has joined #RubyOnRails
[08:21:06] norc: I have a library that scrapes data off various network nodes. There is some metrics that is stored in columns (such as speeds, operational status), and other I want to store inside a YAML serialized object because the attributes differ from node to node, and in the future I might scrape more than I do now.
[08:21:21] rubyonrails163: hey guys, how can i edit a the name of a field in a scaffold after i have generated it
[08:21:21] norc: My question: What would you name such a column for that YAML object?
[08:21:45] norc: rubyonrails163: you need to make the change in your schema (migration), your views and controller (param whitelisting)
[08:22:00] norc: Possibly the model too if its referenced there.
[08:22:07] rubyonrails163: norc: no easy way to do it in cmd?
[08:22:11] arup_r: rubyonrails163: ^^ using another migration
[08:22:28] norc: rubyonrails163: Nope. Ideally do not use the scaffold generators as they do not show how to use rails effectively.
[08:22:31] Ropeney: has joined #RubyOnRails
[08:22:39] arup_r: you will rename the field.. and the manually change every where
[08:23:00] rubyonrails163: okay... im very new to rails and i saw somebody using scaffold in making a reddit clone for tutorial purposes so i just started using it
[08:23:03] norc: rubyonrails163: All they do is generate some stuff for quick showcasing, but for actual development you should write them yourself. ;-)
[08:23:29] emilkarl: has joined #RubyOnRails
[08:23:35] norc: It is not much code anyway, and by writing it yourself you actually learn how they work together.
[08:24:01] norc: rubyonrails163: though this might actually be a great spot to learn by making that change!
[08:24:17] rubyonrails163: cool, i'll do it since scaffold is confusing me a bit anyway
[08:24:34] rubyonrails163: what can i do after i've gone through getting started?
[08:24:47] norc: rubyonrails163: what do you want to do?
[08:25:17] rubyonrails163: well making a reddit clone with commentception would be a good learning experience i feel
[08:26:11] norc: rubyonrails163: Chapter 10 of Getting Started gives you further steps that you can follow
[08:26:44] sevenseacat: rubyonrails163: well you've been given rails tutorial after rails tutorial
[08:26:49] roshanavand: has joined #RubyOnRails
[08:26:56] sevenseacat: what more are you after?
[08:27:22] sevenseacat: you keep saying you've gone through getting started multiple times but you don't show any understanding of any of the concepts in it
[08:27:32] portmare: has joined #RubyOnRails
[08:28:14] norc: Back to my original question. Would "other_data" be an adequate name?
[08:28:42] norc: The relation itself is named "msan_port_datum" currently if it helps. :S
[08:29:03] TvL2386: has joined #RubyOnRails
[08:32:19] rubyonrails163: Plus im coming from java where I don't have a command prompt helper that pluralizes methods and holds my hand through 90% of the code so its taking some time for me to get used to
[08:32:56] sevenseacat: but just asking for more resources when you've previously asked and been given some, is pretty pointless
[08:33:06] KanKava: has joined #RubyOnRails
[08:34:30] Zadrel: has joined #RubyOnRails
[08:34:33] rubyonrails163: well what can i do? I feel like there is a huge bridge here that the getting started hasnt addressed. i finished the codeacademy ruby course but i dont really understand some of the code and syntac that getting started goes through
[08:35:44] rubyonrails163: like the erb is totally intuitive because its basically just front-end stuff but i dont really understand where a lot of stuff comes from, like for example
[08:36:57] rubyonrails163: Article.find(params[:id]), where is :id defined? where is the params array coming from?
[08:37:12] roshanavand: has joined #RubyOnRails
[08:40:30] riotjones: has joined #RubyOnRails
[08:40:44] rubyonrails163: is there anywhere where stuff like that is explained?
[08:40:53] soahccc: Does anyone return a non-200 response on failed logins? I realized that none of the big companies does that but I would like to integrate fail2ban with it and wonder if there are any side effects
[08:44:43] rvanlieshout: rubyonrails163: the param hash (not array) contains all params for the request
[08:44:49] rvanlieshout: you really intrested in where it's actually defined?
[08:45:05] agit0: has joined #RubyOnRails
[08:45:23] rvanlieshout: soahccc: it all depends on how the result of that request is handled. a 200 response for a faild login would make sense if you want to display a form for the user to try again
[08:45:29] AnoHito: has joined #RubyOnRails
[08:45:51] rubyonrails163: so wheres it coming from
[08:46:33] blackmesa: has joined #RubyOnRails
[08:46:37] roshanavand: has joined #RubyOnRails
[08:47:10] triptec: has joined #RubyOnRails
[08:47:13] adre: has joined #RubyOnRails
[08:47:36] soahccc: rvanlieshout: hmm then I guess I should stick with what we have. Returning 200 (since they can try again) and after exceeding hard limits returning 503 (which isn't the correct code but rack attack advises to)
[08:48:27] soahccc: These botnets are so annoying
[08:48:45] queequeg1: has joined #RubyOnRails
[08:48:51] rvanlieshout: rubyonrails163: https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/strong_parameters.rb#L850
[08:49:41] yottanami: has joined #RubyOnRails
[08:49:44] DoubleMalt: has joined #RubyOnRails
[08:50:04] yottanami: What is the best way to check the Rails Environment in Gemfile?
[08:50:30] rvanlieshout: yottanami: there is none
[08:50:38] rvanlieshout: you don't use an environment in a Gemfile
[08:50:45] rvanlieshout: you use groups
[08:51:00] rvanlieshout: http://bundler.io/v1.11/groups.html
[08:51:32] rubyonrails163: rvanlieshout: okay so that explains params array
[08:51:36] rubyonrails163: what about the :id symbol
[08:51:41] rubyonrails163: where is the controller getting :id from?
[08:51:55] rvanlieshout: rubyonrails163: it's a hash, not an array
[08:52:07] rvanlieshout: the controller doesn't get it from anywhere; you typed it
[08:52:17] rvanlieshout: similar to when you use :foo
[08:52:20] rvanlieshout: it's just a symbol
[08:52:21] errakeshpd: has joined #RubyOnRails
[08:52:32] rvanlieshout: or params['id']
[08:52:35] yottanami: rvanlieshout, But the issue is I want to check if it is development load a Gem from local dist and if it is production load it from Github
[08:52:50] rvanlieshout: yottanami: that's not possible
[08:52:53] yottanami: So I can not add two same Gem in two different group
[08:52:53] rvanlieshout: it's even a bad approach
[08:52:53] rubyonrails163: ohhhh gotchya thanks!
[08:53:13] rvanlieshout: why have a different version? then code in dev could work while it'll fail in production
[08:54:32] baweaver: has joined #RubyOnRails
[08:54:48] rubyonrails163: so params[:id] returns an id number for the thing and Articles.find finds that row in the Articles table?
[08:55:09] sevenseacat: params[:id] returns that value out of the params you pass in
[08:55:43] tjbiddle: has joined #RubyOnRails
[08:55:50] rvanlieshout: it'll just return the value for a param with name id :)
[08:56:01] rvanlieshout: Article.find 123 will just find article 123 for you
[08:56:11] rvanlieshout: it's out of scope there to know where and how
[08:56:17] rvanlieshout: that's why there is a model layer in between
[08:56:28] merida: has joined #RubyOnRails
[08:57:05] htmldrum: has joined #RubyOnRails
[08:59:25] Pazician: has joined #RubyOnRails
[08:59:38] n008f4g_: has joined #RubyOnRails
[09:00:14] bricker: has joined #RubyOnRails
[09:00:44] rubyonrails163: cool cheers. that all makes sense. lastly, in the erb when you call methods edit_article_path(article), where is that name for that method defined? because the controller doesn't have a 'edit_article_path' method, only a 'edit' method
[09:01:38] emachnic: has joined #RubyOnRails
[09:02:37] snowy: has joined #RubyOnRails
[09:03:01] rvanlieshout: rubyonrails163: <%= raise method(:edit_article_path).source_location.inspect %>
[09:03:06] srinidhi: has joined #RubyOnRails
[09:03:25] rvanlieshout: it's also not related to a controller
[09:03:28] rvanlieshout: it's a defined route
[09:03:43] rvanlieshout: when somebody visits is, the routing table is used to match it and find a controller action to trigger
[09:04:37] soahccc: rubyonrails163: in that regard you might want to take a brief look at this: https://blog.bmonkeys.net/2014/how-i-debug#which-method-do-i-really-call?
[09:04:48] ayoros: has joined #RubyOnRails
[09:05:20] arup_r: has joined #RubyOnRails
[09:05:37] rubyonrails163: thanks. is it normal for noobs like me to not really understand this sort of stuff initially? its taking me some time to get used to
[09:05:48] rvanlieshout: that's normal
[09:06:23] moeabdol: has joined #RubyOnRails
[09:06:51] someish: has joined #RubyOnRails
[09:06:52] quazimodo: has joined #RubyOnRails
[09:08:52] adre: has joined #RubyOnRails
[09:09:44] gbgdev: has joined #RubyOnRails
[09:10:00] adre: has joined #RubyOnRails
[09:11:02] mark3: has joined #RubyOnRails
[09:12:42] emilkarl: has joined #RubyOnRails
[09:14:23] decaff: has joined #RubyOnRails
[09:14:35] bePolite: has joined #RubyOnRails
[09:14:37] adre: has joined #RubyOnRails
[09:14:47] mrbubbles: has joined #RubyOnRails
[09:14:48] mfoo: has joined #RubyOnRails
[09:15:04] SteenJobs: hey guys, i know this breaks some rules but i’m desperate at this point and you guys are the best…any JS experts? i need help with a contenteditable div when building a rich text editor, so i can finallygo to sleep
[09:15:16] SteenJobs: it’s for altruistic purposes, i’m helping someone with an open source bug
[09:16:19] defsdoor: has joined #RubyOnRails
[09:20:34] srinidhi: has joined #RubyOnRails
[09:22:00] dionysus69: does rails form submission have a protection against someone sending a post request as if it is a form submission?
[09:22:29] htmldrum: has joined #RubyOnRails
[09:22:38] bronson: has joined #RubyOnRails
[09:22:41] adre: has joined #RubyOnRails
[09:23:18] arup_r: dionysus69: i don't get you..
[09:23:39] Pazician: has joined #RubyOnRails
[09:23:45] arup_r: explain it more please
[09:24:10] dionysus69: arup_r: well, form submits parameters right, what if I recreate them in a postman kind of thing and send it to a server, does it have a way to identify it as a fake submission?
[09:24:43] arup_r: dionysus69: you will get error generally CSRF protection error
[09:24:56] tbuehlmann: dionysus69: see http://guides.rubyonrails.org/security.html#csrf-countermeasures and http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html#method-i-protect_from_forgery
[09:25:07] arup_r: dionysus69: ^^ yes..
[09:25:26] dionysus69: oh now I see, I didnt know that was the one called csrf
[09:25:50] arup_r: dionysus69: I didn't long time its full form.. haha
[09:25:59] drptbl: has joined #RubyOnRails
[09:26:06] dionysus69: I am going to create an app for my university as a bachelors project and I dont want to be laughed at because of security issues
[09:26:29] srinidhi: has joined #RubyOnRails
[09:26:38] tbuehlmann: that's the spirit
[09:27:05] soahccc: tbuehlmann: the CSRF protection doesn't protect you against bot submissions though
[09:27:06] scepticulous: has joined #RubyOnRails
[09:27:06] arBmind: has joined #RubyOnRails
[09:27:11] triangles: has joined #RubyOnRails
[09:27:12] dionysus69: ye I will be on slack during summer =)
[09:27:26] dionysus69: oh ye bot submissions wont be a problem
[09:27:41] baweaver: has joined #RubyOnRails
[09:27:42] sp1rs: has joined #RubyOnRails
[09:28:02] dionysus69: authentication will be required and submissions will work only during specified time since we are talking about submitting quiz results and cheating would be a major problem in this kind of application
[09:28:38] tbuehlmann: soahccc: thank you
[09:29:34] soahccc: Maybe I didn't quite understood the postman part but you can submit forms as you wish with every tool as long as you carry the session and get the token first
[09:29:43] marr: has joined #RubyOnRails
[09:30:19] soahccc: We have a very hot frontpage cache due to that because of the login bots :(
[09:31:10] dionysus69: is there no way to blacklist IP addresses if bot pattern is detected?
[09:31:19] rvanlieshout: they'll just use an other ip
[09:31:41] soahccc: yep we stopped iptabling the IPs because it couldn't cope with the mass of IPs
[09:31:56] dionysus69: even if they are blacklisted after 10 wrong trials?
[09:32:11] blackmesa: has joined #RubyOnRails
[09:32:44] dionysus69: ye I dont know how advanced bots can get but I would imagine it would be hard for the attacker to have thousands of IPs
[09:32:50] soahccc: dionysus69: you still have (enormous) amount of IPs x 10 trials
[09:32:59] dionysus69: and plus bot changing it automatically sounds even more advanced
[09:33:01] gingray: has joined #RubyOnRails
[09:33:14] soahccc: dionysus69: they have botnets :)
[09:34:19] soahccc: I forgot the name but there is a brute force tool for which you can write site specific configs and provide a list of proxies. We found that because someone made a config for our site
[09:34:21] dionysus69: ye not very familiar how those work but those are couple thousand big at most arent they so couple thousand * 10x will be depleted over time and you just have to cope with it for some time until botnet ip addresses are all blacklisted
[09:35:55] snowy: has joined #RubyOnRails
[09:36:19] dionysus69: soahccc: btw doesnt captcha help with those anyway ?
[09:37:06] soahccc: dionysus69: we currently block IPs in rails for 1 week after 15 attempts but they somehow have constantly new addresses :/ 2 wrong attempts per day and IP and you need captcha but they still try. They won't even stop if the request obviously isn't being processed
[09:37:38] soahccc: They also don't care about throttles, just hammering
[09:38:01] dionysus69: hmm are you using cloudlfare? I am sure it would help!
[09:38:36] soahccc: Not yet but we are thinking about it. But we don't want these pre-pages "checking your browser" stuff
[09:39:00] dionysus69: cloudflare is great it has its own mechanism of fighting botnets and i am sure cloudflare already has a list of all existing botnets in the world
[09:39:29] dionysus69: i am using cloudlfare on my site and checking your browser doesnt happen with me I dont know in which cases that thing pops out
[09:40:05] soahccc: dionysus69: It should here: http://forum.teamspeak.com/
[09:40:20] soahccc: dionysus69: not sure if the ddos protection is tied to the scrubbing network though
[09:40:59] dionysus69: I guess ddos protection is only activated after site has a heavy traffic
[09:43:59] soahccc: According to some pages we have similar or more traffic than teamspeak :)
[09:44:10] dionysus69: soahccc: that 5 second popup only shows up if you set cloudflare to "I'm Under Attack Mode"
[09:44:32] dionysus69: which you wouldn't want to, bots trying to get in is still different from ddos attack so you wont need that mode
[09:46:05] ziyadb: has joined #RubyOnRails
[09:46:34] dionysus69: there was an article I read that cloudflare saved site from a biggest ddos ever which was like 80k bots big.
[09:46:49] soahccc: At least we now know that our page can handle way more traffic than it would normally have :) Free benchmarking
[09:47:31] dionysus69: haha ye, what is your site btw
[09:47:57] pec: has joined #RubyOnRails
[09:47:57] soahccc: Fortunately the only DDoS we had was self caused (some idiot added a wanted product for free and it spread over reddit in minutes)
[09:48:58] adlerdias: has joined #RubyOnRails
[09:49:37] stannard: has joined #RubyOnRails
[09:50:07] Cohedrin: has joined #RubyOnRails
[09:51:18] Rahul_Roy: has joined #RubyOnRails
[09:52:00] Megamos: has joined #RubyOnRails
[09:55:31] hello9: has joined #RubyOnRails
[09:56:32] hello9: greetings all, Is there a way to use nested routes with functionality like 'collection', i.e send requests to a namespaced controller but not have to provide an id?
[09:58:03] hello9: rvanlieshout, about how do i do that? ive tried namespace, collection, resource, resources within and without collection (i think)
[09:58:26] rvanlieshout: show us what you tried and where you bump into errors
[09:58:36] hello9: ok making gist 1 sec
[09:59:28] drptbl_: has joined #RubyOnRails
[10:01:39] hello9: rvanlieshout, https://gist.github.com/anonymous/f180dfcad6e70a0da507
[10:03:25] soahccc: hello9: http://guides.rubyonrails.org/routing.html#adding-more-restful-actions (.2)
[10:04:03] arrowcircle: has joined #RubyOnRails
[10:04:13] hello9: soahccc, yes, but im trying to route it to a namespaced controller
[10:04:34] hello9: that is what im looking for, but under a sub-classed controller
[10:04:55] soahccc: hello9: you can do that still, namespaces or scopes won't hinder you
[10:07:17] hello9: soahccc, tried it but it asked for an id param https://gist.github.com/anonymous/1d3d10aeddd21846309f
[10:07:39] someish: has joined #RubyOnRails
[10:08:14] soahccc: hello9: well member is the opposite of collection you know, there is also no need to remove the nested resource for that to work
[10:08:51] U7se6: has joined #RubyOnRails
[10:09:15] hamed_r: has joined #RubyOnRails
[10:10:03] soahccc: hello9: example from our routes: https://gist.github.com/2called-chaos/de0ffc8cca84817a8da1
[10:11:27] soahccc: hello9: I guess what doesn't work (cause it makes no real sense) is to put a resource on the collection of the outer/parent resource
[10:12:08] soahccc: So revoking all sessions from no user in my example
[10:12:22] arup_r: has joined #RubyOnRails
[10:12:47] ql6wlld: has joined #RubyOnRails
[10:15:18] noway_: has joined #RubyOnRails
[10:15:43] hello9: soahccc, im not sure what your last dm means, when I it on its own resources, it asks for the parent_id
[10:15:44] hello9: in the route
[10:18:18] stardiviner: has joined #RubyOnRails
[10:19:14] hello9: basically what im trying to do is use collection with a namespace
[10:19:32] hello9: "collection :downloads do" but obviously collection doesnt take a param
[10:19:56] drptbl: has joined #RubyOnRails
[10:19:57] soahccc: hello9: Can you clarify namespace? Do you mean the method namespace?
[10:20:23] hello9: not the method
[10:20:26] hello9: the concept
[10:20:35] hello9: like i want to use a controller that inherits
[10:20:55] rvanlieshout: and how is that related to a namespace?
[10:22:01] hello9: idk i thought that was just how it was referred to ;) sry
[10:22:35] hello9: maybe rails doesnt support this and i have to just use custom matchers
[10:22:43] rvanlieshout: what are you trying to do exactly?
[10:22:49] rvanlieshout: cause it supports both inheritance and namespacing
[10:23:59] gingray: has joined #RubyOnRails
[10:24:24] hello9: rvanlieshout, https://gist.github.com/anonymous/f180dfcad6e70a0da507
[10:24:32] Spami: has joined #RubyOnRails
[10:24:38] hello9: path on the bottom is what im trying to generate
[10:24:39] rvanlieshout: that doesn't explain what you're trying todo
[10:24:43] soahccc: also "download_post" sound pretty much like a member action (you want to download a specific post, no?=
[10:24:54] rvanlieshout: why not keep it REST?
[10:25:03] hello9: there are a couple other methods too
[10:25:07] hello9: and i want it on its own controller
[10:25:19] hello9: since its kind of involving the grandparent too
[10:25:27] rvanlieshout: added a comment
[10:25:39] rvanlieshout: then it's not a get, then it's a second resource
[10:25:51] rvanlieshout: also nesting here is not related to how your controllers are structured
[10:25:52] hello9: but then i think it will ask for post_id
[10:26:16] rvanlieshout: who will ask?
[10:26:18] rvanlieshout: run rake routes after that
[10:27:03] universa1: ohh probably he means: posts/:category/download_post
[10:28:12] FooMunki: has joined #RubyOnRails
[10:28:30] hello9: yeah it looks for /posts/:post_id/downloads
[10:28:41] rvanlieshout: so what exactly do you want?
[10:28:45] rvanlieshout: what route should go to what controller action?
[10:28:46] hello9: posts/downloads/
[10:29:03] hello9: that goes to the Posts::Downloads controller
[10:29:09] hello9: without giving over post_id
[10:29:09] quazimodo: has joined #RubyOnRails
[10:29:12] rvanlieshout: namespace :posts
[10:29:14] rvanlieshout: resources :downloads
[10:29:42] renanoronfle: has joined #RubyOnRails
[10:29:44] soahccc: can you have a resource and namespace with the same name at once?
[10:29:59] rvanlieshout: i guess you can, but not sure
[10:30:08] rvanlieshout: cause a namespace itself doesn't create a route
[10:30:35] hello9: namespace still asks for a post_id
[10:30:41] hello9: i think it might be because posts itself is nested
[10:30:47] rvanlieshout: hello9: !gist full routes.rb and output of rake routes
[10:30:47] helpa: hello9: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[10:31:40] hello9: it worked
[10:31:43] hello9: namespace + collection
[10:31:56] hello9: the rake must have been old or something i was using less
[10:32:00] hello9: thanks bros
[10:32:16] decaff: has joined #RubyOnRails
[10:34:21] Isthar: has joined #RubyOnRails
[10:35:01] gbgdev: has joined #RubyOnRails
[10:37:48] sp1rs: has joined #RubyOnRails
[10:41:07] FooMunki: has joined #RubyOnRails
[10:45:44] c355E3B: has joined #RubyOnRails
[10:46:07] FooMunki: has joined #RubyOnRails
[10:47:33] chagel: has joined #RubyOnRails
[10:49:03] sp1rs: has joined #RubyOnRails
[10:53:23] AzaToth: has joined #RubyOnRails
[10:53:37] jbermudes: has joined #RubyOnRails
[10:53:37] jbermudes: has joined #RubyOnRails
[10:58:01] ukazap: has joined #RubyOnRails
[10:58:03] baweaver: has joined #RubyOnRails
[10:58:06] Ergo: has joined #RubyOnRails
[11:02:15] decaff: has joined #RubyOnRails
[11:03:01] rodfersou: has joined #RubyOnRails
[11:03:20] bricker: has joined #RubyOnRails
[11:04:51] uglybandersnatch: has joined #RubyOnRails
[11:05:55] trinaldi: has joined #RubyOnRails
[11:08:40] someish: has joined #RubyOnRails
[11:09:20] shuriu: has joined #RubyOnRails
[11:10:50] udiudi: has joined #RubyOnRails
[11:14:35] snowy: has joined #RubyOnRails
[11:14:48] FooMunki: has joined #RubyOnRails
[11:15:43] mfaeh: has joined #RubyOnRails
[11:16:00] sp1rs: has joined #RubyOnRails
[11:17:51] blackhuey: has joined #RubyOnRails
[11:19:29] Felix444: has joined #RubyOnRails
[11:20:41] scope: has joined #RubyOnRails
[11:20:57] scope: hi can anyone help tell me if this script is wrong
[11:21:11] scope: <script type="applijewelleryion/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
[11:21:37] scope: im sure the start should be application/javascript
[11:21:50] workmad3_: scope: yeah... wtf is that mimetype? :P
[11:22:06] drptbl_: has joined #RubyOnRails
[11:22:16] scope: no idea its off of a theme
[11:22:34] scope: im trying to import a theme into rails and that was in the index.html file
[11:22:52] workmad3: scope: it looks like someone tried to do a find/replace of `cat` to `jewellery`
[11:22:56] scope: i know x-javascript is beta version and is defo wrong but the start no idea
[11:23:39] workmad3: scope: do you have a `<!DOCTYPE html>` at the top of the layout (for html5)?
[11:24:19] workmad3: scope: then kill the entire type... html5 specifies that js is the default type for <script>
[11:24:34] scope: so i can delete the entire script
[11:24:45] workmad3: scope: no... just the `type="..."` bit
[11:25:17] scope: <script="aplication/javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
[11:25:39] workmad3: scope: no.. `<script> addEventBlahblahblah </script>`
[11:25:56] arrowcircle: has joined #RubyOnRails
[11:26:06] scope: ah sorry my bad i always get confused with scripts
[11:26:18] workmad3: scope: basically, <script> is now assumed to be JS unless otherwise specified in html5 :)
[11:26:36] scope: ok and how do i know exactly what scripts i want
[11:26:46] scope: is there a tutorial that explains how to know
[11:26:52] workmad3: scope: depends on what you want to do
[11:27:00] scope: everything
[11:27:09] workmad3: very funny :P
[11:27:10] sp1rs: has joined #RubyOnRails
[11:27:16] scope: no really
[11:27:31] scope: it would be good to understand how scripts are chosen
[11:27:39] scope: where to put them and why
[11:27:41] scope: and how they work
[11:27:42] tbuehlmann: workmad3, I want everything in my garden. what do I have to do?
[11:28:00] scope: obviously too much to ask here but a good tutorial to read would be great
[11:28:48] clorisu: anyone here got xp with heroku deployment
[11:28:49] workmad3: scope: they're not 'chosen' (which implies there's a big bank of them and you just pick a bunch). Javascript is code... if you want to know what it's doing, you learn Javascript
[11:29:03] clorisu: hi, I just deployed my first rails app to heroku but I'm getting an error page: https://frozen-brook-27958.herokuapp.com/ ?
[11:29:19] clorisu: heroku channels dead
[11:29:35] workmad3: (and before anyone points out that there are big banks of JS snippets, that's true but not very helpful in this context, so I ignored it for simplicity ;) )
[11:29:57] workmad3: clorisu: do you have the heroku toolbelt installed?
[11:30:09] scope: i know where to look now :p so im happy with the answer
[11:30:22] workmad3: clorisu: then run `heroku logs --app frozen-brook-27958`
[11:30:28] scope: and clorisu are you able to push the app heroku has been really buggy recently
[11:31:04] workmad3: scope: no open issues atm ;) https://status.heroku.com/
[11:31:08] clorisu: workmad3: http://pastie.org/10762243
[11:31:43] clorisu: scope: looks like it pushed alright http://pastie.org/10762245
[11:31:52] hashtd: has joined #RubyOnRails
[11:32:22] workmad3: clorisu: ` /usr/bin/env: ruby2.2: No such file or directory` <-- that looks like your `bin/rails` script has the line `#!/usr/bin/env ruby2.2` at the top when it should be `#!/usr/bin/env ruby`
[11:32:50] workmad3: clorisu: with the end result that your heroku app is trying to launch using a binary called `ruby2.2` that doesn't exist in heroku's setup
[11:33:33] clorisu: ah, let me try to update that
[11:34:16] clorisu: eh, env is encrypted
[11:34:34] workmad3: clorisu: ??
[11:34:47] krz: has joined #RubyOnRails
[11:34:48] clorisu: getting random numbers when i try to edit it
[11:34:59] workmad3: clorisu: don't edit /usr/bin/env... edit bin/rails
[11:36:01] clorisu: this is at the top of /usr/bin/rails: #!/usr/bin/env ruby
[11:36:17] adaedra: env is not encrypted, it's an elf binary
[11:36:24] workmad3: clorisu: not /usr/bin/rails... bin/rails in yoru project
[11:36:25] jtong: has joined #RubyOnRails
[11:36:40] clorisu: ah, my mistake
[11:36:43] clorisu: kk updated
[11:36:53] clorisu: should i do anything else before i re deploy?
[11:37:19] workmad3: clorisu: I'd redeploy and look for the next error personally
[11:37:21] clorisu: push it to git first?
[11:38:11] clorisu: it fixed it workmad3 :)
[11:38:18] workmad3: clorisu: np
[11:38:36] ldnunes: has joined #RubyOnRails
[11:38:40] clorisu: workmad3: why would it have been defaulted with 2.2 in there?
[11:41:07] workmad3: clorisu: not sure... I've never encountered rails generating a binscript with that before. It could have been something to do with your local environment when setting up the project, but without a fair bit of digging into your machine it's not something I could know for sure
[11:41:19] Dbugger: has joined #RubyOnRails
[11:41:31] Dbugger: Hello everyone!
[11:41:44] ukazap: has joined #RubyOnRails
[11:43:06] emilkarl: has joined #RubyOnRails
[11:43:13] Dbugger: I was wondering if anyone could take at this code: http://hastebin.com/zisasukabo.xml It works, but it is extremely unefficient by big tables... Would there be a more efficient/fast way to make the query?
[11:45:20] workmad3: dbugger: you probably want to do `Product.joins(:sales).includes(:sales).each do |product|` and then pass `product.sales` to your table render (that `.joins` should do an INNER JOIN sales in your query, which will only retrieve products with sales)
[11:45:45] Dbugger: workmad3, let me try that...
[11:46:00] workmad3: dbugger: you should also consider pagination of products/sales so you don't dump stupidly large amounts of data on users in one fell swoop
[11:46:14] Dbugger: workmad3, definitely
[11:47:38] workmad3: dbugger: the general name for your issue is an `N+1 query` btw
[11:48:07] workmad3: dbugger: and use of joins and eager-loading via `include` is a standard way to remove them in activerecord
[11:48:10] flashpoint9: has joined #RubyOnRails
[11:48:34] awasum: has joined #RubyOnRails
[11:48:55] RegulationD: has joined #RubyOnRails
[11:49:39] stannard: has joined #RubyOnRails
[11:49:58] soahccc: ACTION performs a like on a unindexed text column for 127m records... What can possibly go wrong
[11:50:10] awasum: has left #RubyOnRails: ()
[11:50:18] workmad3: soahccc: let us know when it's done!
[11:50:26] awasum: has joined #RubyOnRails
[11:50:54] workmad3: ACTION sets "soahccc's query finishes" as an event in his calendar for early 2100"
[11:51:20] catphish_: has joined #RubyOnRails
[11:52:21] beauby: has joined #RubyOnRails
[11:53:17] catphish_: i've just deployed an app to a new environment, and simple form submissions are failing with "ActionController::InvalidAuthenticityToken" - i can see that authenticity_token is included in the post params, so what is likely to cause this?
[11:54:10] soahccc: workmad3: hmm mysql cancels the query but 1m takes about 15 secs :) not as bad as I thought
[11:54:27] Dbugger: workmad3, I found a cleaner way...
[11:54:44] moeabdol: has joined #RubyOnRails
[11:55:15] Dbugger: "@product = @incomings.group_by(&:sale)" and then "each_pair"
[11:55:16] soahccc: catphish_: the session is not being stored properly?
[11:55:31] soahccc: catphish_: or carried over, cookie settings?
[11:55:59] workmad3: dbugger: cool :) doesn't surprise me, but I could only work on a rough idea of what I could see of your domain model
[11:56:28] catphish_: soahccc: i've cleared my cookies, and a session cookie gets set correctly :(
[11:56:38] Pazician_: has joined #RubyOnRails
[11:57:37] catphish_: in fact the site is publicly accessible: https://portal.dial9.co.uk/ in case anyone has a moment to look
[11:58:55] scope: gggrrrr for the life of me i cant seam to link the javascipt files
[11:59:14] scope: i keep getting error GET http://localhost:3000/javascripts/jquery-1.11.1.min.js
[11:59:24] scope: is there something im missing
[11:59:38] Pazician: has joined #RubyOnRails
[12:01:59] blackmesa: has joined #RubyOnRails
[12:02:46] Pazician: has joined #RubyOnRails
[12:04:09] Dbugger: workmad3, I thank you for your help
[12:05:01] bricker: has joined #RubyOnRails
[12:05:52] decaff: has joined #RubyOnRails
[12:06:14] merida: has joined #RubyOnRails
[12:06:24] ukazap: has joined #RubyOnRails
[12:06:44] godzillaenlacasa: has joined #RubyOnRails
[12:08:54] tvw: has joined #RubyOnRails
[12:08:59] Uo9er_: has joined #RubyOnRails
[12:09:10] someish: has joined #RubyOnRails
[12:09:20] Spami_: has joined #RubyOnRails
[12:10:43] scope: i got all the css files to work but im still getting .js errors
[12:11:19] scope: files are in both vendors/assets and app/assets and all are required in application.css and application.js
[12:13:02] norc: scope: gist your exact error message please, the code that tries to load the asset, and all related asset files (the ones with the sprockets directives to require it)
[12:13:32] norc: "Im getting an error" is just not enough.
[12:14:46] norc: (For the last your application.js is probably enough)
[12:15:02] scope: this is my indexhtml
[12:15:03] scope: https://gist.github.com/scope2229/e657feee1c201acdf683
[12:15:38] scope: application.js
[12:15:39] scope: https://gist.github.com/scope2229/2124cfd1e2e3fb337c68
[12:16:10] scope: and application.css
[12:16:11] scope: https://gist.github.com/scope2229/4b156ff989da3041da64
[12:16:13] patrick_star_2: has joined #RubyOnRails
[12:16:49] norc: scope: put them into a single gist please.
[12:17:32] norc: scope: And please gist your view, not the generated HTML code.
[12:18:30] norc: scope: found it, you are specifying your sprockets directives wrong.
[12:18:33] scope: https://gist.github.com/scope2229/dc88ef8bf8d7c085669b
[12:18:58] scope: hhhhmmm how do i fix it and could you show me a tutorial understanding the sprockets
[12:19:33] norc: scope: https://github.com/rails/sprockets#the-directive-processor
[12:20:09] tknz: has joined #RubyOnRails
[12:20:16] scope: so each sprocket must start with //=
[12:20:28] scope: and *= for js
[12:20:30] stannard: has joined #RubyOnRails
[12:20:42] norc: scope: for example, yes.
[12:20:53] chouhoul_: has joined #RubyOnRails
[12:20:53] norc: It can be block style comments too.
[12:21:10] emilkarl: has joined #RubyOnRails
[12:23:04] scope: do i need to install gem sprockets too
[12:23:20] scope: if i do im guessing it goes inside the assets group
[12:24:03] norc: scope: sprockets is one of the packages inside the rails meta gem, so you should not need it.
[12:24:18] bronson: has joined #RubyOnRails
[12:24:26] norc: Unless you prefer to cherry pick your gems, then yes.
[12:24:34] scope: for now no
[12:24:38] scope: but later i will yes
[12:24:43] scope: once i have a better understanding
[12:24:55] scope: and i have to change the paths in the index.html also
[12:25:09] norc: scope: That is not how you do things.
[12:25:13] JohnBat26: has joined #RubyOnRails
[12:25:24] norc: scope: Use some template engine (slim, haml, erb, whatever floats your boat), then use asset helpers.
[12:25:32] norc: Seriously, read some tutorial or guide on this.
[12:25:45] norc: scope: the entire point of sprockets is that you do NOT specify these paths manually.
[12:26:40] norc: Or rather the entire asset pipeline.
[12:26:51] norc: scope: http://guides.rubyonrails.org/asset_pipeline.html
[12:27:24] jottr: has joined #RubyOnRails
[12:28:22] blackmesa: has joined #RubyOnRails
[12:29:09] liquid-silence: has joined #RubyOnRails
[12:29:09] liquid-silence: has joined #RubyOnRails
[12:29:14] nfk|laptop: has joined #RubyOnRails
[12:29:30] gingray: has joined #RubyOnRails
[12:30:47] arup_r: has joined #RubyOnRails
[12:30:48] AntiSpamMeta: has joined #RubyOnRails
[12:32:15] ukazap: has joined #RubyOnRails
[12:33:46] decaff: has joined #RubyOnRails
[12:34:55] srinidhi: has joined #RubyOnRails
[12:36:36] drptbl: has joined #RubyOnRails
[12:37:36] MrDoctor: has joined #RubyOnRails
[12:42:37] fluxsource: has joined #RubyOnRails
[12:42:44] bbrowning: has joined #RubyOnRails
[12:45:14] sp1rs: has joined #RubyOnRails
[12:47:11] meinside: has joined #RubyOnRails
[12:47:11] SeanLazer: has joined #RubyOnRails
[12:47:45] JohnBat26: has joined #RubyOnRails
[12:48:47] renegadeandy: has joined #RubyOnRails
[12:52:56] drptbl: has joined #RubyOnRails
[12:53:10] merida: has joined #RubyOnRails
[12:54:03] moeabdol: has joined #RubyOnRails
[12:54:31] lessless: has joined #RubyOnRails
[12:54:32] Haydos: has joined #RubyOnRails
[12:54:39] thomasfedb: has joined #RubyOnRails
[12:54:39] thomasfedb: has joined #RubyOnRails
[12:55:03] chagel: has joined #RubyOnRails
[12:55:15] Dreamer3: has joined #RubyOnRails
[12:56:15] sp1rs1: has joined #RubyOnRails
[12:56:30] tvw: has joined #RubyOnRails
[12:57:20] Dreamer3: has joined #RubyOnRails
[12:59:11] baweaver: has joined #RubyOnRails
[13:02:26] renanoronfle: has joined #RubyOnRails
[13:04:49] flashpoint9: has joined #RubyOnRails
[13:04:57] akshat: has joined #RubyOnRails
[13:05:03] mfaeh: has joined #RubyOnRails
[13:06:02] AimlesRaven: has joined #RubyOnRails
[13:07:07] gbgdev: has joined #RubyOnRails
[13:08:51] adre: has joined #RubyOnRails
[13:09:48] someish: has joined #RubyOnRails
[13:12:43] yottanami: Hey all my project works on development but on production I have this log error http://dpaste.com/200QSX2
[13:13:07] yottanami: What is going wrong in my code? can it be because of memory?
[13:14:47] liquid-silence: has joined #RubyOnRails
[13:14:47] liquid-silence: has joined #RubyOnRails
[13:15:50] nerium: has joined #RubyOnRails
[13:16:32] hello9: requiring and including another helper in application helper isnt granting access to other templates, is this normal?
[13:17:19] rvanlieshout: you don't need to require other helpers in your helper
[13:17:23] rvanlieshout: they are all available
[13:17:48] Sephyros: has joined #RubyOnRails
[13:18:03] hello9: i have a generic helper that is used all over the place, so i want to include that in application but it doesnt seem to work
[13:18:31] hello9: cant find the method
[13:18:59] rvanlieshout: gist what you've tried
[13:19:32] dionysus69: has joined #RubyOnRails
[13:20:59] arup_r: has joined #RubyOnRails
[13:24:57] mrgreenfur: has joined #RubyOnRails
[13:26:57] hello9: rvanlieshout, https://gist.github.com/anonymous/12d5fab9b34890f588cf
[13:28:34] rvanlieshout: where is process_helper located?
[13:28:42] j3ffbzh: has joined #RubyOnRails
[13:30:56] hello9: helpers/process_helper.rb
[13:31:19] anagha_: has joined #RubyOnRails
[13:32:43] GriffinHeart: has joined #RubyOnRails
[13:33:05] soahccc: yottanami: rails 5?
[13:33:28] yottanami: soahccc, yes
[13:33:34] arup_r: has joined #RubyOnRails
[13:33:57] soahccc: yottanami: not the exact but almost exact error and probable explanation: https://github.com/lynndylanhurley/devise_token_auth/issues/500
[13:34:18] rvanlieshout: hello9: what does 'include ProcessHelper' return?
[13:34:33] solars: has joined #RubyOnRails
[13:34:44] hello9: rvanlieshout, not sure what you mean, you mean running that in the console?
[13:35:21] soahccc: yottanami: so basically rails 5 raises now while rails 4 ignored it. now you just have to find out why and what
[13:35:26] jsrn: has joined #RubyOnRails
[13:35:31] rvanlieshout: actually in that helper file, raise it there
[13:35:40] rvanlieshout: or, even better, set the value of start_date in the controller
[13:35:44] solars: if I have includes(:statistics) how do I write this right? data.where(statistics: ['date < ?', enddate + 1]) it generates sql like IN ('date < ?', '2016-03-17')
[13:40:24] hello9: i added 'p include ProcessHelper' in ApplicationHelper, and it return 'ApplicationHelper'
[13:40:54] Pazician: has joined #RubyOnRails
[13:41:09] jtong: has joined #RubyOnRails
[13:41:19] arup_r: solars: data.where('statistics.date < ?', enddate + 1).references(:statistics)
[13:42:19] victortyau: has joined #RubyOnRails
[13:42:59] drptbl: has joined #RubyOnRails
[13:43:59] solars: arup_r, thanks! :)
[13:45:26] stannard: has joined #RubyOnRails
[13:45:34] ramkas: has joined #RubyOnRails
[13:47:11] gingray: has joined #RubyOnRails
[13:48:58] sg19: has joined #RubyOnRails
[13:49:30] sg19: Running into this problem while using Rails Leaderboard gem http://stackoverflow.com/questions/36037539/rails-leaderboard-gem-not-working
[13:49:57] RegulationD: has joined #RubyOnRails
[13:50:01] emilkarl: has joined #RubyOnRails
[13:52:12] griffindy: has joined #RubyOnRails
[13:52:26] yellow5: has joined #RubyOnRails
[13:52:45] IFrank00: has joined #RubyOnRails
[13:54:28] hello9: rvanlieshout, i have abandoned my hopes of such a maneuver, but thank you very much!
[13:54:49] ferr: has joined #RubyOnRails
[13:55:21] sp1rs: has joined #RubyOnRails
[13:55:41] yellow5: has joined #RubyOnRails
[13:58:53] thecyclone: has joined #RubyOnRails
[13:59:50] aegis3121: has joined #RubyOnRails
[14:00:20] jtong: has joined #RubyOnRails
[14:02:16] cabinB: has joined #RubyOnRails
[14:02:19] catphish_: so it turns out proxying through nginx is breaking my CSRF :(
[14:02:19] hashtd: has joined #RubyOnRails
[14:02:25] sp1rs: has joined #RubyOnRails
[14:03:08] banister: has joined #RubyOnRails
[14:03:32] banister: has joined #RubyOnRails
[14:06:53] banister: has joined #RubyOnRails
[14:06:53] zarubin: has joined #RubyOnRails
[14:06:54] qhp_: has joined #RubyOnRails
[14:06:55] bricker: has joined #RubyOnRails
[14:08:48] ruind: has joined #RubyOnRails
[14:09:33] axl_: has joined #RubyOnRails
[14:09:53] sp1rs: has joined #RubyOnRails
[14:10:18] scope: has joined #RubyOnRails
[14:10:44] zarubin: has joined #RubyOnRails
[14:11:01] agit0: has joined #RubyOnRails
[14:11:33] dgncn: has joined #RubyOnRails
[14:11:38] beauby: has joined #RubyOnRails
[14:12:38] emilkarl: has joined #RubyOnRails
[14:12:56] jgpawletko: has joined #RubyOnRails
[14:14:34] snowy: has joined #RubyOnRails
[14:16:15] catphish_: CSRF checks origin and/or referrer header to make sure protocol matches, it doesn't work proxied from https to http unless you set the x-forwarded-proto header too :)
[14:17:09] snowy: has joined #RubyOnRails
[14:17:11] emachnic: has joined #RubyOnRails
[14:17:19] ramkas: has joined #RubyOnRails
[14:18:02] FooMunki: has joined #RubyOnRails
[14:18:44] FooMunki: has joined #RubyOnRails
[14:18:54] Pazician: has joined #RubyOnRails
[14:19:00] jottr: has joined #RubyOnRails
[14:20:48] workmad3: catphish_: interesting, good to know
[14:21:08] workmad3: catphish_: it's been a long time since I forgot the x-forwarded-proto header though :)
[14:22:05] emachnic_: has joined #RubyOnRails
[14:22:38] catphish_: workmad3: yeah, i've been copy/pasting nginx config for years, on this occasion someone else write the nginx config and i didn't notice the omission
[14:23:08] workmad3: heh, typical
[14:23:15] VeryBewitching: has joined #RubyOnRails
[14:23:31] catphish_: well it'll be much quicker to debug next time it happens :)
[14:25:10] snowy: has joined #RubyOnRails
[14:25:36] iamvery: has joined #RubyOnRails
[14:25:45] jtong: has joined #RubyOnRails
[14:27:17] bronson: has joined #RubyOnRails
[14:27:20] Sephyros: Damn i hate nokogiri
[14:27:55] chouhoulis: has joined #RubyOnRails
[14:27:58] Sephyros: is the most complicated gem to install
[14:28:30] roshanavand: has joined #RubyOnRails
[14:29:18] pwnd_nsfw: Sephyros, are you on windows...? 'Cause otherwise, I've never had problems installing nokogiri
[14:29:22] emachnic: has joined #RubyOnRails
[14:31:22] pluralism: has joined #RubyOnRails
[14:31:41] Sephyros: no, using debian, i already installed libxml2-dev libxslt-dev zlib1g-dev but keeps failing to build native
[14:32:16] krz: has joined #RubyOnRails
[14:33:05] daivyk: has joined #RubyOnRails
[14:33:25] blackmesa: has joined #RubyOnRails
[14:35:02] dionysus69: has joined #RubyOnRails
[14:38:34] cricket42: has joined #RubyOnRails
[14:38:35] adre: has joined #RubyOnRails
[14:39:18] catphish_: Sephyros: i've never had any trouble with it - whats the error?
[14:39:22] renegadeandy: has joined #RubyOnRails
[14:39:36] Pazician: has joined #RubyOnRails
[14:40:11] meoblast001: has joined #RubyOnRails
[14:41:16] workmad3: Sephyros: have you already gone through http://www.nokogiri.org/tutorials/installing_nokogiri.html ?
[14:41:22] cricket42: Hi ppl, I need suggestion for deploying rails app. I am trying to deploy app on Ubuntu server for few days and not making it. What is easiest way to deploy app? Mina? Any suggested article on deployment?
[14:41:35] Scient: whats your problem with the deployment
[14:41:44] Scient: i bet there are tons of guides, especially for ubuntu
[14:42:11] cricket42: Scient: I had a lot of them. Currently I'am stuck with capistrano not recognizing my rvm
[14:42:18] tjohnson: has joined #RubyOnRails
[14:42:27] Scient: dont use rvm
[14:42:29] DaniG2k: has joined #RubyOnRails
[14:42:36] DaniG2k: hello all :d
[14:42:37] adavia: has joined #RubyOnRails
[14:42:38] Scient: just compile your ruby from source
[14:42:48] rubyonrailed: has joined #RubyOnRails
[14:43:32] cricket42: Scient: That's why I need good article for setting up and deploying app on server... Your suggestion is to purge rvm?
[14:43:45] moeabdol: has joined #RubyOnRails
[14:44:16] Scient: i have never used rvm in production, nor do I think its a great idea tbh
[14:44:55] DmitryBochkarev: has joined #RubyOnRails
[14:46:37] jayp: has joined #RubyOnRails
[14:46:56] DaniG2k: I am trying to test a dropdown menu with rspec/capybara/selenium
[14:47:02] DaniG2k: This is my test: https://gist.github.com/DaniG2k/a60220062dde2f33873a
[14:47:05] DaniG2k: super simple
[14:47:09] DaniG2k: hover over the element
[14:47:16] DaniG2k: this is the website
[14:47:16] DaniG2k: http://asia-gazette.com/
[14:47:30] Maletor: has joined #RubyOnRails
[14:47:31] DaniG2k: interestingly if I print out the page to debug, I'm seeig the following:
[14:48:21] DaniG2k: <html xmlns="http://www.w3.org/1999/xhtml"><head></head><body></body></html>
[14:48:27] DaniG2k: so its basically an empty page... not sure why
[14:48:30] DaniG2k: all my other tests are passing
[14:48:55] DaniG2k: the only thing I can think of is that Capybara/Rspec/Selenium are misconfigured?
[14:49:00] pwnd_nsfw: DaniG2k, are you even visiting the page
[14:49:32] workmad3: DaniG2k: haha
[14:49:34] pwnd_nsfw: Shit happens man, don't sweat it
[14:49:43] mag42c: has joined #RubyOnRails
[14:50:52] gormandy: has joined #RubyOnRails
[14:51:02] DaniG2k: now im getting asset compilation errors
[14:52:29] gormandy: I'm using collapsibles in my view, teach object A has a collapsible. I want there to be a form inside this collapsible for a has_one relation, so you click A and you get a form for A.B, the documentation says I need to have @B in my controller but I can't do that since this controller is for A and is an index page
[14:52:48] pawnbox: has joined #RubyOnRails
[14:53:07] iamvery: has joined #RubyOnRails
[14:53:39] Pazician: has joined #RubyOnRails
[14:55:06] polishdub: has joined #RubyOnRails
[14:55:47] clayreed: has joined #RubyOnRails
[14:56:49] clayreed: If I'm updating an application from 4 to 5, and I want to use ActionCable, how do I get the ApplicationChannel, ApplicationConnection and the Cable JavaScript?
[14:57:31] tomatoes: has joined #RubyOnRails
[14:57:59] merida: has joined #RubyOnRails
[14:59:54] baweaver: has joined #RubyOnRails
[15:01:55] krz: has joined #RubyOnRails
[15:02:33] aegis3121: has joined #RubyOnRails
[15:03:08] anagha_: this is my controller.rb file https://www.irccloud.com/pastebin/3MFZDXBq/
[15:03:38] anagha_: this is routes.rb https://www.irccloud.com/pastebin/HOkm1SdW/
[15:04:00] anagha_: password reset email not working properly
[15:04:21] Scient: whats the actual issue
[15:04:48] Scient: and yeah you are not really building your URL properly either
[15:06:14] anagha_: email confirmation has to be sent to the mail.
[15:06:41] uglybandersnatch: has joined #RubyOnRails
[15:06:56] anagha_: ok.So is the problem is with routes?
[15:07:01] Scient: yeah so once you actually describe what "password reset email not working properly" means, i might take a look at it
[15:07:10] Scient: until then ill just sit back and enjoy the show
[15:07:33] catphish_: has left #RubyOnRails: ("Leaving")
[15:08:41] roshanavand: has joined #RubyOnRails
[15:09:08] anagha_: If a user forgots a password,user will enter emailid.and a reset pwd link will be send to the user via email.
[15:09:09] bricker: has joined #RubyOnRails
[15:10:05] Scient: ACTION sighs
[15:11:09] crst: has joined #RubyOnRails
[15:12:05] flashpoint9: has joined #RubyOnRails
[15:12:31] Scient: hint: for starters you should figure out how to build an url with query params instead of just appending shit to it
[15:12:32] Snowy_: has joined #RubyOnRails
[15:12:59] shinnya: has joined #RubyOnRails
[15:13:25] rubyonra_: has joined #RubyOnRails
[15:13:47] crst: Hi, I'm running ruby 2.1.1 with rbenv. When I enter `rails _4.1.5_ new blog` the rails app is installed with rails a different rails 4.2 version. How can I make it use rails 4.1.5?
[15:14:15] IFrank004: has joined #RubyOnRails
[15:14:29] Scient: change the rails version in the gemfile and run bundle update rails
[15:15:43] sonofdirt: has joined #RubyOnRails
[15:16:13] Acontius: has joined #RubyOnRails
[15:16:54] Devalo: has joined #RubyOnRails
[15:17:18] anagha_: @Scient:yeah.I will work on it.
[15:17:34] agit0: has joined #RubyOnRails
[15:17:49] crst: Scient: I tried that, but then I run into difficulties and after all 'repairs' I cannot even start the server.
[15:18:22] maxx88: has joined #RubyOnRails
[15:18:30] Scient: rvm implode, download ruby source, ./configure and make && make install - voila, you got system wide ruby on your server
[15:18:43] pwnd_nsfw: don't do that lol
[15:19:04] Pazician: has joined #RubyOnRails
[15:19:06] pwnd_nsfw: why is that even necessary?
[15:19:27] Scient: ive yet yo see a good reason to use rvm in production besides the theoretical "what if I deploy multiple apps using different ruby versions"
[15:19:27] bobol: has joined #RubyOnRails
[15:19:42] Scient: which is bogus, unless you are working with some kind of legacy stuff which cant be brought over to 2.x
[15:19:44] pwnd_nsfw: oh, this is in production..?
[15:19:53] pwnd_nsfw: ACTION shrugs. 
[15:19:59] pwnd_nsfw: yeah dunno why you'd use in production....
[15:20:03] arup_r: has joined #RubyOnRails
[15:20:03] Scient: for development I would use a ruby version manager yes :)
[15:20:21] rubyonrailed: has joined #RubyOnRails
[15:20:35] jottr: has joined #RubyOnRails
[15:20:55] Pazician: has joined #RubyOnRails
[15:20:57] DaniG2k_: has joined #RubyOnRails
[15:21:49] crst: I'm sorry I'm not sure if the above discussion is related to my question, is it?
[15:22:04] pwnd_nsfw: That's what I was confused about...
[15:22:30] pwnd_nsfw: what errors are you receiving when running the server crst
[15:22:34] Scient: oh... my bad lol i confused you with someone else
[15:22:36] chridal: There was some talk about Rails 5 coming out today earlier this week. Do you think that's true? I'm starting a new rails proj now.
[15:23:14] rrawlins: has joined #RubyOnRails
[15:23:27] soahccc: chridal: http://rails5countdown.com/ (not offical though)
[15:23:32] sp1rs: has joined #RubyOnRails
[15:23:42] soahccc: they do some math magic with open issues
[15:23:48] gbgdev: has joined #RubyOnRails
[15:24:16] havenwood: ha, Rails 5 countdown written in Go
[15:24:23] kies: has joined #RubyOnRails
[15:24:32] Scient: thats because Rails doesnt scale
[15:24:38] chridal: Thanks btw!
[15:25:57] soahccc: Scient: we use chruby in production for the reason that we want to test new versions in production first :) if it fails I just need to change the version in our capistrano config and everything works again
[15:26:21] Scient: we use staging for that.... :D
[15:26:21] scope: has joined #RubyOnRails
[15:26:28] Skelz0r: has joined #RubyOnRails
[15:26:55] Megamos: has joined #RubyOnRails
[15:26:59] soahccc: and also to reduce downtime for initial bundling (bundle with new ruby, then change version app is running on)
[15:27:29] crst: pwnd_nsfw: I don't have rvm and only use rbenv on my local machine for development. I have many different ruby versions which itself have many different rails versions, and actually I'm looking for a way to get a fresh clean rails x.x.x install to begin with a new project which demands these requirements. Unfortunately the rails new _x.x.x_ is not working... I'm getting multiple errors along the path when I only change the gemfile, t
[15:27:29] crst: he first is: `Bundler could not find compatible versions for gem "railties"` But I'm not sure how clean this method is if I can even say so...
[15:27:36] Pazician: has joined #RubyOnRails
[15:28:29] pwnd_nsfw: did you do just "bundle update" with no args?
[15:28:45] Scient: i always do that!
[15:29:11] jtong: has joined #RubyOnRails
[15:30:00] DaniG2k_: has left #RubyOnRails: ()
[15:30:17] DaniG2k: has joined #RubyOnRails
[15:30:49] djbkd: has joined #RubyOnRails
[15:30:50] snowy: has joined #RubyOnRails
[15:31:24] snockerton: has joined #RubyOnRails
[15:31:40] yellow5: has joined #RubyOnRails
[15:32:06] crst: pwnd_nsfw: Well in this case I used bundle update rails. When I use bundle update, the server works, but as soon as I change the gemfile to meet the other gems versions I'm running into problems again, like: /usr/local/var/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load': no implicit conversion of nil into String (TypeError)
[15:32:33] DaniG2k: how are you guys precompiling assets for rspec/capybara tests?
[15:32:40] DaniG2k: im not sure my setup is good :/
[15:32:42] pwnd_nsfw: DaniG2k, not
[15:33:12] pwnd_nsfw: crst, remove all version constraints from your gemfile ??? profit
[15:33:22] pwnd_nsfw: I don't know why rails _version_ new doesn't work
[15:33:32] pwnd_nsfw: I wonder if it implies that you should already have the rails version installed
[15:33:34] pwnd_nsfw: then it'll work
[15:33:37] pwnd_nsfw: ACTION shrugs
[15:33:54] pwnd_nsfw: crst, trying doing gem install rails with your desired version
[15:34:02] pwnd_nsfw: then try running rails new with that same version
[15:35:04] pwnd_nsfw: On that note, I have to go to shitty daytime job
[15:35:06] rrawlins: How do you folks organise your locale file/folder structure to keep things tidy and maintainable?
[15:35:45] epochwolf: rrawlins: very carefully.
[15:35:51] crst: pwnd_nsfw: I need to meet specs and gem is installed... rails new never worked... But anyway, have fun!
[15:36:36] rrawlins: epochwolf: *badum tish*
[15:37:26] epochwolf: rrawlins: honestly, it's very project dependent. I usually put everything under /app with subfolders for types of objects.
[15:37:50] epochwolf: If I really need to, I make subfolders under those.
[15:38:26] emilkarl: has joined #RubyOnRails
[15:39:07] yellow5: has joined #RubyOnRails
[15:44:34] Uber|Dragon: has joined #RubyOnRails
[15:47:39] rrawlins: epochwolf: yeah my current approach is to mimic the structure in app i.e. controllers, mailers, views etc.. Might make finding the right text a little easier.
[15:49:05] epochwolf: rrawlins: that's the way rails is structured. There's other ways to do it but then the next guy that shows up is going to be confused. I generally put most of the standalone modules and classes in /app/lib and call it a day. I leave /lib empty.
[15:49:18] Pazician: has joined #RubyOnRails
[15:49:44] epochwolf: Except for /lib/tasks but that's the rails default location for rakefiles.
[15:50:46] RegulationD: has joined #RubyOnRails
[15:51:41] digitalcakes: has joined #RubyOnRails
[15:51:53] scope: has joined #RubyOnRails
[15:52:05] axl_: has joined #RubyOnRails
[15:52:37] smathy: has joined #RubyOnRails
[15:53:23] unreal: has joined #RubyOnRails
[15:54:18] sleungcy: has joined #RubyOnRails
[15:54:49] Devalo: has joined #RubyOnRails
[15:56:33] pawnbox_: has joined #RubyOnRails
[15:57:14] norc: has joined #RubyOnRails
[15:57:39] jgpawletko: has left #RubyOnRails: ()
[15:58:12] n008f4g_: has joined #RubyOnRails
[15:58:17] merida: has joined #RubyOnRails
[15:59:31] mfaeh: has joined #RubyOnRails
[15:59:52] [Tyrant]: has joined #RubyOnRails
[16:00:44] timdotrb: has joined #RubyOnRails
[16:00:46] d0nn1e: has joined #RubyOnRails
[16:02:43] jtong: has joined #RubyOnRails
[16:04:05] Xentil: has joined #RubyOnRails
[16:04:52] mostlybadfly: has joined #RubyOnRails
[16:06:34] DigitalDarwin: has joined #RubyOnRails
[16:06:50] dopamean_: has joined #RubyOnRails
[16:10:06] [Tyrant]: looking for senior ror devs and scripters
[16:10:29] [Tyrant]: hoping i’m not breaking rules by asking.. forgive me if I am…
[16:11:09] atzorvas: has joined #RubyOnRails
[16:11:17] atzorvas: is there a way to override self['attribute_name']= method for a given attribute_name?
[16:11:51] jottr: has joined #RubyOnRails
[16:12:34] dgncn: has joined #RubyOnRails
[16:12:51] epochwolf: [Tyrant]: Do you have a link to a job posting or something?
[16:14:01] epochwolf: [Tyrant]: marijuana related?
[16:14:03] [Tyrant]: have a quick php proto in place for testing and proof of concept
[16:14:15] [Tyrant]: a 7 year old thought of the name
[16:14:45] [Tyrant]: i’m taking of the food industry
[16:15:26] [Tyrant]: its 3 ppl right now
[16:15:31] [Tyrant]: so its ground floor
[16:15:53] epochwolf: [Tyrant]: Let's take this private. :)
[16:16:00] [Tyrant]: welcome to msg me
[16:16:02] iamvery: has joined #RubyOnRails
[16:19:15] siaW: has joined #RubyOnRails
[16:22:14] BrianJ: has joined #RubyOnRails
[16:25:53] sp1rs: has joined #RubyOnRails
[16:28:31] tamole: has joined #RubyOnRails
[16:29:08] bronson: has joined #RubyOnRails
[16:29:42] sonofdirt: has joined #RubyOnRails
[16:30:10] Pazician: has joined #RubyOnRails
[16:30:53] snowy: has joined #RubyOnRails
[16:37:08] sneakerhax: has joined #RubyOnRails
[16:37:56] mrgreenfur: has joined #RubyOnRails
[16:38:31] davee_: has joined #RubyOnRails
[16:40:24] rakm: has joined #RubyOnRails
[16:43:26] htmldrum: has joined #RubyOnRails
[16:43:27] trinaldi: has joined #RubyOnRails
[16:44:48] Peteykun: has joined #RubyOnRails
[16:45:46] nerium: has joined #RubyOnRails
[16:46:32] decaff: has joined #RubyOnRails
[16:48:45] aegis3121: has joined #RubyOnRails
[16:52:59] blackmesa: has joined #RubyOnRails
[16:53:45] beauby: has joined #RubyOnRails
[16:55:00] bmalum: has joined #RubyOnRails
[16:55:16] agit0: has joined #RubyOnRails
[16:57:10] EdwardIII: ok getting down to it, i've got my ansible build which creates the box, installs a sane version of ruby
[16:57:18] EdwardIII: i can easily do bundle install from ansible
[16:57:32] EdwardIII: but i guess it's a question of whether to use cap for the rest
[16:58:16] chouhoul_: has joined #RubyOnRails
[16:59:09] EdwardIII: i think doing a puma install without cap might be a bit hairy
[16:59:32] timdotrb: has joined #RubyOnRails
[16:59:41] timdotrb: morning, all
[17:01:33] lxsameer: has joined #RubyOnRails
[17:03:35] sleungcy: has joined #RubyOnRails
[17:03:44] bzb: has joined #RubyOnRails
[17:05:03] djbkd: has joined #RubyOnRails
[17:05:07] arup_r: timdotrb: hello
[17:05:31] baweaver: has joined #RubyOnRails
[17:06:33] choke: has joined #RubyOnRails
[17:06:49] flashpoint9: has joined #RubyOnRails
[17:08:40] SeanLazer_: has joined #RubyOnRails
[17:10:23] arBmind: has joined #RubyOnRails
[17:13:23] ponzii: has joined #RubyOnRails
[17:15:16] aegis3121: has joined #RubyOnRails
[17:16:22] ponzii: With a new rails project using an existing postgres database do I need to do an initial "create_database" migration once I've generated the schema with `rake db:schema:dump` ? Can't I just use a pg_dump backup as the initial starting point?
[17:17:22] ponzii: I followed the steps on: https://medium.com/@kitsched/starting-a-ruby-on-rails-project-from-existing-data-7dda5044c85f#.dezx3wo6q but my data was wiped and `rake db:import` didn't get all the data from data.yml
[17:18:01] Uo9er_: has joined #RubyOnRails
[17:18:44] snowy: has joined #RubyOnRails
[17:25:52] sonofdirt: has joined #RubyOnRails
[17:27:00] wreet: has joined #RubyOnRails
[17:28:04] eyeamaye: has joined #RubyOnRails
[17:28:29] chouhoulis: has joined #RubyOnRails
[17:29:12] yellow5: has joined #RubyOnRails
[17:30:10] bronson: has joined #RubyOnRails
[17:30:39] arup_r: has joined #RubyOnRails
[17:31:24] emilkarl: has joined #RubyOnRails
[17:34:05] rogue_koder: has joined #RubyOnRails
[17:34:15] tvw: has joined #RubyOnRails
[17:35:01] aegis3121: has joined #RubyOnRails
[17:36:01] Terens: has joined #RubyOnRails
[17:36:14] Terens: whatever I run I get this error
[17:36:15] Terens: rails:22:in `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)
[17:36:15] Terens:         from /home/vagrant/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
[17:36:15] Terens:         from /home/vagrant/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
[17:36:42] emilkarl: has joined #RubyOnRails
[17:37:41] baweaver: has joined #RubyOnRails
[17:39:13] pluralism: has joined #RubyOnRails
[17:40:06] wreet: has left #RubyOnRails: ("Leaving")
[17:41:15] pluralism: I'm trying to follow the book API on Rails but I'm getting the following error: uninitialized constant Api. Here it is a print with the folder structure in the left side: http://imgur.com/x2RLZIz
[17:41:18] pluralism: Thanks in advance
[17:44:12] DoctorMonocular: has joined #RubyOnRails
[17:44:24] scope: has joined #RubyOnRails
[17:45:18] blackmesa: has joined #RubyOnRails
[17:46:51] chridal: pluralism: Please show me the output of app/controllers/UsersController.rb
[17:46:54] chridal: https://gist.github.com
[17:48:15] pluralism: chridal: Here it's: https://gist.github.com/pluralism/f65de134b6f51b8b0b3a
[17:48:25] pluralism: It's on app/controllers/api/v1/users_controller.rb
[17:50:11] xploshioon: has joined #RubyOnRails
[17:50:55] xploshioon: Hi guys, i have a helper and need to pass a partial to this, how can I achieve this?
[17:51:49] bePolite: has joined #RubyOnRails
[17:52:17] diegoviola: has joined #RubyOnRails
[17:52:24] chridal: pluralism: May I also have the entire error message inside that Gist?
[17:52:41] jtong_: has joined #RubyOnRails
[17:53:29] pluralism: chridal: Yes, sure. There you go: https://gist.github.com/pluralism/c509ada9e7a24c1e4605
[17:53:33] manfrin: has joined #RubyOnRails
[17:53:33] sp1rs: has joined #RubyOnRails
[17:54:52] drale2k: has joined #RubyOnRails
[17:55:14] wldcordeiro: has joined #RubyOnRails
[17:55:43] xhoy: hi! i have two models, letters && templates, if i would like to create a letter with a template what would be the best way to create the urls?
[17:56:01] xhoy: /letters/new/template/:id?
[17:56:03] chridal: pluralism: Try to change require "spec_helper" to require "rails_helper"
[17:56:13] xhoy: /template/:id/letters/new?
[17:56:36] xhoy: letter/new?template=:id?
[17:56:48] chridal: To me the /template/:id/letters/new is the 'prettiest' and makes the most sense
[17:57:01] xhoy: i was thinking that :)
[17:57:03] chridal: it clearly communicates what it does
[17:57:11] pluralism: chridal: Oh, nice, it worked! Thanks!
[17:57:12] chridal: and that the letter is a subset of the template
[17:57:20] xhoy: and now i could create it for a customer :P
[17:57:33] xhoy: customer/:id/template/:template_id/letter/new?
[17:57:43] choke: has joined #RubyOnRails
[17:57:48] chridal: pluralism: So you know; the reason that didn't work is because RSpec creates two helpers. The spec hepler is for when you do not depend on the Rails environment.
[17:58:04] chridal: In order to be able to load the files (the controllers in this case) you had to use rails_helper because it will load the environment.
[17:59:01] chridal: xhoy: Depends on how your system is laid out really.
[17:59:03] raunicolae: has joined #RubyOnRails
[17:59:08] xhoy: or maby its more like receiver/:id/template/:template_id/letter/new
[17:59:10] chridal: If you need both those IDs then that could be one way of doing it
[17:59:14] pluralism: chridal: Alright, understood! I noticed that rails_helper already requires spec_helper
[17:59:22] chridal: if you have a way of resolving the template ID from the customer iD you might not need it
[17:59:24] chridal: pluralism: yw
[17:59:27] xhoy: chridal: yeah that is wat i am figuring out
[17:59:36] xhoy: no since the tthere are 100+ templates
[17:59:44] xhoy: reminders, invoices, random letters
[18:00:07] xhoy: and customers can have "custome" letters (hi i would like to send you this random letter with random stuff where there isn't a template)
[18:00:10] chridal: I see. Well, then that could be one way of doing it, yes.
[18:00:27] chridal: URLs are sort of a matter of taste
[18:00:28] xhoy: so customer/:id/letter/new would be valid aswell
[18:00:39] xhoy: well with rails they end up in a controller
[18:00:41] chridal: There are guidelines obviously, but it still comes down to what makes the most sense for your specific use-case.
[18:00:58] rakm: has joined #RubyOnRails
[18:01:05] xhoy: and i think in this case they should end up in the letter controller (with or with out template?)
[18:01:05] chridal: You can use any URL you want and then point it to any controller and action in routes.rb
[18:01:13] xhoy: or should the template letters endup in the template controller?
[18:01:15] trinaldi: has joined #RubyOnRails
[18:01:18] chridal: I can't really answer that as I do not understand your system
[18:01:25] jayp: has joined #RubyOnRails
[18:01:32] chridal: Organize your code in the way that it makes sense to you
[18:01:38] chridal: And you can move it later on.
[18:01:44] xhoy: that it more then true
[18:02:23] xhoy: but template/:id/letter/new would endup in the letter controller
[18:02:31] chridal: That's just fine.
[18:02:45] xhoy: let me say it this way super deep nested routes doesn't feel logical :)
[18:02:48] chridal: It doesn't have to end up in the templtae controller just because the "root" node in the URL is `template`
[18:02:58] tubbo: xhoy: "way super deep" => 2 steps? :)
[18:03:02] xhoy: tubbo: ow ok
[18:03:05] xhoy: not that deep?
[18:03:18] raunicolae: has left #RubyOnRails: ()
[18:03:19] xhoy: chridal: no by default it dosnt end up there :)
[18:03:28] xhoy: tubbo: i tought 3 deep = " adviced" max :)
[18:03:39] chridal: xhoy: Don't worry too much about default. You can do whatever you want with your routes.
[18:03:42] tubbo: xhoy: it's all about dependencies and intent. like you have a Letter. does it need to be nested under a Template? who knows.
[18:04:02] tubbo: might be better to pass template_id inside the request params rather than in the URL.
[18:04:18] tubbo: your routes and API are another interface to your app, just like your pretty web interface.
[18:04:40] chridal: I should mention that I'm a pure API dev
[18:04:46] xhoy: tubbo: the thing is, when you look at the routing guide, nothing about params :)
[18:04:47] chridal: So maybe not listen to my way of doing routes :-)
[18:05:11] xhoy: chridal: hahaha :)
[18:05:14] xhoy: thanks for the toughts
[18:05:14] chridal: xhoy: When you send a request you can pass parameters in the request body and the request header
[18:05:18] jojo_: has joined #RubyOnRails
[18:05:19] xhoy: yeah i know that
[18:05:30] chridal: So you could pass some of the parameters in the request body instead of the header
[18:05:34] xhoy: but i was looking at the routing guide, and didn't even think about params :)
[18:05:46] chridal: I only pass things in the header that clearly communicate the intent of the action
[18:05:46] sp1rs: has joined #RubyOnRails
[18:05:56] xhoy: custerumer/letter/new?template=123
[18:06:03] chridal: for instance /user/:user_id clearly communicate to the user that he's dealing with a specific user
[18:06:13] chridal: if you need more data you can pass that in the request body for instance.
[18:06:16] chridal: It's all about communication.
[18:06:19] xhoy: user/:id/letter/new?template=123
[18:06:29] xhoy: thanks for the help!
[18:07:00] emachnic: has joined #RubyOnRails
[18:07:00] xhoy: ill go for the last one :) good luck with your API's :>
[18:08:56] sonofdirt: has joined #RubyOnRails
[18:10:29] hyperdrive: has joined #RubyOnRails
[18:12:26] siaW: has joined #RubyOnRails
[18:12:58] YourManCJ: has joined #RubyOnRails
[18:13:42] YourManCJ: I broke my livereload. Can someoen help? error is uninitialized constant Rack::LiveReload
[18:14:33] triptec: has joined #RubyOnRails
[18:15:57] tubbo: YourManCJ: install rack-livereload
[18:16:08] YourManCJ: I have it installed
[18:16:43] YourManCJ: wow jk, used to be
[18:17:16] IrishGringo: has joined #RubyOnRails
[18:18:25] YourManCJ: thanks for showing me my dumbassery
[18:19:28] jenrzzz: has joined #RubyOnRails
[18:22:36] sonofdirt: has joined #RubyOnRails
[18:25:54] sonofdirt: has joined #RubyOnRails
[18:26:08] dopamean_: im trying to make sense of something pretty basic with ActiveModel::Serialization and it's driving me a little crazy
[18:26:18] dopamean_: anyone want to take a quick look at a gist. i suspect its a simple answer
[18:27:13] dopamean_: https://gist.github.com/nickmcdonnough/9749d630afc02ed67d24
[18:30:04] emilkarl: has joined #RubyOnRails
[18:31:10] bronson: has joined #RubyOnRails
[18:31:46] solars: has joined #RubyOnRails
[18:32:59] adlerdias: has joined #RubyOnRails
[18:33:22] jenrzzz_: has joined #RubyOnRails
[18:36:01] Megamos: has joined #RubyOnRails
[18:37:33] sonofdirt: has joined #RubyOnRails
[18:37:59] ldnunes: has joined #RubyOnRails
[18:38:35] rakm: has joined #RubyOnRails
[18:41:56] IrishGringo: has joined #RubyOnRails
[18:42:07] siaW: has joined #RubyOnRails
[18:42:22] [Butch]: has joined #RubyOnRails
[18:42:58] sasasekaric: has joined #RubyOnRails
[18:44:32] awasum: has joined #RubyOnRails
[18:50:37] baweaver: has joined #RubyOnRails
[18:53:33] crst: has joined #RubyOnRails
[18:57:15] triptec: has joined #RubyOnRails
[19:03:26] qejk: has joined #RubyOnRails
[19:04:34] crst: has joined #RubyOnRails
[19:05:24] crst: Hi, can you tell me if there is a good chance to do freelancing with rails when one isn't a pro yet?
[19:06:08] srinidhi: has joined #RubyOnRails
[19:06:20] dionysus69: has joined #RubyOnRails
[19:07:23] crst: smathy: oh, ok.
[19:07:54] flashpoint9: has joined #RubyOnRails
[19:08:16] uglybandersnatch: has joined #RubyOnRails
[19:08:49] tomatoes: has joined #RubyOnRails
[19:09:20] FLeiXiuS: has joined #RubyOnRails
[19:10:34] claytonzaugg: has joined #RubyOnRails
[19:13:08] gingray: has joined #RubyOnRails
[19:13:10] jtong: has joined #RubyOnRails
[19:13:35] PedramT: has joined #RubyOnRails
[19:18:53] U7se6: has joined #RubyOnRails
[19:19:35] emilkarl_: has joined #RubyOnRails
[19:20:42] VeryBewitching: crst: https://www.codefellows.org/blog/this-is-why-learning-rails-is-hard
[19:23:09] netzfisch: has joined #RubyOnRails
[19:24:55] gingray_: has joined #RubyOnRails
[19:25:59] choke: has joined #RubyOnRails
[19:27:25] gingray__: has joined #RubyOnRails
[19:28:42] sonofdirt: has joined #RubyOnRails
[19:28:50] snowy: has joined #RubyOnRails
[19:28:55] adre: has joined #RubyOnRails
[19:29:02] DoctorMonocular: hey, simple question -- I'm using stripe, and I want the script tag for the stripe.js library to only show up on the payment page where it's relevant. What's the cleanest way to handle this?
[19:29:50] baweaver: has joined #RubyOnRails
[19:30:42] crst: VeryBewitching: Sure thing. Forget to specify when you know most of that, some things much better than others. But one is just new to the rails framework. Because I often see 3+ years experience is desired etc. When you know much webdev already it's 'kind of easy' to get into the new framework itself.
[19:30:49] aegis3121: has joined #RubyOnRails
[19:31:29] fmcgeough: has joined #RubyOnRails
[19:31:35] VeryBewitching: crst: I've been building web applications since the days of PHP 2.0 FI and when I started working with Rails some things threw me for a loop.
[19:33:27] capin: VeryBewitching: no pun intended?
[19:33:53] VeryBewitching: capin: Or maybe it was? ;)
[19:34:24] crst: VeryBewitching: Cool! When did you start working with rails? Was it your first framework like this?
[19:34:29] VeryBewitching: crst: Rails is "different" than anything I've worked with. You can get things done really quick, but if you're unseasoned quick development may be matched with poor performance.
[19:34:40] VeryBewitching: No, my first MVC was struts
[19:34:45] VeryBewitching: If you can call it that
[19:34:56] VeryBewitching: I've been working with Rails in the last few years.
[19:35:19] VeryBewitching: Ah, there we go.
[19:35:38] VeryBewitching: My original nick
[19:35:38] gormandy_: has joined #RubyOnRails
[19:36:26] VeryBewitching: So tack about 30 days on that. I had a *lot* of time to devote to learning it, many people may not have had the same quantity of time.
[19:38:04] gingray: has joined #RubyOnRails
[19:38:46] VeryBewitching: Rails in some ways is a tough nut to crack because all of the really great learning opportunities (meaning, people creating add-ons for Rails) are solved problems now. I can't see myself developing a file upload gem, too many exist.
[19:38:57] jtong: has joined #RubyOnRails
[19:39:24] Scient: welcome to modern day app engineering
[19:39:25] VeryBewitching: That's not to say opportunities don't exist, many of the ones that would be natural to consider are already available is all.
[19:39:33] Scient: its more like building stuff out of Lego blocks
[19:39:42] VeryBewitching: Scient: Which, tbh, is progress.
[19:39:45] Scient: which is also a good thing, you can focus on your business logic
[19:39:50] Scient: instead of inventing everything again
[19:39:54] Coldblackice: has joined #RubyOnRails
[19:40:01] Scient: at the same time there is so much shit open source libs that... yeah :D
[19:40:24] jtong: has joined #RubyOnRails
[19:40:28] VeryBewitching: Ya, some of the OSS libs for Ruby are touch and go, but I've been surprised by the number of great ones that I've used.
[19:40:33] eyeamaye: has joined #RubyOnRails
[19:40:54] crst: VeryBewitching: I've just got into rails fairly recently and I really fell in love with it. Did a lot js stuff before and was thinking of skipping rails completely :D
[19:41:03] cnk: has joined #RubyOnRails
[19:41:16] jtong: has joined #RubyOnRails
[19:41:24] VeryBewitching: crst: You should stick with A) what puts food on your plate and B) what you feel most comfortable with.
[19:41:40] VeryBewitching: If that turns out to be Rails, excellent, but you have to survive to keep learning.
[19:42:20] VeryBewitching: I fell in love with Ruby quick, too. When I first used RSpec on a project my brain was happy each day.
[19:43:25] agit0: has joined #RubyOnRails
[19:45:01] crst: Found a rails job actually, and I'm learning a lot while doing, but I charge much less than I actually work because of it. Best of both worlds. I love rails now.
[19:46:47] htmldrum: has joined #RubyOnRails
[19:47:22] benlieb: has joined #RubyOnRails
[19:48:52] roshanavand: has joined #RubyOnRails
[19:49:49] baweaver: has joined #RubyOnRails
[19:50:53] moeabdol: has joined #RubyOnRails
[19:57:33] blackmesa: has joined #RubyOnRails
[19:57:48] siaW: has joined #RubyOnRails
[19:58:56] IrishGringo: has joined #RubyOnRails
[19:59:05] mrbubbles: has joined #RubyOnRails
[20:00:53] snowy: has joined #RubyOnRails
[20:01:12] jenrzzz: has joined #RubyOnRails
[20:08:10] digitalcakes: has joined #RubyOnRails
[20:10:01] gingray_: has joined #RubyOnRails
[20:14:39] jottr: has joined #RubyOnRails
[20:17:44] yellow5: has joined #RubyOnRails
[20:18:23] solars: has joined #RubyOnRails
[20:22:11] SeanLazer: has joined #RubyOnRails
[20:22:59] AntiSpamMeta: has joined #RubyOnRails
[20:24:07] ur5us: has joined #RubyOnRails
[20:26:49] pawnbox: has joined #RubyOnRails
[20:29:38] _bogus_: has joined #RubyOnRails
[20:29:38] _bogus_: has joined #RubyOnRails
[20:31:08] eyeamaye: has joined #RubyOnRails
[20:31:19] gormandy: has joined #RubyOnRails
[20:31:30] _bogus_: please, can I have a help on this?? https://gist.github.com/andreycwb/ec22848f718c25798708 (running capistrano), after I added activeadmin gem. Apparently, when running bundle install on server it cant install the bundle from the github. The point is, its necessary to use the github to avoid a loop in geminstall (its on the docs)
[20:33:00] bronson: has joined #RubyOnRails
[20:33:37] eyeamaye: has joined #RubyOnRails
[20:35:25] ldnunes_: has joined #RubyOnRails
[20:37:43] tycoon177: has joined #RubyOnRails
[20:38:11] bePolite: has joined #RubyOnRails
[20:38:11] bePolite: has joined #RubyOnRails
[20:40:06] helpa: *makes a cross with fingers and says a prayer*
[20:42:08] greengriminal: has joined #RubyOnRails
[20:42:28] _bogus_: apparently its not an activeadmin error, but a github error when trying to connnect
[20:43:04] mwlang: has joined #RubyOnRails
[20:45:47] siaW: has joined #RubyOnRails
[20:46:15] hnanon: has joined #RubyOnRails
[20:47:04] pawnbox: has joined #RubyOnRails
[20:47:18] hnanon: Is there a time_zone("some time zone" method that will allow me to do Time.now.time_zone("Eastern Daylight Savings"), for example?
[20:48:53] VeryBewitching: hnanon: Time.zone = ActiveSupport::TimeZone.new('UTC')
[20:48:53] tbuehlmann: there should be Time.current.in_time_zone('Alaska')
[20:49:10] VeryBewitching: If you want to set it for the duration of the request, that is.
[20:49:47] hnanon: I think there is a "use_zone" method.
[20:50:09] IanMalcolm: has joined #RubyOnRails
[20:50:40] VeryBewitching: hnanon: The above is how I've done in the past after lots of reading, and it works out well.
[20:51:28] adre: has joined #RubyOnRails
[20:51:43] baweaver: has joined #RubyOnRails
[20:51:56] hnanon: VeryBewitching: Thanks. tbuehlmann's solution works well too.
[20:52:02] gormandy_: has joined #RubyOnRails
[20:53:06] VeryBewitching: I usually set it for the whole request so I don't have to specify the zone everywhere I have a date, it depends on how often you're doing it I guess.
[20:53:37] Radar: GOOD MORNING
[20:54:39] VeryBewitching: hnanon: http://brendankemp.com/essays/dealing-with-time-zones-using-rails-and-postgres/ and http://brendankemp.com/essays/handling-time-zones-in-rails/ really helped me understand TZ in Rails.
[20:54:40] chrisja: has joined #RubyOnRails
[20:54:40] lemur: has joined #RubyOnRails
[21:02:06] hnanon: VeryBewitching: Thank you.
[21:04:56] mostlybadfly: has joined #RubyOnRails
[21:07:51] roshanavand: has joined #RubyOnRails
[21:08:39] b|ackwolf: has joined #RubyOnRails
[21:09:10] bricker: has joined #RubyOnRails
[21:09:41] drptbl: has joined #RubyOnRails
[21:14:06] Uber|Dragon: has joined #RubyOnRails
[21:15:09] gabeodess: has joined #RubyOnRails
[21:15:37] gabeodess: Hey all, I realize this isn’t really a rails question buuuut… I just rebooted my computer and now my rails server is telling me that my database isn’t running. Can someone help me track down how to get it up and running again? when I run `$postgres -D /usr/local/pgsql/data` it tells me it can’t find `postgresql.conf`. when I run `locate postgresql.conf` I only see two sample files under /usr/local/Cellar (from my homeb
[21:15:38] gabeodess: installations).
[21:15:51] gabeodess: installed with Homebrew on OSX
[21:16:38] weaksauce: gabeodess #postgresql is probably better for this
[21:16:44] clayreed: gabeodess: I recommend using Postgres.app if your on OS X.
[21:16:48] gabeodess: weaksauce: yeah… I’m in there too
[21:17:49] clayreed: postgresapp.com << gabeodess
[21:18:27] gabeodess: clayreed: thanks. My hope is to be able to start the same server so I’ll have all my development data still accessible.
[21:19:49] DoctorMonocular: has joined #RubyOnRails
[21:19:55] Uo9er_: has joined #RubyOnRails
[21:19:59] crst: gabeodess: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
[21:20:15] Cohedrin: has joined #RubyOnRails
[21:20:30] crst: Or check out: homebrew services
[21:21:12] gabeodess: crst: $pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
[21:21:13] gabeodess: pg_ctl: another server might be running; trying to start server anyway
[21:21:14] gabeodess: server starting
[21:21:31] gabeodess: crst: but ps says it’s still not running :/
[21:22:04] crst: gabeodess: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop
[21:22:10] crst: what does it say?
[21:22:43] gabeodess: crst: $pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop
[21:22:44] gabeodess: waiting for server to shut down.....................
[21:23:42] gabeodess: crst: pg_ctl: server does not shut down
[21:23:42] gabeodess: HINT: The "-m fast" option immediately disconnects sessions rather than
[21:23:43] gabeodess: waiting for session-initiated disconnection.
[21:24:25] choke: has joined #RubyOnRails
[21:26:46] rattatmatt: has joined #RubyOnRails
[21:27:03] IFrank00: has joined #RubyOnRails
[21:27:08] gabeodess: crst: here’s what I have as my launch agent: https://gist.github.com/gabeodess/dc62e45648760fd55ce0
[21:28:11] djbkd: has joined #RubyOnRails
[21:29:39] flopsec: has joined #RubyOnRails
[21:29:48] crst: gabeodess: did the server quit? if yes you can try the start command again.
[21:30:55] gabeodess: crst: hmmm… seems to be back online. Not sure what happened there.
[21:31:44] gabeodess: crst: not sure what happened, but thanks for your help.
[21:31:47] ctrlrsf: has joined #RubyOnRails
[21:32:17] crst: gabeodess: I'm not sure either :)
[21:32:48] tvon: has joined #RubyOnRails
[21:33:36] tvon: Q: Why is bin/setup ruby and not just a shell script?
[21:34:00] Radar: tvon: Where are you seeing that?
[21:34:30] tvon: Radar: default rails 4.2 project
[21:34:32] solars: how can I simplify such a query? .joins('right join items on items.id = product.id and items.id in (#{Item.where(glass: true).map(:id).join(',')})" ) if I could get the Item.where somehow into the first query so I get only one db call it would be nice..
[21:34:46] Radar: tvon: Right. I think it's done that way so that it will work on all OS
[21:36:03] tvon: It uses commands I would not expect to find on windows, seems it would work as a 'sh' script.
[21:36:18] solars: I guess I have to use arel
[21:36:23] tvon: It did not occur to me that it was odd until someone pointed it out to me today.
[21:36:56] xhoy: i need to go to bed or i am missing something, i have a model(letter) with a polymorphic relation to user/customer, now i have an instance of user (@user) and i to @user.letters.build(params) but on save it doesn't have a user....
[21:37:53] xhoy: ow it doesn't have a holder in a before_save callback
[21:39:02] Radar: tvon: Yeah, I am not sure tbh
[21:39:15] Radar: tvon: file an issue about it?
[21:39:22] netzfisch: has joined #RubyOnRails
[21:39:39] tvon: Radar: considering it, going to look through the commits first and see if there is any explanation
[21:43:42] xhoy: fack, its beter to sed a has_many as: ;holder :) on a polymorpic relation
[21:45:04] tvon: Radar: For the sake of closure, looks like it's for portability. They have replaced the shell commands in 5.x with rake tasks, so it should work anywhere.
[21:45:05] IFrank00: has joined #RubyOnRails
[21:45:22] Radar: tvon: neat. Thanks for confirming :)
[21:46:14] greengriminal: has joined #RubyOnRails
[21:46:35] pawnbox: has joined #RubyOnRails
[21:48:30] tvon: Though I might think it would make sense to have a 'setup' rake task instead of having a setup script that runs a collection of rake tasks, but whatever.
[21:49:09] ayy: has joined #RubyOnRails
[21:49:10] tvon: ACTION is a critic just like everyone else
[21:50:21] yellow5: has joined #RubyOnRails
[21:52:11] uglybandersnatch: has joined #RubyOnRails
[21:53:34] RegulationD: has joined #RubyOnRails
[21:54:54] theblang: has joined #RubyOnRails
[21:54:57] IFrank00: has joined #RubyOnRails
[22:00:14] netzfisch: has joined #RubyOnRails
[22:00:25] flopsec: has joined #RubyOnRails
[22:00:44] ctrlrsf: has joined #RubyOnRails
[22:01:33] roshanavand: has joined #RubyOnRails
[22:03:04] baweaver: has joined #RubyOnRails
[22:03:23] mrbubbles: has joined #RubyOnRails
[22:04:31] stannard: has joined #RubyOnRails
[22:06:31] _bogus_: how can I check if my model (devise) is confirmable ?
[22:08:30] one_zero: has joined #RubyOnRails
[22:09:45] drale2k: _bogus_: confirmable or if it is confirmed?
[22:09:55] _bogus_: if its confirmable
[22:10:19] USvER: has joined #RubyOnRails
[22:10:22] _bogus_: if I have devise :confirmable on it
[22:11:15] drale2k: why not look in to the moel ?
[22:11:26] _bogus_: I need to check it on my controller
[22:11:32] drale2k: are you migrating users ?
[22:11:51] _bogus_: Im trying to use Usuario.class.devise_modules.confirmable? but this gets me an error (undefined method 'devise_modules' for Class:Class)
[22:12:01] _bogus_: no but I need to know where to redirect the user to
[22:12:46] netzfisch: has joined #RubyOnRails
[22:12:49] jenrzzz: has joined #RubyOnRails
[22:13:01] sevenseacat: has joined #RubyOnRails
[22:13:35] braincrash: has joined #RubyOnRails
[22:14:15] gavit_: has joined #RubyOnRails
[22:15:36] shamanime_: has joined #RubyOnRails
[22:15:40] _bogus_: nvm just solved it
[22:15:42] badeball: has joined #RubyOnRails
[22:16:50] xhoy: Is there a way to list all liquid methods?
[22:16:50] xhoy: I know i can get them for a single model, but not all models at once :)
[22:17:00] DylanJ: has joined #RubyOnRails
[22:17:38] akshat: has joined #RubyOnRails
[22:20:31] mrbubbles: has joined #RubyOnRails
[22:21:50] baweaver: has joined #RubyOnRails
[22:22:03] Devalo: has joined #RubyOnRails
[22:22:05] mwlang: xhoy: sounds like a rake task wanting to be written to me…if you know how to get for a single model, then loop over models and output for each.
[22:26:13] DylanJ: has joined #RubyOnRails
[22:26:32] [Tyrant]: has joined #RubyOnRails
[22:32:00] htmldrum: has joined #RubyOnRails
[22:34:11] bronson: has joined #RubyOnRails
[22:34:51] johnflux: has joined #RubyOnRails
[22:34:52] johnflux: has joined #RubyOnRails
[22:37:33] jtong_: has joined #RubyOnRails
[22:37:53] rnda: has joined #RubyOnRails
[22:38:07] aloneintheworld: has joined #RubyOnRails
[22:38:52] urunda: has joined #RubyOnRails
[22:39:21] baweaver: has joined #RubyOnRails
[22:40:36] ziyadb: has joined #RubyOnRails
[22:42:43] snockerton: has joined #RubyOnRails
[22:42:54] mrbubbles: has joined #RubyOnRails
[22:43:19] snockerton: anyone use passenger? I'm trying to figure out how to use passenger_pre_start
[22:43:36] helpa: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[22:43:51] xhoy: mwlang: yeah that was the second option :)
[22:44:22] xhoy: mwlang: thanks
[22:45:24] mwlang: Radar: I’ve been reading too much Ruby code lately… I read your response literally as “not used” …
[22:46:17] tubbo: bang used
[22:47:54] quazimodo: has joined #RubyOnRails
[22:49:44] pwnd_nsfw: I'm trying to build a scope where... it gets all the records of THAT model, with a condition of an associated model
[22:49:48] pwnd_nsfw: Please wait for gist
[22:51:08] pwnd_nsfw: https://gist.github.com/SirUncleCid/f7e74e2c2f38402becdf#file-mechanic-rb-L7
[22:51:27] pwnd_nsfw: I'm not really sure how I'd go about it, or how to word it for accurate results from SO/google
[22:51:54] pwnd_nsfw: And where I looked in the docs (yano, has_many through documentation), I could not find the asnwer I was looking for
[22:52:09] Radar: mwlang: haha :)
[22:52:28] Haydos: has joined #RubyOnRails
[22:52:34] Radar: pwnd_nsfw: I think that should work?
[22:52:48] tubbo: pwnd_nsfw: yeah like what results do you get when you do that?
[22:52:52] tubbo: looks OK to me
[22:55:03] pwnd_nsfw: one moment.... I love when I leave for whatever amount of time, and output of rspec is totally different
[22:56:12] digitalcakes: has left #RubyOnRails: ()
[22:56:30] uglybandersnatch: has joined #RubyOnRails
[22:57:49] pwnd_nsfw: Radar, tubbo: https://gist.github.com/SirUncleCid/f7e74e2c2f38402becdf
[23:00:01] wldcordeiro: has joined #RubyOnRails
[23:00:53] Radar: pwnd_nsfw: is the table called services or mechanic_services?
[23:01:10] Radar: pwnd_nsfw: The "services" part of your where clause should be the (correct) table name
[23:01:15] Radar: Not the name of the association
[23:02:09] uglybandersnatch: has joined #RubyOnRails
[23:03:03] jottr: has joined #RubyOnRails
[23:03:11] pwnd_nsfw: mechanic_services is the through table, services is the table mechanic model reaches through mechanic_services, and they're named appropriately. If you'd like to see the schema, lemme know Radar
[23:03:43] Radar: Try using a joins instead of an includes then
[23:03:46] USvER: Can someone give me a link to ActionCable documentation?
[23:04:17] USvER: Not a tutorial but api doc
[23:05:36] pwnd_nsfw: USvER, lmgtfy http://www.rubydoc.info/github/rails/actioncable/ActionCable/Channel/Base
[23:05:50] pwnd_nsfw: https://github.com/rails/rails/tree/master/actioncable
[23:06:24] USvER: pwnd_nsfw, THANK YOU!!!!!!
[23:06:34] USvER: pwnd_nsfw, <3
[23:06:54] pwnd_nsfw: USvER, literally googled "actioncable docs", for future
[23:07:12] USvER: pwnd_nsfw, i have some other google =\
[23:07:24] pwnd_nsfw: ACTION shrugs.
[23:07:38] USvER: pwnd_nsfw, tons of tutorials and bullshit
[23:07:47] USvER: pwnd_nsfw, no real info =\
[23:07:52] GragHarker: has joined #RubyOnRails
[23:12:40] pwnd_nsfw: Radar, when I do the joins, do I have to specify the table name? I see this "mechanic_services_mechanics_join", but I don't use that table
[23:13:06] Radar: pwnd_nsfw: Yeah you can specify the table name of "services"
[23:15:17] pwnd_nsfw: Radar, am I not doing that already? I'm confuzzled
[23:15:23] Radar: pwnd_nsfw: You are.
[23:15:33] Radar: I don't know why it isn't working. It's one of those things that I would need to fiddle with.
[23:16:15] jkahn: has joined #RubyOnRails
[23:16:40] DLSteve: has joined #RubyOnRails
[23:16:45] Arcaire: USvER: t b h there's no way that "actioncable docs" didn't return the rubydoc list for actioncable.
[23:16:56] Arcaire: So either you didn't search for that or you might be using Bing by mistake.
[23:17:20] tvon: has joined #RubyOnRails
[23:17:47] Arcaire: Also rubydoc.info basically has the API docs for everything including gems.
[23:18:29] intrigueD: has joined #RubyOnRails
[23:18:38] intrigueD: has joined #RubyOnRails
[23:18:59] _Tariq: has joined #RubyOnRails
[23:19:10] U7se6: has joined #RubyOnRails
[23:21:43] mrgreenfur: has joined #RubyOnRails
[23:21:47] PlasmaStar: has joined #RubyOnRails
[23:22:43] USvER: Arcaire, yeah i know... i dont have skillz =\
[23:23:33] Arcaire: Good searches and results will come to you
[23:23:33] USvER: Arcaire, rubydoc.info is now my first site too lok for
[23:23:38] Devalo: has joined #RubyOnRails
[23:23:39] Arcaire: but only if you say "thank mr gogle" in this channel
[23:24:14] timdotrb: Is it possible to store the image URL for an image uploaded through Paperclip? I’m attempting to do @user.profile.update_attribute(:image1, pic.image.url) and it’s kind of working but not
[23:24:18] _bogus_: please, Im trying to retrieve the errors for my form via json, they're being returned, but this is the response: https://gist.github.com/andreycwb/a622aac4f0520c23b86c , I actually have 4 objects in my form (Mapa has_many Personas), two of them have invalid fields, but I'm getting only one error, and getting no object index, how can I retrieve this? (the html response is working fine)
[23:25:18] nfk: has joined #RubyOnRails
[23:25:21] timdotrb: At first I get something like “/system/images/blah//foo.jpg”, but then when I look up the user afterwards, @user.profile.image1 is "#<ActionDispatch::Http::UploadedFile:0x007fbb3410e068>"
[23:25:31] eyeamaye: has joined #RubyOnRails
[23:25:51] incognito: has joined #RubyOnRails
[23:25:57] Arcaire: Let's walk through the steps here, tim.
[23:26:07] Arcaire: @user.profile.image1 is what type of 'object'?
[23:26:18] Arcaire: In quotes, because I'm not talking about the rails object. I'm talking about what it actually represents.
[23:29:08] sondnm: has joined #RubyOnRails
[23:33:06] wldcordeiro: has joined #RubyOnRails
[23:33:16] jottr: has joined #RubyOnRails
[23:34:55] timdotrb: Arcaire: @user.profile.image1 is an attribute of an object
[23:35:08] timdotrb: It is declared as a string
[23:35:44] Arcaire: specifically
[23:35:54] Arcaire: it's only a string because of how you output it
[23:35:59] Arcaire: image1 is, well, an image
[23:36:07] Arcaire: you're after an attribute of that image, specifically, the path.
[23:36:12] Arcaire: [ hinting intensifies ]
[23:36:37] Radar: what even is pic.image?
[23:36:45] Radar: ACTION would like to see more context
[23:36:49] sevenseacat: (what is this i dont even)
[23:37:04] Radar: can even the wasing of the doing?
[23:37:10] sevenseacat: how is babby formed?
[23:37:17] Radar: ACTION asks wife
[23:37:46] Radar: If last night is anything to go by, the baby grows larger the more the mother complains :P
[23:37:54] _bogus_: please how can I create a custom json output for form errors? containing field's name, object index for nested fields, and full message
[23:38:39] Radar: _bogus_: HINT: https://gist.github.com/andreycwb/a622aac4f0520c23b86c#file-mapas_controller-rb-L26 You should iterate through all the objects and combine their errors, rather than just iterating through @mapa's errors.
[23:39:53] sevenseacat: Radar: chin up, it's only for a few more months, then the real work starts :P
[23:40:24] timdotrb: Arcaire: image1 shouldn’t be an image, though.. :| but you’re saying I want pic.image.path instead of pic.image.url ?
[23:40:25] timdotrb: https://gist.github.com/willc0de4food/3c91ecefdf4d0ac13333
[23:40:35] timdotrb: Radar: ^ more context
[23:40:47] Arcaire: >image1 shouldn't be an image
[23:41:22] Radar: I am still shocked that people have Profile models detached from User models. It's like you're trying to make life difficult for yourself _intentionally_.
[23:41:34] gbgdev: has joined #RubyOnRails
[23:41:37] Radar: "But it's denormalised" you say. Yes, it is. It's also twice as complex than it needs to be.
[23:41:51] Arcaire: Users 1tm Profile
[23:41:54] Radar: ACTION should just write this up and link to the blog post each time someone does it.
[23:41:56] _bogus_: Radar, thanks, ill try that
[23:41:57] Arcaire: s/Users/User/
[23:42:43] Radar: timdotrb: What is `url` in this case when it arrives at `update_profile_image`? You've got a byebug in there so you should be able to tell us the value.
[23:43:06] timdotrb: Radar: "/system/photos/images/000/000/004/original/RackMultipart20160316-3335-gw477d.jpg?1458170544"
[23:43:19] Radar: timdotrb: Ok, so what's the exact problem then?
[23:43:24] sevenseacat: I've seen way too many apps that do the user/profile separation. the rationale is usually 'omg user is a devise thing, we cant touch that'
[23:43:28] timdotrb: Radar: irb(main):028:0> u.profile.image1
[23:43:28] timdotrb: => "#<ActionDispatch::Http::UploadedFile:0x007fbb3410e068>"
[23:43:35] Arcaire: u.profile.image1.url
[23:43:37] sevenseacat: thats totally incorrect
[23:43:45] sevenseacat: you're saving an object in a string field
[23:43:56] Arcaire: i didn't see the quotes
[23:43:58] Radar: sevenseacat: point to the line
[23:44:01] Arcaire: I'm surprised that even worked.
[23:44:06] Radar: I can't see it.
[23:44:20] Arcaire: it's not the object, it's the path.
[23:44:21] Radar: Arcaire: using pic.image.url
[23:44:32] Radar: which won't return an UploadedFile object. `params[:image]` might do that.
[23:44:37] sevenseacat: well if "#<ActionDispatch::Http::UploadedFile:0x007fbb3410e068>" is whats coming out of the db, thats wrong
[23:44:47] Radar: timdotrb: What is `slot` when you're in that method?
[23:44:58] timdotrb: either 1, 2, 3 or 4
[23:45:07] Radar: timdotrb: In this one particular case that you're testing though?
[23:45:24] Arcaire: It'll be 1, based off this code.
[23:45:37] Radar: timdotrb: Ok, next question: what is @user.profile at this current point in time?
[23:45:48] triptec: has joined #RubyOnRails
[23:46:04] Radar: timdotrb: mainly interested in the ID
[23:46:51] timdotrb: Radar: profile ID is 2
[23:47:01] Radar: timdotrb: and in the console, is that ID the same for u.pro0file?
[23:47:08] Radar: dunno where the 0 came from but you can have it for free
[23:47:19] timdotrb: Yes, it’s the same
[23:47:20] n008f4g_: has joined #RubyOnRails
[23:47:35] timdotrb: Where I’m at in the debugger, this is profile:https://gist.github.com/willc0de4food/47338ccb097f344f6489
[23:47:35] Radar: u.profile.reload.image1 shows the UploadedFile, or the URL?
[23:47:56] Radar: What is the problem
[23:48:07] P4Titan: has joined #RubyOnRails
[23:48:18] timdotrb: When I continue, it changes
[23:48:21] timdotrb: And it’s no longer the URL
[23:48:46] timdotrb: It’s somehow transformed into "#<ActionDispatch::Http::UploadedFile:0x007fbb50467680>"
[23:48:51] Radar: timdotrb: So if you're to do Profile.find(2).image1 now in a new rails console session, what does it say?
[23:48:55] timdotrb: This is the part that baffles me
[23:49:11] timdotrb: irb(main):033:0> Profile.find(2).image1
[23:49:12] timdotrb: Profile Load (4.4ms) SELECT `profiles`.* FROM `profiles` WHERE `profiles`.`id` = 2 LIMIT 1
[23:49:13] timdotrb: => "#<ActionDispatch::Http::UploadedFile:0x007fbb50467680>"
[23:49:28] htmldrum: has joined #RubyOnRails
[23:49:42] timdotrb: ACTION facedesk
[23:49:55] Radar: Can you show me the logs for that action?
[23:50:21] Arcaire: I feel like we might be missing some code in those gists.
[23:50:33] Arcaire: The only thing that modifies that attribute only uses the path.
[23:51:11] Radar: Tempted to say "steps to reproduce in a new app" but I'm not feeling like that much of an asshole today.
[23:52:24] timdotrb: ooooooooooooh
[23:52:54] timdotrb: I’m doing 2 separate calls to update the user’s profile. Therein lies the problem
[23:53:02] pwnd_nsfw: Radar, joins(:mechanic_services => :service).where(services: { name: service} ).all, this works :)
[23:53:18] pwnd_nsfw: have to specify both the join table, and the table you're trying to reference in the joins call
[23:53:22] Radar: pwnd_nsfw: ah :) I was thinking that it had already pulled in that second table. My bad.
[23:53:29] deweysdecimal: has joined #RubyOnRails
[23:53:32] Radar: timdotrb: that would do it.
[23:53:35] timdotrb: One call handles the images, the next simply updates the profile with the profile_params
[23:53:37] pwnd_nsfw: No worries! Thanks for your help man, as always
[23:53:39] deweysdecimal: has left #RubyOnRails: ()
[23:53:49] timdotrb: so params[:image1] is the file -.-
[23:53:54] Pathfinder: has joined #RubyOnRails
[23:56:39] roshanavand: has joined #RubyOnRails
[23:57:38] tomatoes: has joined #RubyOnRails
[23:57:48] pawnbox: has joined #RubyOnRails
[23:58:27] _bogus_: Radar, i can iterate through errors tho if I have many nested forms, I cant get the specific object's field with error :/
[23:58:39] mattwithoos: has joined #RubyOnRails
[23:58:44] Ropeney: has joined #RubyOnRails
[23:58:51] mattwithoos: has joined #RubyOnRails
[23:59:43] OpCuzao: has joined #RubyOnRails