« Back to channel list

#RubyOnRails - 14 January 2016

« Back 1 day Forward 1 day »
[00:01:23] sankaber: has joined #RubyOnRails
[00:02:08] KazW: has joined #RubyOnRails
[00:02:18] felixdd: has joined #RubyOnRails
[00:02:50] moei: has joined #RubyOnRails
[00:03:22] mices: trying to get mailboxer "working" https://gist.github.com/mices/a62a986fb54fe1ee036d
[00:03:56] paulodiniz: northfurr: responded in your gist
[00:04:09] Radar: dopie: macro? VBA?
[00:04:23] Radar: dopie: is that code all the content in spec/support/macros?
[00:04:33] pyemkey: has joined #RubyOnRails
[00:04:50] Radar: dopie: https://gist.github.com/staycreativedesign/200b0cb704a0e672fbed#file-rails_helper-rb-L24 this line should be uncommented
[00:05:51] Radar: dopie: https://gist.github.com/radar/e20e3643d8627b21a4df Your file should also be named more descriptively, and I've updated it to have the correct syntax for making helpers available to tests.
[00:09:23] stannard: has joined #RubyOnRails
[00:09:28] dopie: has joined #RubyOnRails
[00:09:56] nerfando: has joined #RubyOnRails
[00:10:07] scrndddy: has joined #RubyOnRails
[00:10:22] scrndddy: hey anyone out there used grape for an api without using full rails?
[00:11:05] nerfando: has joined #RubyOnRails
[00:11:45] mustmodify: has left #RubyOnRails: ()
[00:12:17] nerfando: has joined #RubyOnRails
[00:12:21] Radar: scrndddy: yeah and I hated my life for those couple of weeks
[00:12:30] Radar: scrndddy: rebuilt the whole thing using standard Rails controllers and then the sun came out
[00:13:03] scrndddy: uh oh really?
[00:13:10] scrndddy: what did you feel like you were missing?
[00:13:20] guacamole: has joined #RubyOnRails
[00:13:25] Radar: Grape doesn't do error handling in a neat way.
[00:14:49] scrndddy: rails 5 api support looks promising
[00:14:51] jgt1: has joined #RubyOnRails
[00:15:05] sarink: has joined #RubyOnRails
[00:15:16] scrndddy: i've also been looking at node/hapi for the reasons that i'm a little more comfortable in js than ruby and also concerned about scaling
[00:16:16] scrndddy: but so far everything i've read points to me being able to hire a full team and never code again if i ever get to the point of needing to scale rails non-trivially
[00:17:17] Radar: Plenty of Rails devs out there :)
[00:17:25] Radar: I haven't got any experience with Rails 5's API stuff yet.
[00:17:50] Radar: What I've been toying around with is building an API in Elixir's Phoenix framework and I like that too.
[00:17:59] scrndddy: it seems to just be the rails-api gem integrated + some generators that leave out views
[00:18:01] Radar: Way more comfortable over in Rails-land so I'm sticking with that for the time being.
[00:18:29] scrndddy: can i have your biased opinion on node?
[00:19:31] scrndddy: it's hard to ignore how hot it is right now, and i also do mostly front-end stuff already for work. but you also can't ignore how much more elegant ruby is than js
[00:19:37] borodin: Radar, is Elixir an abstraction of Erlang? Like Coffeescript => Javascript?
[00:19:46] Radar: It's great that some teenagers decided to see if it was possible to run JS on the server side, but play time's over. Let the real languages on the server please.
[00:20:22] Radar: borodin: It's built on top of the Erlang VM, if that's what you're asking?
[00:21:02] dopie: hey Radar
[00:21:12] dopie: how goe0s there
[00:21:15] Radar: scrndddy: My absolute least favourite part of NPM is the indeterminate builds between machines. I can run "npm install" on my machine and get different packages to my colleague.
[00:21:28] borodin: I noticed that - just wondering what it's relationship is to Erlang. I also notice mention of OTP with Elixir same as I used to hear with Erlang
[00:21:31] shibabu: has joined #RubyOnRails
[00:21:34] Radar: scrndddy: Real languages (Ruby, Go, Elixir, etc.) don't do that kind of shit. Reproducible builds are so important to any production-ready system.
[00:21:55] KazW: has joined #RubyOnRails
[00:22:19] Radar: borodin: I'm not too sure. You'll have to ask in #elixir-lang for that.
[00:22:36] superlou: has joined #RubyOnRails
[00:22:40] northfurr: paulodiniz: think I???m having trouble because I???m trying to pass it to a modal actually, which is a partial
[00:22:47] Radar: borodin: Similar kind of relationship between Elixir -> Erlang as Ruby -> C.
[00:22:51] hannelita: has joined #RubyOnRails
[00:23:06] Radar: dopie: Did you see my answers to your question?
[00:23:51] Radar: scrndddy: ALSO: when the answer is 'just run rm -rf node_modules; npm install and everything should be fine' you know it's all screwed up and should be burned to the ground.
[00:24:01] Radar: scrndddy: The ground then should be salted, dug up, and salted again.
[00:24:18] scrndddy: Radar: i can't tell you how many times i've done that before
[00:24:39] Radar: I'd be v. happy with Node-in-general if NPM acted more like Bundler and less like a chaotic monkey.
[00:24:51] rakm: what's the latest hot way of keeping a continuous test runner with rspec? e.g. spring/zeus + guard combinations? I'm trying different combinations, but wondering if there's a recommended/definitely working combination
[00:25:23] Radar: rakm: I'm finding success with zeus. I just run the tests manually through that. If I had to use an auto runner then it'd be guard.
[00:26:05] rakm: Radar with rspec 2 or 3? i always run into problems with rspec 3's separation of spec_helper and rails_helper
[00:26:17] Radar: rakm: With zeus, you mean?
[00:26:29] rakm: well, zeus + guard
[00:26:35] Radar: You need to require rspec/core in spec_helper iirc.
[00:26:54] rakm: ah ok, i'm requireing rspec/rails and it produces another set of dependency problems
[00:26:59] rakm: i'll try core
[00:27:01] borodin: Ruby and C huh - oh I get it that changes everything. I assume Elixir is functional. I might have to check it out
[00:27:18] ArTiSTiX: has joined #RubyOnRails
[00:28:06] FooMunki: has left #RubyOnRails: ()
[00:28:20] rakm: nice, rspec/core seems much better and running without zeus/guard also works with this
[00:28:21] rakm: thanks Radar
[00:29:41] rakm: on a separate note, does anyone know if rails 5 --api has any plans of treating api documentation as a first class citizen?
[00:29:45] guacamole: has joined #RubyOnRails
[00:29:59] rakm: e.g. having some built in way to generate api docs
[00:30:08] chipotle: has joined #RubyOnRails
[00:30:13] SteenJobs: has joined #RubyOnRails
[00:30:44] rakm: we're using grape-swagger on top of rails pretty much for documentation autogeneration. in rails 4 it made sense to use a 3rd party solution, but with --api flag, i wonder if it should be built in
[00:30:59] one_zero: has joined #RubyOnRails
[00:31:42] dopie: Radar: I did not i had to restart
[00:31:55] Radar: dopie: Great so how do I know that you won't restart again?
[00:32:07] dopie: Because I won't
[00:32:16] Radar: http://logs.ryanbigg.com/RubyOnRails?date=2016-01-14#4959628
[00:33:13] steharro: has joined #RubyOnRails
[00:33:26] DLSteve: has joined #RubyOnRails
[00:34:14] FailBit: ACTION repairs monitor
[00:34:30] FailBit: da de da da da, da da daaa da da
[00:34:39] FailBit: hmm mm hmm mmm, mmm, mm mm
[00:35:06] Radar: FailBit: catchy
[00:35:20] FailBit: queen - don't stop me now
[00:35:27] Radar: Yeah I know it.
[00:36:47] guacamole: has joined #RubyOnRails
[00:37:18] Axsuul: has joined #RubyOnRails
[00:39:46] dopie: has joined #RubyOnRails
[00:43:23] sankaber: has joined #RubyOnRails
[00:43:39] LambdaSource: has joined #RubyOnRails
[00:44:23] guacamole: has joined #RubyOnRails
[00:44:36] scrndddy: hey guys, one more question. i'm very used to node's non-blocking design. what do you do when you have a little more than basic db crud operations in a request? i will have to make a few external api calls to properly handle a given request. is all that blocking going to destroy performance?
[00:47:11] smathy: scrndddy, !activejob - very easy to move processing to async queue.
[00:47:11] helpa: scrndddy: http://guides.rubyonrails.org/active_job_basics.html
[00:47:52] d0nn1e: has joined #RubyOnRails
[00:48:15] LambdaSource: has joined #RubyOnRails
[00:49:01] scrndddy: ah, so basically any api call i make should be done by a worker?
[00:49:37] LambdaSource: has joined #RubyOnRails
[00:49:50] matthewd: rakm: Nope. --api basically just turns a bunch of things off.
[00:50:37] smathy: scrndddy, well anything that you don't care about the response of before responding to the browser - which would be the analogous situation to non-blocking node.
[00:50:39] SteenJobs_: has joined #RubyOnRails
[00:50:50] jnj: has joined #RubyOnRails
[00:51:31] mices: oh wow i got mailboxer working
[00:52:30] scrndddy: sounds good, thanks smathy
[00:53:39] smathy: scrndddy, you're welcome.
[00:55:07] KazW: has joined #RubyOnRails
[00:55:08] maxx88: has joined #RubyOnRails
[00:55:30] antgel: has joined #RubyOnRails
[00:55:41] edj: has joined #RubyOnRails
[00:56:18] Guest81471: so im going through the rails tutorial and i tried to make a new user and it just listed abunch of files
[00:56:46] LambdaSource: has joined #RubyOnRails
[00:57:12] kfrz: has joined #RubyOnRails
[00:57:13] LambdaSource: has joined #RubyOnRails
[00:57:28] atomical: has joined #RubyOnRails
[00:57:46] crdpink: has joined #RubyOnRails
[00:58:19] KazW: has joined #RubyOnRails
[00:58:32] Limix: has joined #RubyOnRails
[00:58:44] dopie: Radar: im still getting the error
[00:58:45] dopie: https://gist.github.com/staycreativedesign/1d78df41a9a5c65ef84f
[00:58:59] dopie: here is a more long error
[00:59:04] dopie: im running zeus
[00:59:13] dopie: if that matters
[01:01:27] dopie: I dont have a spec_helper but im using rails_helper
[01:01:44] KazW: has joined #RubyOnRails
[01:01:45] LambdaSource: has joined #RubyOnRails
[01:02:08] rhizome: does Fabricate save automatically or something?
[01:04:56] dopie: It should
[01:05:07] dopie: I cannot answer that question
[01:05:16] LambdaSource: has joined #RubyOnRails
[01:05:27] arBmind1: has joined #RubyOnRails
[01:05:52] bricker: dopie: drop in a debugger before the failing line, and start debugging
[01:06:00] sevenseacat: has joined #RubyOnRails
[01:06:27] bronson: has joined #RubyOnRails
[01:07:53] ArTiSTiX: has joined #RubyOnRails
[01:07:59] Guest11: has joined #RubyOnRails
[01:08:00] Guest11_: has joined #RubyOnRails
[01:08:01] bronson: has joined #RubyOnRails
[01:08:59] dopie: ok I drop a debugger , fabricate creates the user
[01:09:09] dopie: and jim is assigned to the user
[01:09:52] bricker: put the debugger in the controller
[01:09:54] scrndddy: if my app is mostly focused on the api, but i still would like to have a front-end interface to that api on top of people calling it from within their backend apps, do i really need to separate that out? is it a bad idea to mix views and api code?
[01:10:03] bricker: check what users actually exist in the database
[01:10:13] bricker: and if it matches the user you created with Fabricator
[01:11:10] dstarh: has joined #RubyOnRails
[01:12:55] LambdaSource: has joined #RubyOnRails
[01:12:56] brycesenz: has joined #RubyOnRails
[01:14:18] KnownSyntax: has joined #RubyOnRails
[01:14:20] KnownSyntax: has joined #RubyOnRails
[01:18:05] baweaver: has joined #RubyOnRails
[01:18:31] optobear: has joined #RubyOnRails
[01:19:53] SteenJobs: has joined #RubyOnRails
[01:20:38] threeminutemonta: has joined #RubyOnRails
[01:21:38] smathy: Guest81471, you have an error on line 42.
[01:22:34] Guest81471: is testing worth it?
[01:22:43] Guest81471: do you still get bugs when you test?
[01:22:47] smathy: Guest81471, is anything worth it really?
[01:23:16] Guest81471: i guess that depends on if we live in a multiverse or not
[01:23:31] Guest81471: and on if we could get to another universe
[01:23:32] smathy: Guest81471, so true, probably another you is testing somewhere.
[01:23:37] mary5030: has joined #RubyOnRails
[01:23:47] Guest81471: you think hes running into less bugs ?
[01:24:02] smathy: Guest81471, I think he's finding them quicker.
[01:24:45] Guest81471: and when they dont pile up its easier to fix them
[01:24:55] smathy: Guest81471, and no, I don't get bugs anymore, I just write the code and ship it without ever trying the app. In fact, I don't even use a computer anymore.
[01:25:47] Guest81471: you just write it on paper and give it to your assistant because you've taken your caveman diet to the extreme
[01:26:28] mchu: has joined #RubyOnRails
[01:26:38] bronson: you just think about it. once you've thought of everything, there's no point to doing it.
[01:26:40] Guest81471: you write in animal blood on papyrus
[01:26:59] Guest81471: bronson: testing?
[01:27:19] bronson: yea, but really everything.
[01:27:34] Guest81471: thats what i was thinking but i thought it might be benificial as a begininer
[01:27:48] Guest81471: bronson: are you being philosophical ?
[01:28:03] bronson: since I can't think of everything, I write tests.
[01:28:08] happygilmoregent: has joined #RubyOnRails
[01:28:22] bronson: a chessmaster working alone might get away with it.
[01:29:07] Guest81471: with not testing?
[01:29:16] happygilmoregent: anyone know a great site to help with learning routing
[01:29:34] Pazician: has joined #RubyOnRails
[01:29:48] tvw: has joined #RubyOnRails
[01:30:09] bronson: right, someone who can think nine moves ahead with 20 moving parts. maybe. depends on the app.
[01:30:17] bronson: happygilmoregent: you read the guide?
[01:30:30] happygilmoregent: rubyonrails.org?
[01:30:56] guacamole: has joined #RubyOnRails
[01:30:56] Guest81471: all i do is think ahead but i don't know how all the parts work yet
[01:31:16] Guest81471: will some feautures cause others to brake?
[01:31:19] bronson: consider testing
[01:31:27] bronson: happygilmoregent: google 'rails routing'
[01:31:35] Guest81471: ill restart the tutorial and do the testing
[01:31:48] Guest81471: thank you bronson
[01:32:03] bronson: right on. it's frustrating at first but it'll save you time in the long run.
[01:32:12] bronson: especially if you're working on a team.
[01:32:51] mrbubbles: has joined #RubyOnRails
[01:34:38] guacamole: has joined #RubyOnRails
[01:34:41] atian: has joined #RubyOnRails
[01:34:43] Oog: has joined #RubyOnRails
[01:37:12] tvw: has joined #RubyOnRails
[01:38:48] bronson: putting 'resources :contacts' in my non-rails-api routes.rb gives me #new and #edit as well.
[01:39:14] bronson: is there any smarter way of fixing this other than resources :contacts, except: [:new, :edit]
[01:39:29] bronson: since my api doesn't need those actions
[01:40:13] bronson: just scattering 'except: [:new, :edit]' throughout my routes.rb
[01:40:29] matthewd: bronson: `scope(except: [:new, edit]) do` might help?
[01:40:43] bronson: matthewd: good call
[01:41:30] bronson: oo, namespace takes it too
[01:41:41] bronson: namespace :data, except: [:new, :edit] do ... end
[01:41:52] FailBit: namespace doesn't take except params, does it?
[01:42:07] bronson: it appears to, might be a rails5 thing
[01:42:29] lexiMon: has joined #RubyOnRails
[01:42:29] matthewd: I could believe it.. namespace(x) is just scope(something: x) anyway
[01:42:56] bronson: like it, thanks matthewd
[01:47:16] _Tariq: has joined #RubyOnRails
[01:47:45] brycesenz: has joined #RubyOnRails
[01:48:00] scrndddy: is there a practical way to mix api calls and views in the same controller? or is that something i should be avoiding?
[01:50:17] ss_much: has joined #RubyOnRails
[01:51:25] B1n4r10: has joined #RubyOnRails
[01:52:03] lexileo: has joined #RubyOnRails
[01:53:27] myntcake: has joined #RubyOnRails
[01:53:50] flappynerd: has joined #RubyOnRails
[01:56:30] threeminutemonta: has joined #RubyOnRails
[01:57:14] markh: has joined #RubyOnRails
[01:59:14] guacamole: has joined #RubyOnRails
[02:01:41] nerium: has left #RubyOnRails: ()
[02:02:32] sankaber: has joined #RubyOnRails
[02:03:45] rogue_koder: has joined #RubyOnRails
[02:07:09] guacamole: has joined #RubyOnRails
[02:09:46] renanoronfle: has joined #RubyOnRails
[02:09:49] speakingcode: has joined #RubyOnRails
[02:09:50] johnflux_: has joined #RubyOnRails
[02:09:51] johnflux_: has joined #RubyOnRails
[02:12:08] bricker: has joined #RubyOnRails
[02:13:44] djbkd_: has joined #RubyOnRails
[02:16:18] SteenJobs: has joined #RubyOnRails
[02:16:38] roshanavand: has joined #RubyOnRails
[02:16:42] Puffball: has joined #RubyOnRails
[02:17:16] ebbflowgo: has joined #RubyOnRails
[02:19:17] LambdaSource: has joined #RubyOnRails
[02:19:29] crankharder: has joined #RubyOnRails
[02:20:04] dextertzu: has joined #RubyOnRails
[02:21:56] shibabu: has joined #RubyOnRails
[02:22:46] Sawbones: has joined #RubyOnRails
[02:22:54] aloneintheworld: has joined #RubyOnRails
[02:23:50] barendt: has joined #RubyOnRails
[02:24:14] Rodya_: has joined #RubyOnRails
[02:24:19] aswinramakrish: has joined #RubyOnRails
[02:25:02] aswinramakrish: has left #RubyOnRails: ()
[02:25:10] renanoronfle: hi all, anyone can help me with tips how i can contribute with rails? any tips?
[02:27:01] mary5030_: has joined #RubyOnRails
[02:27:56] SteenJobs: has joined #RubyOnRails
[02:29:04] voidDotClass: has joined #RubyOnRails
[02:29:06] Radar: renanoronfle: hey, welcome :)
[02:29:15] Radar: renanoronfle: best way is as detailed in the contributing guide here: http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#helping-to-resolve-existing-issues
[02:29:18] voidDotClass: How do you pass the heroku db credentials into database.yml?
[02:29:23] Radar: voidDotClass: !xy
[02:29:23] helpa: voidDotClass: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[02:29:49] edwinvdgraaf: has joined #RubyOnRails
[02:30:13] voidDotClass: i'm trying to deploy a rails app to heroku, it works but the db is not setup, when i ran heroku run rake db:setup i got a db access error
[02:30:28] voidDotClass: so i checked database.yml and it doesnt contain the db creds for production
[02:30:40] sevenseacat: its not supposed to
[02:30:48] voidDotClass: even though the db error says the heroku db host and username
[02:30:56] voidDotClass: then how does it get that?
[02:32:03] SteenJobs: has joined #RubyOnRails
[02:32:36] voidDotClass: ah so i only have to run db:migrate, not db:setup
[02:32:45] edj979: has joined #RubyOnRails
[02:32:46] voidDotClass: but i'm still curious how rails accesses the heroku db creds?
[02:33:20] lemur: has joined #RubyOnRails
[02:33:30] rhizome: i think i've seen that there's a heroku command to set your creds in the environment
[02:33:39] Bloomer: has joined #RubyOnRails
[02:33:45] edj979: why does everything in the console seem so irreversable?
[02:34:03] rhizome: because it doesn't pop up a green flash message
[02:34:21] SteenJobs: has joined #RubyOnRails
[02:34:26] rhizome: plus, a lot of things at the console *are* irreversible
[02:34:42] sevenseacat: unless you open it in sandbox mode
[02:34:50] renanoronfle: Radar, i read and use rails-box to configure an run all test, some test is broken, why?
[02:35:14] Vintila: has joined #RubyOnRails
[02:35:14] rhizome: i don't know what that is
[02:36:26] hannelita: has joined #RubyOnRails
[02:37:34] Limix: has joined #RubyOnRails
[02:38:01] DLSteve: has joined #RubyOnRails
[02:38:13] Radar: renanoronfle: I am not sure, sorry.
[02:39:51] hahuang65: has joined #RubyOnRails
[02:40:23] twilling: has joined #RubyOnRails
[02:40:59] hahuang65: has joined #RubyOnRails
[02:41:27] hahuang65: has joined #RubyOnRails
[02:43:41] gbgdev: has joined #RubyOnRails
[02:46:02] tvw: has joined #RubyOnRails
[02:48:53] northfurr: has joined #RubyOnRails
[02:49:50] AnoHito_: has joined #RubyOnRails
[02:49:52] kuroro2: has joined #RubyOnRails
[02:50:07] twilling_: has joined #RubyOnRails
[02:50:12] D9: has joined #RubyOnRails
[02:50:26] _djbkd: has joined #RubyOnRails
[02:50:43] LambdaSo_: has joined #RubyOnRails
[02:51:38] arBmind: has joined #RubyOnRails
[02:51:43] voidDotClass: how do you set the forever cache header for assets sent by the pipeline?
[02:52:10] Hans267_: has joined #RubyOnRails
[02:52:35] mayamai: has joined #RubyOnRails
[02:52:40] jtoy: has joined #RubyOnRails
[02:52:41] Wobni: has joined #RubyOnRails
[02:52:56] eisi: has joined #RubyOnRails
[02:53:23] TheDracle: has joined #RubyOnRails
[02:53:23] james_woods: has joined #RubyOnRails
[02:53:23] D9: has joined #RubyOnRails
[02:53:24] mices: has joined #RubyOnRails
[02:53:24] mc_fail: has joined #RubyOnRails
[02:53:25] machuga_: has joined #RubyOnRails
[02:53:26] cfloare: has joined #RubyOnRails
[02:53:28] shaman42: has joined #RubyOnRails
[02:53:28] atomical_: has joined #RubyOnRails
[02:53:37] lethjakman: has joined #RubyOnRails
[02:53:39] tw1sted: has joined #RubyOnRails
[02:53:39] D9: has joined #RubyOnRails
[02:53:51] _fortis: has joined #RubyOnRails
[02:53:58] brahman: has joined #RubyOnRails
[02:53:58] brahman: has joined #RubyOnRails
[02:53:58] pragmatism: has joined #RubyOnRails
[02:54:03] hypnosb: has joined #RubyOnRails
[02:54:06] tbuehlmann: has joined #RubyOnRails
[02:54:12] kadoppe: has joined #RubyOnRails
[02:54:18] yfeldblum: has joined #RubyOnRails
[02:54:19] D9: has joined #RubyOnRails
[02:54:53] D9: has joined #RubyOnRails
[02:56:39] xardion_: has joined #RubyOnRails
[02:56:51] bricker: has joined #RubyOnRails
[02:57:28] Radar: voidDotClass: That's a webserver question, I reckon.
[02:58:53] LambdaSource: has joined #RubyOnRails
[03:00:28] mostlybadfly: has joined #RubyOnRails
[03:01:09] rakm: has joined #RubyOnRails
[03:04:46] pawnbox: has joined #RubyOnRails
[03:06:36] brycesenz: has joined #RubyOnRails
[03:07:58] DEA7TH: Why doesn't this work? expect(page).not_to have_field('Name', with: '')
[03:08:17] DEA7TH: I've confirmed that click_button creates a record with name of size 0
[03:08:33] DEA7TH: also, expect(page).not_to have_field('Name') works fine
[03:08:37] sevenseacat: dammit helpa.
[03:09:04] DEA7TH: Is my syntax wrong or something? Is that how I'm supposed to check for an empty field
[03:09:13] SteenJobs: has joined #RubyOnRails
[03:09:16] sevenseacat: DEA7TH: !debug
[03:09:16] helpa: DEA7TH: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[03:09:51] edj979: has left #RubyOnRails: ()
[03:10:03] bronson: has joined #RubyOnRails
[03:11:59] kfrz: has joined #RubyOnRails
[03:12:51] rakm: has joined #RubyOnRails
[03:13:17] mayamai: has left #RubyOnRails: ()
[03:13:17] mayamai: has joined #RubyOnRails
[03:14:33] smathy: has joined #RubyOnRails
[03:16:19] ebbflowgo: has joined #RubyOnRails
[03:16:25] DEA7TH: This should be enough. https://gist.github.com/VelizarHristov/f92ae4c6b75acd31a46d
[03:16:34] LambdaSource: has joined #RubyOnRails
[03:16:38] DEA7TH: My question is: is the code in spec.rb behaving normally?
[03:17:07] DEA7TH: Because `expect(page).to have_field('Name', with: '')` was supposed to return true in that scenario, at least according to something from 2013.
[03:17:19] sevenseacat: DEA7TH: so whats the error? :/
[03:17:35] DEA7TH: sevenseacat: the expect fails. But the field is not filled in.
[03:18:13] sevenseacat: and what says thats supposed to work?
[03:18:20] hahuang61: has joined #RubyOnRails
[03:18:45] DEA7TH: https://groups.google.com/forum/#!topic/ruby-capybara/26rFW0U0db8
[03:18:54] DEA7TH: The first post after the OP.
[03:19:12] DEA7TH: Also the reply to it which says it worked for that person.
[03:19:37] atomical: has joined #RubyOnRails
[03:19:43] sevenseacat: 2013... interesting
[03:21:04] SteenJobs: has joined #RubyOnRails
[03:21:37] sevenseacat: that should apparently work. seeing the page its working on, and the actual error, would probably help in debugging it.
[03:21:46] seaworthy: has joined #RubyOnRails
[03:21:46] seaworthy: has joined #RubyOnRails
[03:23:02] seaworthy: is there a way to stop the fixtures populating the db when i run the test? i need to test the registration method
[03:25:28] _Tariq: has joined #RubyOnRails
[03:25:31] sevenseacat: seaworthy: and why can't you?
[03:25:33] sevenseacat: meh, they left
[03:25:43] Sawbones: has joined #RubyOnRails
[03:26:04] fixture: everytime i run the test, it puts the data into the db
[03:26:05] sevenseacat: fixture: whats stopping you testing 'the registration method', whatever that means?
[03:26:09] SteenJobs: has joined #RubyOnRails
[03:26:18] fixture: and says username allready in db
[03:26:24] sevenseacat: use a different username?
[03:27:00] sevenseacat: it wasnt a yes/no question
[03:27:09] fixture: the fuq it was?
[03:27:37] joshkovach: has joined #RubyOnRails
[03:27:41] DEA7TH: There you go: https://gist.github.com/VelizarHristov/f061ce89214a122ca64d
[03:28:37] fixture: i have a fixture with user data, i am trying to set up an integration test with with data, register this data in a form, but it already has that data loaded
[03:28:43] DEA7TH: also all JS shouldn't activate for this page, but my spec is with JS disabled anyway
[03:28:45] fixture: is there a way to stop that from happening
[03:29:03] sevenseacat: fixture: no. use a different username.
[03:29:31] fixture: how do i do a true end to end then?
[03:29:59] droptone: Question: I'm attempting to add an "update your email and password" form in a preexisting view on a legacy Rails 3.2 project using Devise.
[03:30:16] fixture: the problem is that when i refisted the user i have salt being generated
[03:30:21] droptone: I'm having trouble, I created a seperate form, I created the route, I creatd the controller logic that updates the password and password_confirmation, then saves the user.
[03:30:31] fixture: so to test loggin i have to store salt in the fixture
[03:30:34] Pazician: has joined #RubyOnRails
[03:30:38] sevenseacat: fixture: what? why?
[03:30:42] droptone: The problem is, and I figure this is a security measure, but when it attempts to update the password in the controller action the DB rolls back
[03:30:56] sevenseacat: a true end to end test will enter the username and password in the form. the salt is irrelevant.
[03:31:20] sevenseacat: so many questions providing so little context or relevant information
[03:32:28] sevenseacat: DEA7TH: it appears its failing because your HTML has no generated `value` attribute for the input
[03:32:44] droptone: Assuming that comment is in reference to my question, what further information or context is required?
[03:32:55] krz: has joined #RubyOnRails
[03:33:02] DEA7TH: sevenseacat: ah, I suspected that.
[03:33:05] sevenseacat: droptone: !debug
[03:33:05] helpa: droptone: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[03:33:16] atomical_: has joined #RubyOnRails
[03:33:21] droptone: The customer has requested I add a password update form to this specific view, normally I simply kick the user over the the default Devise registrations edit view and it works fine.
[03:33:23] DEA7TH: Any ideas to test whether it's empty anyway? otherwise I'd just leave it
[03:33:34] sevenseacat: DEA7TH: it's not something I'd bother testing tbh.
[03:33:44] DEA7TH: fair enough
[03:34:02] droptone: Death: your name is dramatic and reminds me of a kid who was in the group "TiKT" in the mid 90s.
[03:34:20] DEA7TH: if the page loads, everything is probably working
[03:34:24] sevenseacat: droptone: to fix your problem, we dont need the story of your app, we need to see some actual code and information.
[03:35:18] DEA7TH: droptone: heh, a bit too dramatic for my taste and I consider changing it to ProbabilityDist. because probability distributions are awesome
[03:35:18] droptone: Question 1: Is updating a password and password_confirmation field in a controller (taken from parameters), then saving the user to commit that information to DB, normally restricted behavior?
[03:36:01] sevenseacat: droptone: no.
[03:36:34] Rodya_: has joined #RubyOnRails
[03:37:00] hannelita: has joined #RubyOnRails
[03:39:01] fixture: sevenseacat: the context is this my database does not store passwords but stores hashed passwords + salts, if i make a user fixture that i want to reuse later i have (like have the user login) i have to have that info in the fixture but the hash is different everytime the user so i cant just include it in the users.yml file
[03:41:11] droptone: Question: When attempting to save a MySQL DB record, and for whatever reason, Rails executes a rollback, can that rollback be detected and rescued? Will it normally generate an exception?
[03:41:36] droptone: Or does it vary between types of events causing the rollback on save to occur?
[03:43:26] baweaver: has joined #RubyOnRails
[03:43:29] dangeranger: has joined #RubyOnRails
[03:45:07] voidDotClass: Gem::RemoteFetcher::UnknownHostError: timed out (https://rubygems.org/gems/actionpack-4.2.1.gem)
[03:47:30] droptone: sevenseacat: Here is the requested code - https://gist.github.com/anonymous/b30d92ed26ae5347cab7
[03:47:47] droptone: The simple view in the form and the controller. I realize it's quite basic, but I'm simply trying to complete this task.
[03:48:10] sevenseacat: droptone: thank you. so user.save on line 28 is failing, likely due to a validation error - inspect user.errors and see.
[03:48:13] droptone: What's currently occuring, according to the development log, is the user.save is generating a rollback.
[03:48:30] harly: has joined #RubyOnRails
[03:48:35] sevenseacat: I also don't know why you would be manually assigning the fields like that
[03:49:05] artX000: has joined #RubyOnRails
[03:49:09] sevenseacat: I think you'll find that params[:email], etc. are all nil
[03:50:33] droptone: sevenseacat: that's exactly right.
[03:50:47] sevenseacat: check the submitted params to see what you should be accessing instead.
[03:50:52] droptone: So it's attempting to overwrite all values in the record.
[03:51:10] harly: question: in a feature test I want to test the failed save path, but it can't be triggered because simple code. how can I do that? i'm in RSpec. The Controller has an else path for the model.save. maybe monkey patch save? Is there a better way?
[03:51:25] sevenseacat: 'because simple code'?
[03:52:11] harly: i can't change the model/controller. it accepts any value. so it can't construct values that will trigger the save failed path.
[03:52:25] sevenseacat: then why do you have such a path and why are you testing it?
[03:52:45] sevenseacat: if the user can't see it
[03:53:14] sarink: has joined #RubyOnRails
[03:53:15] harly: lets say the save fails for another reason. the user might see it.
[03:53:16] AntiSpamMeta: has joined #RubyOnRails
[03:53:29] sevenseacat: for what reason?
[03:53:31] harly: but i'm asking what best practise is for testing that? monkey patching the model would work fine, to make save fail.
[03:53:38] sarink: has joined #RubyOnRails
[03:54:11] sevenseacat: best practice is to not test what can't be accessed
[03:54:14] harly: who knows? database timed out, disk full, whatever. there's a valid error path. but i'm not sure how to test it out.
[03:54:14] Emanon`: has joined #RubyOnRails
[03:54:24] sevenseacat: they'll raise exceptions
[03:54:30] sevenseacat: and not trigger your error path
[03:54:40] droptone: sevenseacat: To only update the specified fields (password, password_confirmation), should I be leveraging update_attributes?
[03:54:47] sevenseacat: droptone: i would.
[03:55:16] harly: cool. so i want to test how it handles an exception being thrown on save. how would i do that then?
[03:55:30] markh: has joined #RubyOnRails
[03:56:12] sevenseacat: test it at a level that supports stubbing out method calls, ie. *not* feature tests
[03:56:30] harly: i want it in a feature test becuase i want ot see how the app presents that error
[03:56:41] harly: i know how to do it at a unit testing level.
[03:57:32] Radar: If the save never fails, why does the controller even support it?
[03:58:42] atomical: has joined #RubyOnRails
[04:00:36] hannelita: has joined #RubyOnRails
[04:00:59] AntiSpamMeta: has joined #RubyOnRails
[04:01:36] noodle: has joined #RubyOnRails
[04:01:54] LambdaSource: has joined #RubyOnRails
[04:02:29] iateadonut: has joined #RubyOnRails
[04:02:47] sdwrage: has joined #RubyOnRails
[04:09:05] arup_r: has joined #RubyOnRails
[04:09:35] johnflux: has joined #RubyOnRails
[04:11:14] crdpink: has joined #RubyOnRails
[04:11:14] stannard: has joined #RubyOnRails
[04:11:44] braincrash: has joined #RubyOnRails
[04:19:00] baash05: has joined #RubyOnRails
[04:19:17] baash05: Anyone here encrypt data?
[04:19:58] edj979: has joined #RubyOnRails
[04:20:07] FailBit: with my 4096-bit rsa key
[04:20:09] baash05: I'm testing out this gem attr_encrypted
[04:20:33] baash05: seems solid. but when I encrypt the same data twice it comes back with the same raw data.
[04:20:34] FailBit: ACTION sign everything
[04:20:40] B1n4r10: has joined #RubyOnRails
[04:20:40] baash05: Not quite what I was thinking.
[04:20:57] FailBit: why do you need to encrypt the data
[04:21:03] flappynerd: has left #RubyOnRails: ()
[04:21:18] mbreedlove: has joined #RubyOnRails
[04:21:19] baash05: We have semi private data that we hold in our db.
[04:21:22] FailBit: system hardening is your best bet, if they break the system you're pwned regardless
[04:21:24] baash05: Not super private stuff.
[04:21:44] baash05: Our sys is rather hard, but we want to store this data encrypted.
[04:22:15] baash05: Yeah.. if they get our DB then we're SOL.
[04:22:30] baash05: but getting our code and our DB..
[04:22:44] baash05: two different systems..
[04:23:11] FailBit: all they have to do is own the appserver box
[04:23:21] FailBit: keys are in memory, dump out database, done
[04:23:39] _Tariq: has joined #RubyOnRails
[04:24:08] shibabu: has joined #RubyOnRails
[04:24:12] baash05: But hardly a reason for storing passwords in plaintext
[04:24:26] FailBit: bcrypt, my friend
[04:24:31] FailBit: is a powerful tool
[04:26:14] SteenJobs: has joined #RubyOnRails
[04:27:38] Radar: FailBit: and what about personally identifiable information?
[04:28:07] FailBit: what about it
[04:28:19] Radar: I think that's what baash05 is asking to encrypr
[04:28:41] baash05: I went with bf-cbc
[04:29:30] AntiSpamMeta: has joined #RubyOnRails
[04:29:35] FailBit: I have no further role in this conversation since anything I can say will not change anything
[04:29:50] baash05: well not true man..
[04:29:51] kfrz: has joined #RubyOnRails
[04:30:00] baash05: I've picked BF for no real reason.
[04:30:04] FailBit: but since you care I don't think it's worth it to encrypt your database unless you're copying it around all the time
[04:30:32] FailBit: (see: patreon leaks)
[04:30:38] baash05: we do have a few systems that have access to it.
[04:30:46] baash05: More than just our app-server
[04:31:47] baash05: CBC brings me unique values.
[04:32:22] lacuna: has joined #RubyOnRails
[04:32:28] baash05: thanks.. actually you helped.
[04:32:54] baash05: meeting time.. but thanks
[04:33:20] FailBit: bcrypt is a hash function, if that's what you're referring to
[04:33:34] northfurr: has joined #RubyOnRails
[04:33:39] cornerma1: has joined #RubyOnRails
[04:34:29] pawnbox: has joined #RubyOnRails
[04:37:01] crdpink: has joined #RubyOnRails
[04:37:34] atomical_: has joined #RubyOnRails
[04:38:48] kp666: has joined #RubyOnRails
[04:39:56] kp666: has joined #RubyOnRails
[04:41:11] arup_r: I have model relationship like 1. Asset has many annotations 2. User has many annotation .. Can I write this code more like Sqlish ? https://gist.github.com/aruprakshit/0e71916234ec1d84bbfd#file-annotation_author-html-haml-L4
[04:42:22] arup_r: basically this line `asset.annotations.map(&:user).uniq`
[04:43:01] brycesenz: has joined #RubyOnRails
[04:43:10] kp666: has joined #RubyOnRails
[04:44:59] Cohedrin: arup_r what is sqlish
[04:45:32] kp666: has joined #RubyOnRails
[04:45:43] arup_r: this part `.map(&:user).uniq` is in memory, so thinking if can be done using SQL
[04:46:14] northfurr: has joined #RubyOnRails
[04:46:38] LambdaSource: has joined #RubyOnRails
[04:47:55] kp666: has joined #RubyOnRails
[04:49:05] n00bDev: has joined #RubyOnRails
[04:50:09] kp666: has joined #RubyOnRails
[04:51:27] pawnbox: has joined #RubyOnRails
[04:52:11] baweaver: has joined #RubyOnRails
[04:52:15] Emanon`_: has joined #RubyOnRails
[04:54:30] sarink: has joined #RubyOnRails
[04:54:33] mices: has joined #RubyOnRails
[04:54:41] SteenJobs: has joined #RubyOnRails
[04:54:42] mices: on this page http://www.sitepoint.com/messaging-rails-mailboxer/ they use a ruby operator ||= that's a typo right?
[04:56:26] Radar: helpa: thank you.
[04:56:28] arup_r: Cohedrin: I came up with this SQL, https://gist.github.com/aruprakshit/0e71916234ec1d84bbfd and it works. But I need to do another SELECT to get the user objects now thinking in memory or SQL would be good solution for this :)
[04:56:47] Radar: arup_r: If you're preloading the users on the annotations it doesn't matter
[04:57:05] Radar: arup_r: asset = Asset.includes(annotations: :user)
[04:58:08] arup_r: Radar: no i didn't.. hm
[04:59:18] brycesenz: mices - that is a pretty standard operator in ruby
[04:59:40] arup_r: no, that asset is from a show acttion which has @asset = Asset.find(some_id) .. no `includes` can't be done.
[05:00:07] mices: brycesenz: what does it do?
[05:00:20] Radar: asset = Asset.includes(annotations: :user).find(some_id)
[05:00:41] brycesenz: mices - it means "if the value on the left side of that operator is nil/false, assign the value on the right. Otherwise, leave it alone"
[05:01:19] arup_r: Radar: thanks, that will work. Ok, so I can use my in memory thing.. good idea.
[05:01:45] brycesenz: mices - these two things are logically equivalent: "x ||= y", and "x = x || y"
[05:02:32] mices: so it's like a shorthand persistence check?
[05:02:34] hannelita: has joined #RubyOnRails
[05:03:33] SteenJobs: has joined #RubyOnRails
[05:04:11] kt2: has joined #RubyOnRails
[05:04:38] harly: alright svenseacat and radar i've just noted those paths can't be tested. but i'd still like to know if there's a common way to intercept class calls in feature tests without a basic monkey patch. or is it really just never done.
[05:05:24] brycesenz: mices - no, it doesn't really have anything to do with persistence. persistence is a term that is usually used when referring to something being saved in a database
[05:05:24] harly: (which i did after looking up that save can only fail on invalidated fields. so you're right, there's no other way. i didnt' know that before)
[05:05:54] northfurr: has joined #RubyOnRails
[05:05:55] Radar: harly: sevenseacat told you already I thought? Don't do that.
[05:06:05] brycesenz: mices - it's often used for default values. Like, "if the variable is still nil at this point, give it a value of <y>"
[05:06:07] Radar: harly: There is a way, but it's a terrible, terrible TERRIBLE way and nobody should dare speak of it.
[05:06:25] harly: never ever under any circumstances would a feature test mock/stub a class method?
[05:06:42] Radar: .save is an instance method.
[05:06:44] harly: ok cool. i thought that would actually be wanted sometimes. but just a fleeting thought. if it's avoided at all costs, cool. embraced.
[05:07:04] Radar: You can stub any instance of the class's methods but that is v. bad and strongly discouraged
[05:07:06] Cervajz: has joined #RubyOnRails
[05:07:21] harly: yes, sure, i used wrong terminology. i mean to say to mock/stub it without access to a specific instance.
[05:07:49] Radar: blah blah Simba blah blah badlans
[05:07:51] Radar: badlands*
[05:07:58] harly: i'm curious what that way would be, without a generic monkey patch. i'm not going to use it in this case anymore. so if you nnow, i'd like to learn. but if not, no worries.
[05:08:18] Radar: Nobody speaks The Deplorable Code.
[05:08:43] harly: *rolls eyes* :)
[05:09:03] brycesenz: harly - conceptually, what are you trying to achieve?
[05:09:14] Radar: brycesenz: stubbing .save to return a different value
[05:09:21] Radar: brycesenz: but the model has no validations, so that's not going to happen
[05:09:30] Radar: which means the controller code shouldn't even care about the return result of save
[05:09:31] harly: which i've accepted.
[05:09:34] Radar: it should just be like @model.save
[05:09:35] brycesenz: < *vomits aggressively*
[05:09:45] Radar: brycesenz: my thoughts exactly
[05:10:08] harly: but generically speaking, it's something I'd like to know. that is. when there might be a case for overriding an instance method without access to the instance (ie, what would otherwise be achieved with a monkey patch) what way there might be.
[05:10:18] bronson: has joined #RubyOnRails
[05:10:20] shibly: has joined #RubyOnRails
[05:10:56] djbkd: has joined #RubyOnRails
[05:11:20] shibly: has left #RubyOnRails: ()
[05:11:32] harly: also. changing the topic. setting up parallel_tests increased my test time by 50%. i think i need more. :)
[05:11:38] brycesenz: harly - what you've described is basically what monkey patching is, and why it is almost always bad.
[05:12:12] Rodya_: has joined #RubyOnRails
[05:14:16] Radar: harly: Please drop the subject
[05:14:25] sevenseacat: this makes me sad.
[05:14:54] sevenseacat: I don't like being sad, please stop it :(
[05:15:38] harly: the "i have knowledge but i'm not going to share it because you can't be trusted to know it" mentality is a pretty aweful flaw with all dev communities. I get what you're thinking. and if you don't want to share, that's fine. don't. but the high-horse stuff is a bit much.
[05:15:54] Radar: +q harly!*@*
[05:15:56] Radar: Sadness time is over.
[05:16:07] Radar: I'm not going to tell you how to shoot yourself in the foot. Accept and move on. Thanks.
[05:16:39] mices: brycesenz: my converations_path page comes up blank it just says Your Conversations https://gist.github.com/mices/6f4f5ca4458319386596
[05:17:38] Radar: -q harly!*@*
[05:17:50] Guest58: has joined #RubyOnRails
[05:17:55] brycesenz: harly - so, a "good" example of monkey patching is adding functionality to a whole class that arguably should be a part of that class (or at least, should be in the scope of your entire project). Like, I believe that Rails monkey-patches the String class with a few additional methods (but I could be wrong about that). If it's something that you would think of doing for the sake of testing an unused controller route, it's almost assuredly a
[05:18:00] shibabu: has joined #RubyOnRails
[05:18:48] Radar: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/string/conversions.rb
[05:18:55] Radar: Yes it does add methods to String.
[05:19:34] brycesenz: mices - do you have a show view?
[05:20:07] sevenseacat: thats very, very different from "I want to patch a class in a test to always return false to save"
[05:20:12] Guest58: has joined #RubyOnRails
[05:20:32] brycesenz: harly - so it's not that I don't want to share knowledge. I'm fine having a conversation about the pros and cons of monkey patching, because it's not all bad. But for the case you've described, it's 100% the wrong solution.
[05:20:36] mices: brycesenz: refresh
[05:21:39] brycesenz: mices - you're never calling your "get_conversation" method to instantiate the @conversation variable
[05:22:15] harly: brycesenz: yep sure. which is why i didn't want to use a monkey patch. or even a, damn i forget what it's called, the new "using" way. i'm just curious if there are cases that would be wanted in a feature and if there is a better acceptable way. it's just, now, general interest. i'm not interested for my specific scenario anymore.
[05:23:23] brycesenz: harly - so, feature specs are kind of meant to know nothing about the underlying code. It's sort of the point. So, you shouldn't really ever stub/mock/patch anything on the internals of your project for a feature spec
[05:23:56] brycesenz: harly - for unit tests (and whatever the term is for testing groups of classes together), a good practice is called Dependency Injection.
[05:24:53] brycesenz: harly - so like, you might have a class that takes in a really complex BusinessPolicy object and does *something*. To test that *something*, you can create a simplified DummyBusinessPolicy class and pass that in to your class for testing.
[05:25:40] mices: brycesenz: refresh, still doesn't show any conversations on the conversations_path
[05:28:47] brycesenz: mices - I made a mistake in my first comment. The issue is the way that you're trying to use partials. You should pass variables to that partial as locals
[05:28:49] brycesenz: mices - http://guides.rubyonrails.org/layouts_and_rendering.html
[05:29:23] brycesenz: mices - Also, you're going to need some sort of view logic to iterate over that collection and display one link for each item. The partial isn't going to do that for you.
[05:30:09] brycesenz: mices - WAIT. Goodness, I'm wrong. Partials do that now! That's crazy! I had no idea!
[05:30:25] LambdaSource: has joined #RubyOnRails
[05:31:34] Pazician: has joined #RubyOnRails
[05:31:59] brycesenz: mices - are you sure that the @conversations variable isn't empty?
[05:32:45] mices: brycesenz: not sure, i know i was displaying them with my own views before
[05:33:13] brycesenz: mices - just to confirm, the rest of the view renders, correct? Like, the header, etc.?
[05:33:20] jhack: has joined #RubyOnRails
[05:33:48] mices: brycesenz: yea
[05:34:14] mices: just says Your Conversations after the header
[05:35:18] brycesenz: mices - So, below that line in your index view, add this just to see how many objects are in that collection: "<%= "Num Conversations: #{@conversations.count}" %>"
[05:37:55] mices: brycesenz: Num Conversations: 0
[05:38:14] brycesenz: mices - ok, so things are working correctly. You just have no conversations to display
[05:39:03] harly: brycesenz: thanks. it's true, in this particular case it doesn't belong in the feature. i just got curious if it did how it might be done, and that fell into an internet downward spiral. I will be revisiting it soon for the unit test side though. So that'll be looking at the stub/mock things i found trying to look this up i suppose.
[05:39:04] mices: brycesenz: what about the records in mailboxer_conversations and mailboxer_receipts
[05:39:41] melonstorm: has joined #RubyOnRails
[05:40:35] brycesenz: mices - what about them? I don't know what records your database does or doesn't have, but the way that you've structure your query it's returning zero records.
[05:42:30] mices: brycesenz: @conversations = current_user.profile.mailbox.inbox.paginate(page: params[:page], per_page: 10)
[05:42:31] brycesenz: harly - I rarely use stubs/mocks, and when I do it's usually reserved for cases where my code depends on another class and I don't want to deal with that other class's annoying behavior.
[05:43:24] brycesenz: harly - so, if I'm setting something equal to Time.now, I may stub "Time.now" to return a specific value that I can test against, rather than trying to set up a test that is independent of time
[05:43:42] ascarter_: has joined #RubyOnRails
[05:43:47] Guest58: has joined #RubyOnRails
[05:43:50] harly: so rule of thumb, if you own the code don't stub without a very very speciific reason.
[05:43:55] mices: brycesenz: that query should be right i guess
[05:44:15] brycesenz: mices - yes, I see that query. but it is returning zero objects. Is your database empty? are you sure that those objects exist? have you tried running just small parts of that query to see what is returned?
[05:45:45] brycesenz: harly - even then, it's hard for me to think of a good reason (assuming that your code is good). But stubbing things that are external to the code under test seems like it has a place. There are still probably better patterns though (like dependency injection)
[05:45:54] mices: brycesenz: actually i added a conversations resource to my routes, but there's no conversations table in mailboxer only mailboxer_conversations and mailboxer_receipts
[05:46:33] mices: brycesenz: i don't know the author tells you to do that without creating a migration
[05:46:43] brycesenz: harly - but you're right, everything has its place. If you were refactoring some super gnarly code that called out to a bunch of methods, you might want to stub them all just so you have a way to start refactoring things while making sure that the logic stayed consistent. But you'd probably delete those tests afterward, you know?
[05:46:45] mices: i was surprised when i didn't get any errors
[05:46:58] harly: well in this case the code is pretty simple. so probably best to not even think about doing it. I just wanted to cover a case where I couldn't (in theory) change the code itself. even tho it was bad.
[05:47:18] kuroro: has joined #RubyOnRails
[05:47:24] harly: (which i'm not doing now, given the angst it caused, clearly it's a bad idea :). but the curiosity was still lingering.
[05:47:52] brycesenz: mices - I'm confused. Do you have a class called Conversation? Does it inherit from ActiveRecord::Base?
[05:49:15] brycesenz: harly - like, the fundamental problem is that you were trying to create a feature test for a condition that it would be literally impossible for an end user to trigger. So you're correct that you can't do that without mucking with the internals, but...why test that at all if it's impossible by definition :)
[05:49:28] gambl0re: has joined #RubyOnRails
[05:49:46] mices: brycesenz: no there's no model
[05:50:32] harly: indeed. initially i wasn't sure that save was so constrained (simple) on false/true. i didn't know how impossible false was. now I do. but that itch left on "what if" triggers my OCD :)
[05:50:50] brycesenz: mices - ok...and what does the "inbox" method on mailbox return?
[05:52:10] mices: brycesenz: #<Mailboxer::Conversation::ActiveRecord_Relation:0xb31baba8>
[05:52:25] brycesenz: harly - if you have no validations, then yeah, save will always be true. It could still blow up though, if you have some database level constraint that your model doesn't check for. Which, if that were true, you could totally test! But if it's not, then don't worry about it.
[05:52:37] brycesenz: mices - can you just give the code for your models?
[05:53:38] harly: yeah. i don't think in this case there's a need to for that. if they had specific pages being served on catching those then maybe. but they don't.
[05:53:50] aganov: has joined #RubyOnRails
[05:54:15] mices: brycesenz: refresh
[05:55:16] brycesenz: mices - where is Mailbox defined?
[05:56:02] mices: brycesenz: it's a method of Profile
[05:56:06] sarink: has joined #RubyOnRails
[05:56:27] mices: brycesenz: just because i made the profile model messageable
[05:57:18] gasbakid: has joined #RubyOnRails
[05:57:51] lxsameer: has joined #RubyOnRails
[05:58:41] arup_r: has joined #RubyOnRails
[05:58:49] brycesenz: mices - this gem? https://github.com/LTe/acts-as-messageable
[05:59:12] mices: brycesenz: no, 'gem mailboxer'
[06:01:25] brycesenz: mices - I don't know anything about that gem.
[06:01:51] brycesenz: mices - reading the gem documentation vs. your code, it looks like you might be doing pagination wrong. They use this syntax: "conversations = alfa.mailbox.conversations.page(params[:page]).per(9)"
[06:02:22] brycesenz: mices - but otherwise, I would fire up the rails console and try to understand why that query is returning no results
[06:03:15] hannelita: has joined #RubyOnRails
[06:03:43] mices: brycesenz: have you seen the page i was following http://www.sitepoint.com/messaging-rails-mailboxer/
[06:03:49] gasbakid: has joined #RubyOnRails
[06:04:07] bePolite: has joined #RubyOnRails
[06:04:14] Limix: has joined #RubyOnRails
[06:05:14] dionysus69: has joined #RubyOnRails
[06:06:57] brycesenz: mices - I've not seen that, but it's beside the point. Your view is showing no records because your query is returning no records. I don't know what is in your database, so I am unable to understand why your query is returning no records. You are the only one with the access to that data
[06:08:58] northfurr: has joined #RubyOnRails
[06:09:33] pawnbox: has joined #RubyOnRails
[06:10:18] lacuna: has joined #RubyOnRails
[06:10:19] lacuna: has joined #RubyOnRails
[06:10:22] pawnbox: has joined #RubyOnRails
[06:11:22] gasbakid: has joined #RubyOnRails
[06:13:19] sonalkr132: has joined #RubyOnRails
[06:13:22] moei: has joined #RubyOnRails
[06:13:24] Rodya_: has joined #RubyOnRails
[06:13:41] mices: brycesenz: could it be because there's no conversations model? why'd he telling me to put resource :conversations in my routes?
[06:14:02] mices: s/why'd/why's/
[06:14:15] brycesenz: mices - I doubt that's it. How many Messages are in your database?
[06:14:57] harly: this editor sucks
[06:16:04] arup_r: harly: i love :w :)
[06:16:05] brycesenz: mices - and what is "User.find(id).profile.mailbox.inbox.count"? for the user ID that you were logged in as?
[06:16:29] harly: :w! (agreed)
[06:16:46] lethjakman: has joined #RubyOnRails
[06:17:13] gasbakid: has joined #RubyOnRails
[06:18:02] mices: brycesenz: 0
[06:18:06] LambdaSource: has joined #RubyOnRails
[06:18:33] brycesenz: mices - ok. so none of the messages in your database are associated with that profile
[06:19:07] brycesenz: mices - you could create some I guess. But again, this doesn't sound like a bug in the application. You just don't have the data that you want in your database
[06:21:05] kfrz: has joined #RubyOnRails
[06:23:30] sarink: has joined #RubyOnRails
[06:23:52] sarink: has joined #RubyOnRails
[06:24:13] dionysus69: has joined #RubyOnRails
[06:25:13] n00bDev: has joined #RubyOnRails
[06:25:27] ur5us: has joined #RubyOnRails
[06:30:55] Cervajz: has joined #RubyOnRails
[06:34:58] B1n4r10: has joined #RubyOnRails
[06:43:52] lxkm|work: has left #RubyOnRails: ()
[06:46:56] AntiSpamMeta: has joined #RubyOnRails
[06:51:30] Guest58: has joined #RubyOnRails
[06:53:34] rvanlieshout: has joined #RubyOnRails
[06:55:29] ur5us: has joined #RubyOnRails
[06:58:34] nunchuck: has joined #RubyOnRails
[06:58:52] kerunaru: has joined #RubyOnRails
[07:04:05] hannelita: has joined #RubyOnRails
[07:04:06] dopie: Ok i got it to work
[07:04:22] dopie: now here is my follow up question on how to set up models ...
[07:05:46] dopie: I have 4 Steps... each with their one controllers, in these steps each step has a different number of files that the user has to be uploaded, each of these files have to be approved so the user can go on to the next step
[07:06:20] dopie: What would be the best way to setup the approved for the table?
[07:06:35] dopie: maybe a third table that has approved ?
[07:06:37] baash05: has left #RubyOnRails: ()
[07:07:09] robbyoconnor: has joined #RubyOnRails
[07:07:48] sarink: has joined #RubyOnRails
[07:10:53] yardenbar: has joined #RubyOnRails
[07:12:00] bronson: has joined #RubyOnRails
[07:14:22] Rodya_: has joined #RubyOnRails
[07:15:57] n00bDev: has joined #RubyOnRails
[07:19:38] pyemkey: has joined #RubyOnRails
[07:20:47] sandstrom: has joined #RubyOnRails
[07:20:52] sdwrage: has joined #RubyOnRails
[07:20:57] rvanlieshout: dopie: what models do you have now?
[07:21:20] rvanlieshout: dopie: and can you explain what data is processed during those steps?
[07:21:42] krz: has joined #RubyOnRails
[07:21:50] dopie: ok going to gist what I have
[07:22:04] Radar: 1052 days
[07:22:09] Radar: still doesn't know that he should gist
[07:22:16] Radar: I would shake my head if I wasn't so exhausted.
[07:24:40] pyemkey_: has joined #RubyOnRails
[07:24:54] dopie: https://gist.github.com/staycreativedesign/5630b1bff603d2a8fec7
[07:25:19] dopie: Radar: i asked a question and answered with a gist?
[07:25:27] dopie: Radar: I don't understand that comment
[07:25:28] Radar: dopie: Gist to start with.
[07:25:36] Radar: When asking questions about code, always gist.
[07:25:49] Radar: 99% of questions in this channel are better off asked with gists attached
[07:26:14] rvanlieshout: dopie: so you've got a letter, a proof and 3 images?
[07:26:15] dopie: Basically every step has to items that need to be approved
[07:26:35] rvanlieshout: oh. you actually have step models?
[07:26:52] AzaToth: has joined #RubyOnRails
[07:26:59] rvanlieshout: ouch. that doesn't feel right
[07:27:26] rvanlieshout: what's a "proof" ?
[07:27:26] dopie: I just don't know what to change too
[07:27:44] dopie: proof is just the column name...
[07:27:46] rvanlieshout: and how do we call image 1, 2 and 3?
[07:27:48] rvanlieshout: but what is it
[07:27:53] dopie: basically they are all images
[07:28:02] rvanlieshout: and what kind of letter is it?
[07:28:12] Pazician: has joined #RubyOnRails
[07:28:26] rvanlieshout: explain me in a way that i could provide you the data you need to approve
[07:28:28] dopie: basicall each Step has those columns listed
[07:28:38] rvanlieshout: so what kind of letter should i give you?
[07:28:54] rvanlieshout: you asked me for a pdf
[07:28:58] rvanlieshout: so i want to give you one
[07:29:00] rvanlieshout: what should be on it?
[07:29:02] rvanlieshout: the 'letter' part
[07:29:23] Radar: I've implemented multi-step forms with Reform before.
[07:29:39] Radar: It let me validate certain fields on certain steps
[07:30:00] rvanlieshout: but we need a proper description of the stuff to validate first imo
[07:30:08] solars: has joined #RubyOnRails
[07:30:10] lubekpl: has joined #RubyOnRails
[07:30:26] GriffinHeart: has joined #RubyOnRails
[07:30:58] dopie: rvanlieshout: they are all images
[07:31:09] dopie: https://gist.github.com/staycreativedesign/5630b1bff603d2a8fec7
[07:31:12] dopie: updated gist
[07:31:16] rvanlieshout: images of what
[07:31:25] rvanlieshout: you don't ask your users for a random image?
[07:31:27] solars: has joined #RubyOnRails
[07:32:08] rvanlieshout: assume i'm the user here
[07:32:12] rvanlieshout: and you're the system
[07:32:17] rvanlieshout: what are you going to ask me?
[07:32:23] rvanlieshout: upload 5 random pdf files?
[07:32:34] dopie: there we go yes
[07:32:41] lethjakman: has joined #RubyOnRails
[07:32:42] rvanlieshout: just the first 5 random files i can find
[07:32:46] rvanlieshout: with what purpose?
[07:33:10] dopie: just to see if the client can approve or deny the uploads
[07:33:13] jas02: has joined #RubyOnRails
[07:33:17] rvanlieshout: approve for what
[07:33:24] dopie: so he can move on to next step
[07:33:31] dopie: Radar: checking out reform
[07:33:34] rvanlieshout: why would i want to upload 5 random documents i just grabbed from the interweb to have them approved
[07:33:47] rvanlieshout: and i'm asking this because it seems you're not even able to describe what data you have
[07:33:53] rvanlieshout: making you impossible of creating proper models
[07:34:08] dopie: rvanlieshout: the type of data at this point is irrelevant
[07:34:16] dopie: Yes it is
[07:34:17] rvanlieshout: not for the models
[07:34:29] arup_r: has joined #RubyOnRails
[07:34:37] rvanlieshout: so you expect users to randomly download 5 pdf's from the internet, upload, and wait for approval?
[07:34:42] peeja: has joined #RubyOnRails
[07:34:42] dopie: Each step has a bunch of images the user has to upload and each has to be approved
[07:34:47] dopie: rvanlieshout: yes
[07:34:55] rvanlieshout: why would i want to use that system?
[07:34:56] dopie: to make it easier yes
[07:35:01] rvanlieshout: it doesn't make it easier
[07:35:06] dopie: rvanlieshout: you wouldnt and neither would 99.5%
[07:35:15] rvanlieshout: so why are you creating the system then?
[07:35:24] dopie: because i am :)
[07:35:35] dopie: rvanlieshout: you must be really bored tonight/today
[07:35:48] rvanlieshout: i'm really trying to help you in defining proper models for your application
[07:35:52] pawnbox: has joined #RubyOnRails
[07:35:56] rvanlieshout: but if you don't want them i'm ok with that
[07:36:10] Feyn: has joined #RubyOnRails
[07:36:21] dopie: I don't want them I want to create something where im not repeating the documents being approved
[07:36:21] JohnT: has joined #RubyOnRails
[07:36:31] dopie: in the models
[07:36:46] rvanlieshout: your models would never be even close to 'ok' if you use this undescriptive random stuff in there
[07:36:57] dopie: Approvable
[07:37:13] dopie: Polymorphic?
[07:37:19] rvanlieshout: Step1 is a badname
[07:37:27] rvanlieshout: or even 'letter'
[07:37:31] dopie: those arent the names btw
[07:37:37] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[07:37:51] rvanlieshout: i'm done. i'll help somebody who wants to be helped
[07:37:56] paulodiniz: has joined #RubyOnRails
[07:37:57] dopie: ok thanks :)
[07:38:01] dopie: rvanlieshout: thanks for your help
[07:38:17] rvanlieshout: any time, if you want.. but this isn't help :)
[07:40:00] dopie: rvanlieshout: I guess you helped me some how... I just don't know yet
[07:42:46] ascarter_: has joined #RubyOnRails
[07:43:49] sarink: has joined #RubyOnRails
[07:44:23] dopie: https://github.com/Tapjoy/acts_as_approvable
[07:45:23] artto: has joined #RubyOnRails
[07:45:49] shibabu: has joined #RubyOnRails
[07:45:57] dopie: rvanlieshout: i do have my tables named first_step, second_step, third_step, fourth_step
[07:49:40] srinidhi: has joined #RubyOnRails
[07:52:59] rvanlieshout: yeah. that's the same issue
[07:53:06] rvanlieshout: table names shouldn't have those names
[07:53:19] pawnbox: has joined #RubyOnRails
[07:53:24] rvanlieshout: the steps to complete a task are really not a thing for the model world
[07:53:28] Ropeney: has joined #RubyOnRails
[07:54:47] speaking1ode: has joined #RubyOnRails
[07:58:38] agoldboi: has joined #RubyOnRails
[07:58:44] Guest58: has joined #RubyOnRails
[07:59:26] tibra: has joined #RubyOnRails
[08:00:08] udiudi: has joined #RubyOnRails
[08:02:00] pipework: dopie: Why not just has_many steps, and have those steps have an 'order' or 'priority'?
[08:02:15] pipework: sort it however if you can, skip the priority unless you want to use it for weighting.
[08:04:26] tibra: has joined #RubyOnRails
[08:06:05] hannelita: has joined #RubyOnRails
[08:08:21] srinidhi: has joined #RubyOnRails
[08:08:59] darutoko: has joined #RubyOnRails
[08:15:16] Rodya_: has joined #RubyOnRails
[08:17:17] edwinvdgraaf: has joined #RubyOnRails
[08:19:12] DoubleMalt: has joined #RubyOnRails
[08:20:01] GriffinHeart: has joined #RubyOnRails
[08:23:41] sandstrom: has joined #RubyOnRails
[08:25:04] LambdaSource: has joined #RubyOnRails
[08:30:28] BhavyaM: has joined #RubyOnRails
[08:32:10] roshanavand: has joined #RubyOnRails
[08:33:11] roshanavand: has joined #RubyOnRails
[08:34:19] roshanavand: has joined #RubyOnRails
[08:34:26] arup_r: has joined #RubyOnRails
[08:34:57] srinidhi1: has joined #RubyOnRails
[08:34:58] artto: has joined #RubyOnRails
[08:35:31] n00bDev: has joined #RubyOnRails
[08:35:47] riddled: has joined #RubyOnRails
[08:39:02] arup_r: has joined #RubyOnRails
[08:39:14] roshanav_: has joined #RubyOnRails
[08:39:37] arup_r: has joined #RubyOnRails
[08:39:43] flat_white: has joined #RubyOnRails
[08:41:41] n00bDev: any here using react?
[08:44:04] koneko: has joined #RubyOnRails
[08:47:49] harly: can anyone point to a good up to date example of testing rails app models?
[08:51:20] arup_r: has joined #RubyOnRails
[08:51:49] flat_whi_: has joined #RubyOnRails
[08:52:30] DoubleMalt: has joined #RubyOnRails
[08:55:16] Haris: has joined #RubyOnRails
[08:55:27] Haris: hello all
[08:58:53] AimlessRAven: has joined #RubyOnRails
[08:59:12] Guest58: has joined #RubyOnRails
[08:59:24] rvanlieshout: harly: don't the rails guides include info about that?
[08:59:26] AimlessRAven: why strftime("%d %b %y / %I:%M%p") give me time - 2h from now ?
[08:59:40] helpa: harly: 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
[08:59:53] rvanlieshout: artto: because you should be using the i18n date helpers
[08:59:57] rvanlieshout: AimlessRaven: ^
[09:00:08] rvanlieshout: and you're calling it on what kind of object? in what timezone?
[09:00:16] krz: has joined #RubyOnRails
[09:00:49] AimlessRAven: rvanlieshout: i called strftime for array objects and i dont know how to check time zone
[09:01:01] mbreedlove: has joined #RubyOnRails
[09:01:14] rvanlieshout: array doesn't have a .strftime
[09:01:29] Guest58: has joined #RubyOnRails
[09:01:44] AimlessRAven: rvanlieshout: okey what kind of function can i use
[09:02:29] rvanlieshout: nothing date related on array
[09:02:34] rvanlieshout: so what kind of elements do you have in your array?
[09:02:36] mark2: has joined #RubyOnRails
[09:02:47] rvanlieshout: and you might really really want to follow some ruby and rails tutorials
[09:02:58] rvanlieshout: in order to make a proper maintanable application
[09:03:11] Z00t: has joined #RubyOnRails
[09:06:49] hannelita: has joined #RubyOnRails
[09:07:02] Haris2: has joined #RubyOnRails
[09:07:19] Haris2: has left #RubyOnRails: ()
[09:07:36] Haris: has joined #RubyOnRails
[09:07:38] jsrn_: has joined #RubyOnRails
[09:08:12] harly: rvanlieshout: googling around is giving a lot of conflicting informatoin, is all.
[09:09:05] fox_mulder_cp: hi, can i ask about offtop - somebody uses SSHFP Records in DNS? have a missmatch error with ssh-keygen -r $host in DNS RR and ssh -v $host
[09:14:00] drptbl: has joined #RubyOnRails
[09:15:32] pyemkey: has joined #RubyOnRails
[09:16:27] Rodya_: has joined #RubyOnRails
[09:16:52] flat_white: has joined #RubyOnRails
[09:17:04] lethjakman: has joined #RubyOnRails
[09:19:07] pipework: has joined #RubyOnRails
[09:19:57] Xentil: has joined #RubyOnRails
[09:20:29] noah256: has joined #RubyOnRails
[09:20:37] Liothen: has joined #RubyOnRails
[09:20:43] dmarr: has joined #RubyOnRails
[09:22:47] flat_whi_: has joined #RubyOnRails
[09:22:59] steharro: has joined #RubyOnRails
[09:23:02] Xentil: I have single language application. How can i translate model attribute names in form error messages ?
[09:23:03] rodfersou: has joined #RubyOnRails
[09:23:59] ddv: Xentil: http://guides.rubyonrails.org/i18n.html
[09:26:06] marr: has joined #RubyOnRails
[09:27:10] herbst: has joined #RubyOnRails
[09:27:21] djbkd: has joined #RubyOnRails
[09:28:29] Cervajz_: has joined #RubyOnRails
[09:29:47] srinidhi: has joined #RubyOnRails
[09:30:21] paulodiniz: has joined #RubyOnRails
[09:33:37] artto_: has joined #RubyOnRails
[09:34:45] paulodiniz: has joined #RubyOnRails
[09:35:11] Cervajz: has joined #RubyOnRails
[09:35:32] errakeshpd: has joined #RubyOnRails
[09:36:11] errakeshpd: how to signout a user (devise) using api request ?
[09:36:20] blackmesa: has joined #RubyOnRails
[09:36:35] kerunaru: has joined #RubyOnRails
[09:38:20] pyemkey_: has joined #RubyOnRails
[09:39:08] snowy: has joined #RubyOnRails
[09:39:22] riddled: has joined #RubyOnRails
[09:40:30] DirtyFInn: has joined #RubyOnRails
[09:41:23] blackmesa: has joined #RubyOnRails
[09:43:21] pydave6367: has joined #RubyOnRails
[09:43:35] pyemkey: has joined #RubyOnRails
[09:44:57] herbst: has joined #RubyOnRails
[09:46:16] shibabu: has joined #RubyOnRails
[09:47:01] vanne: has joined #RubyOnRails
[09:47:02] mikecmpbll: has joined #RubyOnRails
[09:49:14] hoodow: has joined #RubyOnRails
[09:50:13] defsdoor: has joined #RubyOnRails
[09:51:25] mbreedlove: has joined #RubyOnRails
[09:52:30] koneko: has joined #RubyOnRails
[09:52:46] Bloomer: has joined #RubyOnRails
[09:58:31] arBmind: has joined #RubyOnRails
[09:58:41] tvw: has joined #RubyOnRails
[09:58:45] Doddlin: has joined #RubyOnRails
[10:00:14] LambdaSource: has joined #RubyOnRails
[10:01:36] mbreedlove: has joined #RubyOnRails
[10:02:59] lipoqil: has joined #RubyOnRails
[10:04:35] pyemkey: has joined #RubyOnRails
[10:04:45] jsrn_: has joined #RubyOnRails
[10:06:00] herbst: has joined #RubyOnRails
[10:06:19] futilegames: has joined #RubyOnRails
[10:07:47] errakeshpd: how to signout a user (devise) using api request ?
[10:07:52] hannelita: has joined #RubyOnRails
[10:09:17] flat_white: has joined #RubyOnRails
[10:09:50] arup_r: has joined #RubyOnRails
[10:10:25] Tempesta: has joined #RubyOnRails
[10:11:16] mbreedlove: has joined #RubyOnRails
[10:12:53] Vintila: has joined #RubyOnRails
[10:13:40] arup_r1: has joined #RubyOnRails
[10:14:36] Olipro: has joined #RubyOnRails
[10:14:50] hannelita: has joined #RubyOnRails
[10:15:20] tetraktys: has joined #RubyOnRails
[10:16:56] herbst: has joined #RubyOnRails
[10:17:51] silverdust: has joined #RubyOnRails
[10:19:08] paulodiniz: has joined #RubyOnRails
[10:19:24] antgel: has joined #RubyOnRails
[10:19:48] Guest46690: has left #RubyOnRails: ()
[10:23:12] silverdust: has joined #RubyOnRails
[10:28:27] Synthead: has joined #RubyOnRails
[10:29:17] dredozubov: has joined #RubyOnRails
[10:29:40] dredozubov: Trying to deploy a rails app to the bunch of new servers with capistrano and getting this during 'deploy:migrate' task: https://gist.github.com/dredozubov/716aa16fb5d007192c44
[10:29:46] Z00t_: has joined #RubyOnRails
[10:29:58] dredozubov: not sure what's to blame here
[10:30:20] arup_r: has joined #RubyOnRails
[10:32:25] ddv: dredozubov: you need to generate UTF-8 locale
[10:33:00] ddv: oh wait
[10:33:01] dredozubov: i'm not sure how it's related to constant resolution here
[10:33:25] ddv: it's not I was wrong
[10:34:50] d0nn1e: has joined #RubyOnRails
[10:36:42] ldnunes: has joined #RubyOnRails
[10:37:45] chipotle: has joined #RubyOnRails
[10:42:30] lethjakman: has joined #RubyOnRails
[10:43:00] artto: has joined #RubyOnRails
[10:45:07] ddv: dredozubov: my guess wrong combination of gem versions
[10:45:55] gbgdev: has joined #RubyOnRails
[10:46:39] dredozubov: it seems unlikely, because it loads correctly on other machines and versions are freezed with the Gemfile.lock
[10:47:16] ascarter_: has joined #RubyOnRails
[10:51:33] LambdaSource: has joined #RubyOnRails
[10:51:59] GreekFreak: has joined #RubyOnRails
[10:53:18] GreekFreak: I am using paperclip to upload and store videos, however, for large videos the copy process to the directory takes a bit long and holds up the server. How can I "speed up" paperclip or move the "copy process" to the background or something
[10:54:55] ddv: GreekFreak: the uploading or the copying? you should def. background this
[10:55:10] ddv: GreekFreak: don't let your users wait
[10:55:47] ddv: GreekFreak: most people won't even wait
[10:56:07] srinidhi: has joined #RubyOnRails
[10:56:18] GreekFreak: ddv, for uploading I show a progress bar (I don't want them to close the browser by mistake). But then paperclip needs to move the file to the appropriate folder. I can't show a progress bar for that and even I was wondering why it was taking so long
[10:56:42] GreekFreak: I'm assuming that while it's still in the 'params' variable it's in memory
[10:56:55] ddv: GreekFreak: you can show progress bar if you background the moving
[10:57:34] ubiks: has joined #RubyOnRails
[10:57:40] GreekFreak: ddv, that was my thinking. "+a" ?
[10:57:56] ddv: a progress bar
[10:59:13] ddv: GreekFreak: why is moving a large file taking so much time anyways?
[10:59:31] ddv: maybe you should investigate that
[10:59:39] GreekFreak: ddv, I'm testing with a 100mb file
[10:59:59] mrbubbles: has joined #RubyOnRails
[11:00:18] Synthead: has joined #RubyOnRails
[11:00:28] ddv: GreekFreak: moving a file on the same fs should take less than a second
[11:02:16] GreekFreak: it takes about 3 to 5 seconds, but my progress bar shows 100% while this happens and I don't want the user to close the browser.
[11:02:35] GreekFreak: however you made me think of something now, so will test it first
[11:02:37] ddv: GreekFreak: you can't prevent the user from closing his browser
[11:04:05] shibly: has joined #RubyOnRails
[11:04:19] shibly: has left #RubyOnRails: ()
[11:04:30] Detch: has joined #RubyOnRails
[11:06:09] akkmaxon: has joined #RubyOnRails
[11:10:17] GreekFreak: ddv, no I can't. But I can at least show him the system is busy... can't stop stupidity lol
[11:10:25] workmad3: GreekFreak: also, the user closing the browser shouldn't interrupt the copy process
[11:10:56] Doddlin: has joined #RubyOnRails
[11:11:26] workmad3: closing your browser window doesn't immediately cause the rails process to abort... it continues on and finishes as normal, then rails handles the fact the connection is closed and it can't send the response further down the stack
[11:12:09] GreekFreak: workmad3, thank you. that makes sense. I was going to test that with that assumption.
[11:12:30] LambdaSource: has joined #RubyOnRails
[11:12:32] workmad3: still, if you're doing large operations in the request thread you should still stop... it holds up your server, gives a poor user interaction, etc.
[11:13:39] bronson: has joined #RubyOnRails
[11:13:51] workmad3: and also, as ddv asked, what's happening that causes a simple `mv` on your server to take multiple seconds? On any sensible filesystem, a `mv` doesn't copy data around, it just relinks the data to a different filesystem location
[11:14:37] workmad3: or are you doing something like copying from a local `/tmp` upload into an NFS mount or S3 inside the request process?
[11:15:52] GreekFreak: workmad3, I'm using paperclip. It's paperclip that's doing the copying, not me
[11:16:08] workmad3: GreekFreak: you're still controlling where it's copying to
[11:16:26] workmad3: so should be able to answer questions about what the destination is
[11:17:34] pawnbox: has joined #RubyOnRails
[11:17:54] Rodya_: has joined #RubyOnRails
[11:18:34] jgpawletko: has joined #RubyOnRails
[11:18:46] GreekFreak: workmad3, it copies to the public folder, as set in my "path" and "url" options of field
[11:19:52] GreekFreak: oh and this is on my dev machine, not the server
[11:20:34] agoldboi: has left #RubyOnRails: ()
[11:26:02] jgt: has joined #RubyOnRails
[11:29:51] GreekFreak: workmad3, I tried doing the "render" before the save to see if the user can still use the system, but it still waits... in fact the upload now freezes my browser lol
[11:30:33] kerunaru: has joined #RubyOnRails
[11:31:56] FooMunki: has joined #RubyOnRails
[11:32:05] LambdaSource: has joined #RubyOnRails
[11:35:17] srinidhi: has joined #RubyOnRails
[11:37:34] pyemkey: has joined #RubyOnRails
[11:38:36] rapha: has joined #RubyOnRails
[11:39:10] pawnbox: has joined #RubyOnRails
[11:39:17] Xentil: I know that for validates :name, presence: true, error message locale key is .blank (activerecord.errors.models.MODEL.attributes.name.blank). But what keys are for other validates ?
[11:39:41] rapha: I'm trying to get assets:precompile to work with https://gist.github.com/anonymous/d4b14c603824eb014291, can somebody help? (Sass::SyntaxError: Undefined variable: "$font_arabic"...)
[11:39:51] GreekFreak: what is the main difference between background jobs and schedulers. I user rufus scheduler but I can't wrap my mind around telling it to do something in the background. I actually have to schedule it. I use it cause it's easier that Resque or Sidekiq
[11:42:40] GreekFreak: rapha, your $font_arabic is a variable and you've passed it multiple values. try doing " font-family: 'Lateef', 'Amiri', 'Times New Roman', sans !important " (I'm not 100% sure of the important though)
[11:44:28] rapha: GreekFreak: well, the important is CSS, not SASS. Let me give your suggestion a try.
[11:45:39] GreekFreak: rapha, I meant is should work but didn't test it lol
[11:45:44] GreekFreak: Xentil, http://guides.rubyonrails.org/i18n.html#error-message-interpolation
[11:45:48] pawnbox: has joined #RubyOnRails
[11:47:45] Guest58: has joined #RubyOnRails
[11:48:03] kknight: has joined #RubyOnRails
[11:48:27] ql6wlld: has joined #RubyOnRails
[11:48:52] shibabu: has joined #RubyOnRails
[11:49:39] kknight: if model doesn't exit only i have table , how can we populate?
[11:49:56] jas02: has joined #RubyOnRails
[11:50:29] herbst: has joined #RubyOnRails
[11:50:29] LambdaSo_: has joined #RubyOnRails
[11:50:30] Ergo: has joined #RubyOnRails
[11:51:02] stamina: has joined #RubyOnRails
[11:51:42] GreekFreak: kknight, pls retype your question so that it makes a little more sense ;)
[11:51:47] arup_r: kknight: http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-exec_insert
[11:51:59] arup_r: or http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-execute
[11:52:03] pawnbox: has joined #RubyOnRails
[11:52:11] arup_r: just feed your raw sql to those method
[11:53:08] rapha: GreekFreak: okay so i've tried around but it doesn't really make sense in the first place because "$font_arabic" is supposed to be the variable that holds the *value* to be used for the *css property* called "font-family". And I don't think SASS variables are supposed to contain property and value, just value.
[11:53:13] pawnbox: has joined #RubyOnRails
[11:54:13] kknight: one more thing how to handle blocking request of user in rails, one user want to block someone , how to do that?
[11:54:40] pawnbox: has joined #RubyOnRails
[11:57:25] pyemkey_: has joined #RubyOnRails
[11:57:42] hannelita: has joined #RubyOnRails
[11:58:09] GreekFreak: rapha, my apologies. What you did was correct. but I noticed you're missing a semi-colon at the end
[11:58:27] GreekFreak: rapha, http://css3.bradshawenterprises.com/blog/why-sass/ has your example right at the top
[11:59:04] rapha: GreekFreak: a semi-colon in SASS? You probably mean in _variable.css.sass, right?
[11:59:33] rapha: GreekFreak: ah okay the example you found is SCSS, not SASS. There you would need a semi-colon of course.
[11:59:46] kknight: one more thing how to handle blocking request of user in rails, one user want to block someone , how to do that?
[12:00:46] GreekFreak: rapha, I'm on a roll here lol. Sorry. kept reading it as scss. I'll shut up now and let someone who actually knows the answer to step in lol
[12:04:32] ql6wlld: has joined #RubyOnRails
[12:06:34] riddled: has joined #RubyOnRails
[12:07:51] kknight: one more thing how to handle blocking request of user in rails, one user want to block someone , how to do that?
[12:08:10] tvw: has joined #RubyOnRails
[12:08:35] ziyadb: has joined #RubyOnRails
[12:08:49] ddv: kknight: you have to be more specific
[12:08:50] LambdaSource: has joined #RubyOnRails
[12:09:29] AntiSpamMeta: has joined #RubyOnRails
[12:10:28] kknight: m making app where one user block another user and after that blocked user cant see the post by the person who blocked him, how to do that?
[12:12:21] lacuna: has joined #RubyOnRails
[12:12:22] lacuna: has joined #RubyOnRails
[12:12:29] johnflux: has joined #RubyOnRails
[12:15:34] AntiSpamMeta: has joined #RubyOnRails
[12:17:07] ddv: kknight: add a blocked column on the join model
[12:17:16] lethjakman: has joined #RubyOnRails
[12:17:36] ubiks: has joined #RubyOnRails
[12:18:32] Cervajz: has joined #RubyOnRails
[12:18:34] konsolebox: has joined #RubyOnRails
[12:19:01] Rodya_: has joined #RubyOnRails
[12:19:32] ubiks: hi there, I am attempting to log in with OAuth2 in a google account but Google returns me this error: https://gist.github.com/UbikTransmedia/20826275ae98264f9179
[12:19:57] ubiks: I've followed a tutorial and theoretically omniauth and devise should be handling this; may you please help me?
[12:21:33] konsolebox: has joined #RubyOnRails
[12:23:09] pydave6367: has joined #RubyOnRails
[12:23:55] GreekFreak: ddv, workmad3, thanks for your help. still testing a few things
[12:30:31] LambdaSource: has joined #RubyOnRails
[12:32:07] paulodiniz: has joined #RubyOnRails
[12:33:16] steharro: has left #RubyOnRails: ()
[12:33:19] alphaatom: has joined #RubyOnRails
[12:33:24] chrisarcand: has joined #RubyOnRails
[12:34:40] minver: has joined #RubyOnRails
[12:34:50] mbreedlove: has joined #RubyOnRails
[12:36:35] _Tariq: has joined #RubyOnRails
[12:36:55] blackmesa: has joined #RubyOnRails
[12:37:46] jmignault: has joined #RubyOnRails
[12:38:41] sevenseacat: has joined #RubyOnRails
[12:38:48] minver: I need to import Reviews to my App. And the API I'm using let med export the reviews as JSON or my app will get a POST callback when a review is created. What are the PROS and CONS with these two approaches? Export would be better in the beginning to populate the database.
[12:39:09] pawnbox: has joined #RubyOnRails
[12:39:11] jottr: has joined #RubyOnRails
[12:39:56] Jasaka: has joined #RubyOnRails
[12:40:32] mbreedlove: has joined #RubyOnRails
[12:41:28] AimlessRAven: has joined #RubyOnRails
[12:41:50] PedramT: has joined #RubyOnRails
[12:42:58] jmignault: has joined #RubyOnRails
[12:43:04] AimlessRAven: hi all i wanna create twitter meta tags i do like this https://gist.github.com/anonymous/0812d46f63c02573b9ba
[12:43:30] jeanre: has joined #RubyOnRails
[12:43:31] AimlessRAven: but when i check in twitter he told me The card for your website will look a little something like this! Unable to render Card preview
[12:43:58] PedramT: has joined #RubyOnRails
[12:45:00] rapha: Hmm is there anyone actually here who uses SASS and variables across multiple files?
[12:45:20] fluxsource: has joined #RubyOnRails
[12:45:56] JohnT: has joined #RubyOnRails
[12:46:31] tibra: has joined #RubyOnRails
[12:48:05] Cervajz: has joined #RubyOnRails
[12:48:22] rvanlieshout: rapha: tot start with bootstrap
[12:48:32] LambdaSo_: has joined #RubyOnRails
[12:48:41] rapha: rvanlieshout: what do you mean by "tot"?
[12:48:51] cullenb: has joined #RubyOnRails
[12:49:23] arup_r: minver: both looks good.. and sweet to me
[12:49:47] myntcake: has joined #RubyOnRails
[12:50:00] shibabu: has joined #RubyOnRails
[12:50:23] nerium: has joined #RubyOnRails
[12:51:33] tibra: has joined #RubyOnRails
[12:52:02] zpe: has joined #RubyOnRails
[12:52:47] voidDotClass: has joined #RubyOnRails
[12:53:22] voidDotClass: If I have two tables, account, and business, each business belongs to an account, but an account may or not have a business. then should the mapping be belongs_to in business, and has_one in account?
[12:53:52] PedramT: has joined #RubyOnRails
[12:53:59] AimlessRAven: someone who have experience with tweeter meta tags ?
[12:55:04] snowy: has joined #RubyOnRails
[12:55:39] rapha: rvanlieshout: hmm then I'm afraid I don't understand. What has bootstrap to do with SASS variables across multiple files, except perhaps that you could use it that way as well?
[12:56:17] peeja: has joined #RubyOnRails
[12:56:52] arup_r: voidDotClass: yes, but if *not many*
[12:57:03] voidDotClass: arup_r, yes, its 1:1
[12:57:07] paulodiniz: has joined #RubyOnRails
[12:57:08] voidDotClass: 1 account per business
[12:57:08] jeanre: arup_r: stop chatting in irc :P
[12:57:17] arup_r: jeanre: lol
[12:57:28] arup_r: why you here ?
[12:57:45] arup_r: voidDotClass: yes has_one then makes sense
[12:57:46] jeanre: im checking up on you
[12:58:29] _Tariq: has joined #RubyOnRails
[13:00:08] udiudi: has joined #RubyOnRails
[13:03:43] edwinvdgraaf: has joined #RubyOnRails
[13:03:55] kt2: has joined #RubyOnRails
[13:05:49] ornerymoose: has joined #RubyOnRails
[13:05:55] edwinvdg_: has joined #RubyOnRails
[13:06:34] rapha: rvanlieshout: in any case, what does work is if you @import the _variables.sass file from *every* other .sass that needs the variables. Inconvenient but works.
[13:07:21] flat_white: has joined #RubyOnRails
[13:09:19] rvanlieshout: rapha: what if you include the variables from within app, and include others after that?
[13:09:36] jeanre: rvanlieshout: how goes dude?
[13:09:41] someish: has joined #RubyOnRails
[13:09:59] jeanre: s/dude/' '
[13:10:03] LambdaSource: has joined #RubyOnRails
[13:11:19] rapha: rvanlieshout: by app you probably mean application.sass. That's what I did originally and which doesn't work despite lots of posts on the web saying it would.
[13:11:36] jeanre: rvanlieshout: going good
[13:11:48] jeanre: rapha: bootstrap?\
[13:12:06] jeanre: are you including the variable overides before you import @bootstrap?
[13:12:32] jeanre: s/import @bootstrap/@import 'bootstrap'
[13:13:05] jeanre: but I only saw the last part of the conversation so ignore me :P
[13:13:20] rapha: jeanre: nope, using Foundation, not Bootstrap. The problem is with my own files though, has nothing to do with Foundation, either. And I'm @including _variables.sass (just my own variables, no overrides for anything) before anything else, so that shouldn't be the problem.
[13:14:24] chridal: https://gist.github.com/christiandalsvaag/d443351690f3e1f8695c
[13:14:37] chridal: I'm working on this feed where I want to cache the entire feed in JSON in Redis
[13:14:41] bronson: has joined #RubyOnRails
[13:15:07] chridal: As you can see in the controller I am calling a function called json_response, which basically in turn just calls `render json:`
[13:15:47] chridal: My question is how can I serialize the data in the FeedActions class to JSON and then not have that be an issue when something will call render json: om something which is already JSON
[13:17:39] Doddlin: has joined #RubyOnRails
[13:18:18] steharro: has joined #RubyOnRails
[13:18:28] sankaber: has joined #RubyOnRails
[13:18:30] chridal: Made some changes. Please refresh if you were looking at it.
[13:19:50] Rodya_: has joined #RubyOnRails
[13:21:37] _Tariq: has joined #RubyOnRails
[13:25:23] umdstu: has joined #RubyOnRails
[13:26:23] JohnT: has joined #RubyOnRails
[13:26:38] umdstu: i have a Hash that I sort, after which I use .to_h on the resulting Array. This works as expected, in development. In production, it results in 'undefined method to_h for #Array'. Printed both sorted objects and they are identical
[13:26:50] pyemkey: has joined #RubyOnRails
[13:29:29] paulodiniz: has joined #RubyOnRails
[13:31:50] quazimodo: has joined #RubyOnRails
[13:32:04] Limix: has joined #RubyOnRails
[13:32:47] paulodiniz: has joined #RubyOnRails
[13:33:12] umdstu: nevermind
[13:33:19] arup_r: umdstu: Does your production and devlopment using same Ruby version ?
[13:33:21] chrisarcand: umdstu: Different versions of Ruby?
[13:33:25] paulodiniz: has joined #RubyOnRails
[13:34:11] umdstu: they *do*, but the production has two versions, and capistrano's set_environment had an incomplete path
[13:34:15] davout: ohai, anyone know if there's some kind of 'around' hook for test unit
[13:34:27] davout: in addition to setup and teardown
[13:34:41] davout: (something like the rspec hook ideally)
[13:34:54] umdstu: so it was using the 1.9.3v not the 2.2v, which explains the problem
[13:35:51] umdstu: now to figure out how to fix it
[13:37:51] pydave6367: has joined #RubyOnRails
[13:39:20] Limix: has joined #RubyOnRails
[13:39:20] fsteim: has joined #RubyOnRails
[13:39:41] flat_white: has joined #RubyOnRails
[13:39:44] PedramT: has joined #RubyOnRails
[13:42:04] umdstu: so using set :default_environment, { :PATH => '...' } doesn't cause the passenger service to start with that ruby version. it uses the default system version the another rails app uses. what am i missing?
[13:45:28] dstarh: has joined #RubyOnRails
[13:45:56] rvanlieshout: shouldn't you configure passenger to use a different version in the apache or nginx config?
[13:47:20] jkamenik: has joined #RubyOnRails
[13:48:02] FCser: has joined #RubyOnRails
[13:48:09] lethjakman: has joined #RubyOnRails
[13:48:12] umdstu: good catch rvanlieshout , looks like those top two lines are missing in that config file
[13:49:29] ubiks: I am having trouble with OAuth and Google. I connect to the API and it already sends the callback, but this happens: "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed" The trigger code here: https://gist.github.com/anonymous/00fdacab088e7e188e73
[13:50:29] ubiks: sorry, the file is
[13:50:30] ubiks: C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/net/http.rb
[13:50:38] ramortegui: has joined #RubyOnRails
[13:50:56] pyemkey: has joined #RubyOnRails
[13:51:21] rvanlieshout: ubiks: somebody is not accepting that certificate
[13:51:28] rvanlieshout: most likely the OS
[13:51:32] rvanlieshout: also it's trying to use SSLv3
[13:51:43] rvanlieshout: which is disabled on most servers these days
[13:52:00] mbreedlove: has joined #RubyOnRails
[13:52:34] ubiks: rvanlieshout, is there any way of telling rails to do so? or shall i tweak Windows?
[13:52:44] bronson: has joined #RubyOnRails
[13:52:59] rvanlieshout: i think it's a windows thing
[13:53:16] rvanlieshout: e.g. it trusts the ca's supplied by windows
[13:53:17] umdstu: rvanlieshout: sadly that'd didn't help though!
[13:53:47] ubiks: it is strange because i am connecting to google
[13:53:59] ubiks: shouldn't google had left SSLv3 long ago?
[13:54:01] rvanlieshout: umdstu: what exactly is the issue? it starts the thing using the wrong ruby version?
[13:54:10] rvanlieshout: ubiks: i would expect so
[13:54:25] jscheel: has joined #RubyOnRails
[13:54:30] umdstu: yes the rails app, via apache+passenger, appears to be running as ruby-1.9.3pxxx
[13:54:54] rvanlieshout: umdstu: and where did you tell it to use something else?
[13:54:55] arup_r: How should I get time difference between 2 datetimes in minutes ? This approach throws error https://gist.github.com/aruprakshit/9a778b36868a9891840c
[13:55:24] umdstu: both in the apache .conf file and in the environment file for capistrano
[13:55:24] rvanlieshout: arup_r: what does (DateTime.current - User.first.created_at) return?
[13:55:36] arup_r: that returns error actually
[13:55:43] rvanlieshout: what does User.first.created_at return?
[13:55:46] umdstu: rvanlieshout: also restarted apache and the app itelf
[13:55:50] rvanlieshout: umdstu: you shouldn't have to add it in capistrano file
[13:55:57] rvanlieshout: how did you add it to the apache conf?
[13:56:04] arup_r: rvanlieshout: DateTime object.
[13:56:23] rvanlieshout: verified that, arup_r?
[13:56:27] jeanre_: has joined #RubyOnRails
[13:56:42] umdstu: rvanlieshout: `PassengerDefaultRuby /absolute/path/to/2.2.2/ruby`
[13:57:11] rvanlieshout: how did you get that second ruby on there then? :)
[13:57:14] umdstu: we dont use rvm on production
[13:57:30] umdstu: eh, sysadmin installed it!
[13:57:51] rvanlieshout: using what method? the methong might require a different PassengerRuby value
[13:57:59] rvanlieshout: also tried a PassengerRuby over a DefaultPassengerRuby?
[13:58:00] arup_r: rvanlieshout: yes.. User.first.created_at #=> Mon, 14 Dec 2015 14:33:33 UTC +00:00
[13:58:03] SteenJobs: has joined #RubyOnRails
[13:58:08] umdstu: let me try the second option first
[13:58:19] umdstu: as for the first, I believe an rpm
[13:58:20] rvanlieshout: arup_r: and DateTime.current
[13:58:43] rvanlieshout: arup_r: and gist console output for (DateTime.current - User.first.created_at) with the full error and trace
[13:59:46] arup_r: rvanlieshout: https://gist.github.com/aruprakshit/9a778b36868a9891840c
[14:00:05] SteenJobs: best way to record ???5-star rating??? in a db???have a separate ratings table for every rating placed?
[14:00:11] umdstu: rvanlieshout: PassengerRuby instead may be promising
[14:00:13] umdstu: need a few
[14:00:57] ubiks: rvanlieshout, good news; this seems to have solved the issue in Windows: http://stackoverflow.com/questions/5720484/how-to-solve-certificate-verify-failed-on-windows
[14:01:07] rvanlieshout: arup_r: Time.zone.now - User.last.created_at
[14:01:11] cullenb: has joined #RubyOnRails
[14:01:23] rvanlieshout: ubiks: that's not a solution
[14:01:28] rvanlieshout: that's disabling verification
[14:01:42] rvanlieshout: oh. the answer with 116 votes might help
[14:01:49] ubiks: the answer points to another .pem
[14:01:50] rvanlieshout: what windows version are you running?
[14:01:51] ubiks: but ok :(
[14:02:01] ubiks: "Monstruous edition"
[14:02:04] rvanlieshout: cause it should have proper ca certs
[14:02:19] ubiks: yup i followed the answer 116
[14:02:22] umdstu: rvanlieshout: i believe the app is using the newer ruby now, bceause visiting the url says it can't be started, cannot load such file -- rubygems.rb
[14:02:32] umdstu: so that version of ruby has no default gems installed
[14:02:41] rvanlieshout: umdstu: that could be a start
[14:03:44] umdstu: rvanlieshout: hmm. the gem executable for that ruby version has an env that poitns to the old ruby's gem path
[14:03:52] herbst: has joined #RubyOnRails
[14:04:08] umdstu: well crap. it says its ruby version is the old version too
[14:04:10] eljimmy: has joined #RubyOnRails
[14:04:12] atomical: has joined #RubyOnRails
[14:04:13] SteenJobs: has joined #RubyOnRails
[14:04:26] umdstu: even though its the gem exe in the newer rubys bin/ dir
[14:04:32] blackmesa: has joined #RubyOnRails
[14:05:00] ql6wlld: has joined #RubyOnRails
[14:05:13] gbgdev: has joined #RubyOnRails
[14:05:15] Cervajz: has joined #RubyOnRails
[14:05:25] arup_r: rvanlieshout: That worked, but no idea difference came in seconds or what ? Where is the doc of that `#-` method ?
[14:06:10] arup_r: http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html not seeing here
[14:07:36] lethjakman: has joined #RubyOnRails
[14:07:43] puria: has joined #RubyOnRails
[14:09:24] edwinvdgraaf: has joined #RubyOnRails
[14:10:17] Z00t: has joined #RubyOnRails
[14:11:03] edwinvdg_: has joined #RubyOnRails
[14:13:19] djbkd: has joined #RubyOnRails
[14:13:23] pydave6367: has joined #RubyOnRails
[14:13:31] pyemkey: has joined #RubyOnRails
[14:13:54] _Tariq: has joined #RubyOnRails
[14:14:31] zpe: has joined #RubyOnRails
[14:14:52] dangerousdave: has joined #RubyOnRails
[14:16:05] l4u-: has joined #RubyOnRails
[14:17:13] allcentury: has joined #RubyOnRails
[14:17:24] l4u-: which gems should I use for user auth in a simple API rails server?
[14:17:29] rvanlieshout: arup_r: different objects
[14:17:31] rvanlieshout: time vs datetime
[14:19:50] pwnd_nsfw: has joined #RubyOnRails
[14:20:00] brazenbraden: has joined #RubyOnRails
[14:20:36] Rodya_: has joined #RubyOnRails
[14:20:46] B1n4r10: has joined #RubyOnRails
[14:22:41] bronson: l4u-: if your needs are small, diy is probably easiest
[14:23:39] orikremer: has joined #RubyOnRails
[14:24:41] hannelita: has joined #RubyOnRails
[14:25:45] sdwrage: has joined #RubyOnRails
[14:25:55] SteenJobs: has joined #RubyOnRails
[14:27:03] chipotle: has joined #RubyOnRails
[14:28:44] SteenJobs: has joined #RubyOnRails
[14:32:03] aegis3121: has joined #RubyOnRails
[14:32:30] sinkensabe: has joined #RubyOnRails
[14:33:42] jeffleeismyhero: has joined #RubyOnRails
[14:34:34] Guest58: has joined #RubyOnRails
[14:34:44] GriffinHeart: has joined #RubyOnRails
[14:36:00] jottr: has joined #RubyOnRails
[14:36:29] bmalum: has joined #RubyOnRails
[14:39:26] pyemkey_: has joined #RubyOnRails
[14:41:33] Guest58: has joined #RubyOnRails
[14:42:11] nfk|laptop: has joined #RubyOnRails
[14:42:29] PedramT: has joined #RubyOnRails
[14:42:49] mary5030: has joined #RubyOnRails
[14:43:44] SteenJobs: has joined #RubyOnRails
[14:43:45] LambdaSo_: has joined #RubyOnRails
[14:46:59] pydave6367: has joined #RubyOnRails
[14:47:13] atomical_: has joined #RubyOnRails
[14:48:06] SteenJobs: has joined #RubyOnRails
[14:48:32] Haris: has left #RubyOnRails: ()
[14:50:56] Ergo: has joined #RubyOnRails
[14:51:54] seaworthy: has joined #RubyOnRails
[14:52:16] Toledo|gone: has joined #RubyOnRails
[14:53:01] Deft: has joined #RubyOnRails
[14:53:14] rapha: has left #RubyOnRails: ("WeeChat 1.3")
[14:53:23] Toledo|gone: has left #RubyOnRails: ()
[14:53:54] herbst: has joined #RubyOnRails
[14:53:54] herbst: has joined #RubyOnRails
[14:54:30] Deft: has joined #RubyOnRails
[14:54:52] SteenJobs: has joined #RubyOnRails
[14:55:14] AimlessRAven: has joined #RubyOnRails
[14:55:27] AimlessRAven: can i ask some different kind of rails question about facebook like button
[14:55:47] pawnbox: has joined #RubyOnRails
[14:57:52] pawnbox: has joined #RubyOnRails
[14:57:55] sankaber: has joined #RubyOnRails
[14:58:44] atomical: has joined #RubyOnRails
[14:58:48] joshkovach: has joined #RubyOnRails
[14:59:41] alip: has joined #RubyOnRails
[14:59:45] DEA7TH: has joined #RubyOnRails
[14:59:46] DEA7TH: has joined #RubyOnRails
[15:00:08] mrgreenfur: has joined #RubyOnRails
[15:00:25] bronson: I guess not. That's a relief.
[15:00:38] alphaatom: has joined #RubyOnRails
[15:00:55] mrbubbles: has joined #RubyOnRails
[15:02:48] jscheel: has joined #RubyOnRails
[15:06:05] LambdaSource: has joined #RubyOnRails
[15:06:12] tetraktys: has joined #RubyOnRails
[15:06:35] nerium: has joined #RubyOnRails
[15:06:49] atomical_: has joined #RubyOnRails
[15:07:32] chridal: I need to store some JSON in Redis. Currently doing ActiveModel::ArraySerializer.new(album, each_serializer: FeedSerializer).serializable_hash and sticking that into redis
[15:07:34] polishdub: has joined #RubyOnRails
[15:07:44] chridal: How can I get it back out though in a form that I can pass to render json:?
[15:07:56] pyemkey: has joined #RubyOnRails
[15:08:26] nfk|laptop: has joined #RubyOnRails
[15:09:32] pawnbox: has joined #RubyOnRails
[15:09:33] mordof_work: has joined #RubyOnRails
[15:09:36] Papierkorb: chridal: you can pass a ruby Hash or Array there just fine
[15:10:17] SteenJobs: has joined #RubyOnRails
[15:10:54] chridal: Papierkorb: But how do I get it back to being a Ruby Hash or Array though? What I got out of Redis after putting serializable_hash in there is just a string
[15:11:39] chridal: serializable_array I meant
[15:12:07] Papierkorb: Never used ActiveModel. You could just pass that string there to pass it through to the client if that's what you want to do ??? But that may be not what you want (leaking private columns?)
[15:12:26] Papierkorb: But as its JSON data, I'd just JSON.load it?
[15:12:31] sankaber: has joined #RubyOnRails
[15:13:58] chridal: Well, calling ActiveModel::ArraySerializer.new(album, each_serializer: FeedSerializer).serializable_array just gives me an array back, so then if I call .to_json on that and chuck that into redis
[15:14:35] chridal: Thing is though that this is going to be passed to `render json:`. So won't it be serialized "again" then?
[15:14:38] Bloomer: has joined #RubyOnRails
[15:14:53] pyemkey: has joined #RubyOnRails
[15:15:00] zpe: has joined #RubyOnRails
[15:15:51] chridal: Papierkorb: Because the data I am getting back now looks like some JSON that's been parsed to be JSONified again
[15:17:03] mdel: has joined #RubyOnRails
[15:19:35] jgt: has joined #RubyOnRails
[15:19:45] adavia: has joined #RubyOnRails
[15:21:21] stannard: has joined #RubyOnRails
[15:21:35] Rodya_: has joined #RubyOnRails
[15:22:12] B1n4r10: has joined #RubyOnRails
[15:22:33] pydave6367: has joined #RubyOnRails
[15:23:42] SteenJobs: has joined #RubyOnRails
[15:26:09] LambdaSource: has joined #RubyOnRails
[15:26:14] momomomomo: has joined #RubyOnRails
[15:27:14] stannard: has joined #RubyOnRails
[15:27:41] ql6wlld: has joined #RubyOnRails
[15:31:19] JohnT: has joined #RubyOnRails
[15:32:27] mrtomme: has joined #RubyOnRails
[15:34:58] FailBit: press x to json
[15:36:21] pwnd_nsfw: I thought it was pp
[15:37:14] herbst: has joined #RubyOnRails
[15:37:27] blackmesa: has joined #RubyOnRails
[15:37:39] bahar: has joined #RubyOnRails
[15:38:05] chridal: FailBit: Say what? :-)
[15:38:40] FailBit: http://knowyourmeme.com/memes/press-x-to-jason
[15:39:14] Limix: has joined #RubyOnRails
[15:39:16] chridal: Too complex to understand atm. :-)
[15:39:35] bronson: has joined #RubyOnRails
[15:39:44] FailBit: it's a pretty dank meme if I do say so myself
[15:40:04] chridal: https://gist.github.com/christiandalsvaag/d443351690f3e1f8695c
[15:40:36] edwinvdgraaf: has joined #RubyOnRails
[15:40:46] chridal: This is basically my issue. As you can see there the JSON is stored in redis, but then it is serialized again because of the call to `render json:` which is happening behind the `json_response` function in the controller.
[15:42:53] LambdaSource: has joined #RubyOnRails
[15:43:02] chridal: So either I need some way rendering just pure text instead of `render json:` or I need to un-jsonify the string so that it can be jsonified at `render json`
[15:43:14] spiman: has joined #RubyOnRails
[15:46:54] edwinvdg_: has joined #RubyOnRails
[15:47:23] lacuna: has joined #RubyOnRails
[15:47:23] lacuna: has joined #RubyOnRails
[15:47:52] renanoronfle: has joined #RubyOnRails
[15:47:55] Papierkorb: chridal: passing a string to json: does not re-serialize it again. why didn't you just try it?
[15:48:13] reckoner: has joined #RubyOnRails
[15:48:35] chridal: Papierkorb: I tried to pass what is already JSON to `render json:` and it serializes it again
[15:49:00] akemrir: has joined #RubyOnRails
[15:49:10] Papierkorb: chridal: could be that it does some hick hack with tainted strings or w/e. What about json: JSON.load(data) ?
[15:49:28] chridal: Papierkorb: Will give that a go.
[15:49:38] reckoner: would it be a safe bet to move some specs that run with VCR into specs/integration while they use 3rd party servies?
[15:49:42] Papierkorb: (already wrote that above too)
[15:49:51] reckoner: i say yes, but it's debatable
[15:49:54] chridal: I didn't understand it when you wrote it
[15:50:08] chridal: what you meant
[15:50:27] Frem: has joined #RubyOnRails
[15:51:40] dionysus69: has joined #RubyOnRails
[15:52:16] ubiks: I got to connect with Google's API by providing id+secret credentials and activating the API, but I am still getting "code 403, insufficient permission". I copied al the MVC here: https://gist.github.com/UbikTransmedia/7e9875248e57ba567f5a may you please help me?
[15:52:46] PedramT: has joined #RubyOnRails
[15:53:13] renanoronfle: anyone use rails-dev-box?
[15:53:16] Deft: has joined #RubyOnRails
[15:53:50] kb3ien: has joined #RubyOnRails
[15:53:57] 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.
[15:55:13] herbst: has joined #RubyOnRails
[15:55:33] lacuna: has joined #RubyOnRails
[15:56:03] kb3ien: Not sure where this is coming from: Operation not permitted @ chown_internal /some/path I'd previously used www-data as both teh User,Group but it seems disatisifed with that. How do I snag the EUID ?
[15:59:16] tubbo: renanoronfle: i think the core team does :)
[15:59:34] tubbo: renanoronfle: it's meant for developing the actual framework, not rails applications.
[16:00:56] renanoronfle: tubbo, humm i try use to try contribute, and i have some tests broken :(
[16:01:33] aegis3121: has joined #RubyOnRails
[16:01:40] krz: has joined #RubyOnRails
[16:01:56] tubbo: renanoronfle: did you post this? :) https://github.com/rails/rails-dev-box/issues/102
[16:02:14] LambdaSource: has joined #RubyOnRails
[16:02:29] arup_r: has joined #RubyOnRails
[16:02:52] smathy: has joined #RubyOnRails
[16:03:27] kies^: has joined #RubyOnRails
[16:04:10] kerunaru: has joined #RubyOnRails
[16:04:36] renanoronfle: tubbo, nice tks, this will help me
[16:05:33] brycesenz: has joined #RubyOnRails
[16:06:25] mjc_: has joined #RubyOnRails
[16:07:08] futilegames: has joined #RubyOnRails
[16:07:20] nettoweb: has joined #RubyOnRails
[16:09:49] mbreedlove: has joined #RubyOnRails
[16:10:23] chouhoulis: has joined #RubyOnRails
[16:11:11] Cervajz: has joined #RubyOnRails
[16:11:49] sarink: has joined #RubyOnRails
[16:11:54] rubyonrails989: has joined #RubyOnRails
[16:11:54] jottr: has joined #RubyOnRails
[16:11:58] brycesenz: So...building SOAP API integrations in Ruby. Are there any tools that aren't awful?
[16:12:23] tubbo: brycesenz: we use savon if we need to do that, it's about as good as SOAP is gonna get ;)
[16:12:38] pavan__: has joined #RubyOnRails
[16:12:54] brycesenz: tubbo - really? I tried Savon and had so many problems with it that I just bailed.
[16:13:21] tubbo: brycesenz: what were the problems you had?
[16:13:26] brycesenz: tubbo - when you say "it's as good as SOAP is going to get", do you mean that you think it's a rock solid library for that task, or that it's the best of a bunch of bad options?
[16:13:29] arup_r: has joined #RubyOnRails
[16:14:10] tubbo: brycesenz: i mean you can't polish a turd. SOAP is inherently shitty to deal with, Savon just seems like a reliable abstraction over Excon (it's HTTP client) and XML parsing.
[16:14:18] tubbo: brycesenz: are there any other options? i'm certainly not aware of them...
[16:15:44] zpe: has joined #RubyOnRails
[16:16:02] brycesenz: tubbo - I just had infinite frustrations try to get Savon to output the correct namespaces for nodes, etc. Like, I could know the XML I wanted coming out of the other side, and it was a riddle to make Savon get it right.
[16:16:33] brycesenz: tubbo - I eventually just kind of rolled my own solution, but I'm loathe to do it again
[16:17:02] KineticX: has joined #RubyOnRails
[16:17:12] brycesenz: tubbo - maybe the issue is just that Savon's documentation seems to be pretty lacking, at least as I've found. But you're right - SOAP is the worst
[16:17:30] rhizome: gemify your solution!
[16:17:40] tubbo: tubbo: i mean, we built a library on top of savon in order to handle OMS integrations with a SOAP API...it's a bad practice to use 3rd-party APIs in your application without some sort of middleman object.
[16:17:49] tubbo: bahaha brycesenz ^
[16:19:21] brycesenz: tubbo - Agreed with you comment about middleman objects. We've abstracted the connection to where we can just pass in JSON parameters, which is nice. But that middleman literally just has an XML template is dumps stuff into and POSTs that out, then parses the incoming mess
[16:19:28] brycesenz: rhizome - one day I will!
[16:19:35] tubbo: brycesenz: like for example, if i use Gibbon to integrate with Mailchimp...i'd create an e.g. Mailchimp::Subscriber class and potentially a Mailchimp::Gateway class to handle the validation of incoming new subscriber data and the communication between my app and Mailchimp's API, for example.
[16:19:37] voidDotClass: has joined #RubyOnRails
[16:19:45] kfrz: has joined #RubyOnRails
[16:19:53] TheDracle: has joined #RubyOnRails
[16:20:05] voidDotClass: I'm a bit new to ruby. I created a model 'Account', as: module MyApp, class Account
[16:20:09] brycesenz: tubbo - yeah, I take your meaning.
[16:20:18] voidDotClass: I'm now trying to access MyApp::Account in an rspec test
[16:20:30] voidDotClass: but i get the error that constant not defined or couldnt be auto loaded, etc
[16:20:47] voidDotClass: if i remove the module and just use 'Account', that works
[16:21:29] arup_r: why are you using the `MyApp` ?
[16:22:08] arup_r: you dn't need.. use it only `Account` ..
[16:22:20] LambdaSo_: has joined #RubyOnRails
[16:22:22] Rodya_: has joined #RubyOnRails
[16:22:40] moresilenter: has joined #RubyOnRails
[16:24:13] atomical: has joined #RubyOnRails
[16:24:13] Deft: has joined #RubyOnRails
[16:26:44] voidDotClass: arup_r, but if i want to use it, i can't? e.g in java, you can either say myClass or include the full qualified name, both work
[16:26:49] pyemkey: has joined #RubyOnRails
[16:27:04] rhizome: because you're new to ruby
[16:27:27] Papierkorb: voidDotClass: Ruby is not Java. And if MyApp::Foo does not work, then MyApp::Foo is wrong.
[16:27:47] voidDotClass: so the qualified name won't work?
[16:28:02] corioliss: has joined #RubyOnRails
[16:28:06] Papierkorb: voidDotClass: "Account" is the 'qualified' name.
[16:28:19] voidDotClass: qualified name = the full thing
[16:28:29] voidDotClass: so if I include module, then dont use qualified name, and if i dont include module, then use qualified name?
[16:28:36] Papierkorb: Though I'd be wary using 'qualified name' as concept in ruby
[16:28:53] disgrntld: has joined #RubyOnRails
[16:28:53] lacuna: has joined #RubyOnRails
[16:28:55] Papierkorb: voidDotClass: Please !gist the offending code and your model ruby files
[16:29:12] Papierkorb: Btw, do I have to pay someone for !gist and friends to work?
[16:30:11] voidDotClass: In a rspec test, i have the line "expect Account.count eq 0"
[16:30:24] voidDotClass: that produces the query "SELECT COUNT(#<RSpec::Matchers::BuiltIn::Eq:0x007f2a2d6a2be8>) FROM "accounts"
[16:30:34] Papierkorb: voidDotClass: as rule of thumb, do NOT mix concepts and/or paradigmas of one language into another language. It never really works, and if it does, those two languages are pretty close (usually!), or you're lucky (Which is the exception)
[16:30:43] Bloomer: has joined #RubyOnRails
[16:31:13] Papierkorb: what one considers good ruby code would be horrific in Java, and vice-versa
[16:31:59] Encapsulation: has joined #RubyOnRails
[16:32:20] voidDotClass: Is there a syntax error in "expect Account.count eq 0"
[16:33:07] Papierkorb: voidDotClass: I only know what you wanted because you told us that it's rspec. else, it does not really resemble rspec code.
[16:33:08] rhizome: i don't know rspec, but i think the letters "to" might have to be in there somewhere
[16:33:17] Papierkorb: voidDotClass: expect(Account.count).to eq 0
[16:34:22] tubbo: Papierkorb: it's under a whitelist maintained by radar, just so people can't ddos it by executing a shitload of commands or whateer.
[16:34:23] arup_r: voidDotClass: ^^ correct syntax
[16:34:24] tubbo: whatever*
[16:34:37] tubbo: voidDotClass: yes
[16:37:54] mordof_work: has joined #RubyOnRails
[16:38:15] kies^: has joined #RubyOnRails
[16:39:36] pyemkey: has joined #RubyOnRails
[16:40:05] LambdaSource: has joined #RubyOnRails
[16:40:18] Macaveli: has joined #RubyOnRails
[16:42:45] atomical: has joined #RubyOnRails
[16:44:58] lacrymology: has joined #RubyOnRails
[16:45:47] CheckYourSix: has left #RubyOnRails: ()
[16:45:50] brycesenz: has joined #RubyOnRails
[16:46:26] aegis3121: has joined #RubyOnRails
[16:49:19] [Butch]: has joined #RubyOnRails
[16:50:49] Detch: has joined #RubyOnRails
[16:51:11] silverdust: Why do I get an empty <option> with this http://pastie.org/10689985 ?
[16:51:49] silverdust: I have one empty option tag
[16:53:04] shinnya: has joined #RubyOnRails
[16:54:08] reckoner: anyone use filepicker to host file assets for testing?
[16:54:23] pvertenten: has joined #RubyOnRails
[16:54:29] speaking1ode: has joined #RubyOnRails
[16:55:00] silverdust: and I don't have an empty record in @collections there
[16:55:47] aegis3121: silverdust: my guess is that the signature is select(object, method, choices, ...), but your second parameter is your choices.
[16:56:03] aegis3121: But I could be way off base; I don't write forms all that frequently.
[16:56:10] chadhs: has joined #RubyOnRails
[16:56:40] zpe: has joined #RubyOnRails
[16:57:14] silverdust: okay I'd try that
[16:57:37] voidDotClass: is there a way to 'include MyApp' module at the top of all files, models, etc so they dont have to be called manually?
[16:58:12] silverdust: um no with that I get undefined method `merge' for #<ActiveSupport::SafeBuffer:0x007fad9c30ca18>
[16:59:07] momomomomo: has joined #RubyOnRails
[16:59:27] jkamenik: has joined #RubyOnRails
[16:59:33] speakingcode: has joined #RubyOnRails
[17:00:12] tubbo: voidDotClass: not reliably
[17:00:34] voidDotClass: tubbo, is it conventional to have a helper or such that you include in all files?
[17:00:36] tubbo: voidDotClass: why do you want to namespace everything under MyApp?
[17:00:39] tubbo: voidDotClass: no
[17:00:39] voidDotClass: which then does your global includes?
[17:00:50] tubbo: voidDotClass: "global includes" == bad code
[17:00:51] voidDotClass: but i want MyApp to be included
[17:01:09] voidDotClass: yeah, then again ruby isn't great code by default. j/k
[17:03:19] tubbo: voidDotClass: why do you want MyApp to be included?
[17:03:24] tubbo: voidDotClass: what problem does this solve?
[17:03:38] voidDotClass: tubbo, i have MyApp:LONG_CONSTANT_NAME
[17:04:04] tubbo: voidDotClass: that's not a problem
[17:04:05] voidDotClass: so it saves me some typing to just do LONG_CONSTANT_NAME instead of MyApp::LONG_...
[17:04:17] tubbo: voidDotClass: why can't you just set LONG_CONSTANT_NAME = whatever?
[17:04:30] tubbo: voidDotClass: again, my question, why do you need the MyApp namespace?
[17:05:05] atomical_: has joined #RubyOnRails
[17:05:55] speaking1ode: has joined #RubyOnRails
[17:06:21] tubbo: voidDotClass: that doesn't sound like a problem, it sounds like an opinion.
[17:06:29] tubbo: voidDotClass: in this case, your app is called MyApp, right?
[17:06:56] tubbo: voidDotClass: so what is MyApp for?
[17:07:31] voidDotClass: not giving away the real name in public
[17:07:36] tubbo: what i'm getting at here -> there's most likely a better way to accomplish whatever you're doing.
[17:07:47] PedramT: has joined #RubyOnRails
[17:07:49] tubbo: lol yeah i bet this is like the next unicorn so you probably shouldn't
[17:08:00] tubbo: i'll tell my grandkids "i was there when voidDotClass made the world's greatest tech company"
[17:08:03] tubbo: :rolleyes:
[17:08:04] akkmaxon: has joined #RubyOnRails
[17:08:09] voidDotClass: You just might
[17:08:50] tubbo: voidDotClass: 20 questions time because i know how you like making things difficult, being a Java developer...is MyApp actually an app?
[17:10:14] orikremer: has joined #RubyOnRails
[17:11:51] marr: has joined #RubyOnRails
[17:12:03] voidDotClass: tubbo, nah, actually i do have a startup, which I use java for, but this is for a client, I don't want them to google their project and find this.
[17:12:15] voidDotClass: client wanted to use rails and not java, so here i am
[17:12:42] tubbo: i find it somewhat interesting how many people in here have such technical clients
[17:13:12] tubbo: even the most tech-savvy clients i've ever had didn't give a fuck how i built whatever i built...as long as it worked they were cool with whatever i was doing.
[17:13:17] flashpoint9: has joined #RubyOnRails
[17:14:02] tubbo: voidDotClass: look here's what i'm trying to say...ruby is definitely not java, and makes a lot of different decisions on what is right and wrong based on how it's actually working under the hood.
[17:14:14] reckoner: clients usually care because they want to hire for that type of developer later (usually)
[17:14:40] voidDotClass: my client isn't tech savvy, they just think most sites these days are in rails, so they want to use rails, etc
[17:14:52] pawnbox: has joined #RubyOnRails
[17:14:57] voidDotClass: and i think ruby's fairly good actually, i'm just getting used to not having type safety, etc
[17:15:22] reckoner: yeah, ruby is a leap for most java developers
[17:15:26] pawnbox: has joined #RubyOnRails
[17:15:36] tubbo: voidDotClass: you'll probably enjoy the easy refactor-ability when you get into making a bunch of classes.
[17:15:39] tubbo: voidDotClass: also don
[17:15:44] tubbo: don't* forget about modules
[17:15:49] tubbo: they're not just for namespacing!
[17:15:58] voidDotClass: i doubt anything beats java for refactorability
[17:16:08] voidDotClass: i like the lack of verbosity though
[17:16:26] tubbo: voidDotClass: generally, i've found statements like that, weighing one lang over the other, tend to make the person saying it look more stupid.
[17:16:40] rhizome: voidDotClass: you can create a million one-line methods in ruby too
[17:17:13] tubbo: the fact that i don't have to give a shit about types is a huge leap forward in being able to refactor. but honestly, a lot of the refactorability comes from Rails
[17:17:25] tubbo: in straight Ruby, you don't get the autoloading or conventions that Rails provides for you.
[17:19:15] Cervajz_: has joined #RubyOnRails
[17:19:42] Limix: has joined #RubyOnRails
[17:23:26] Rodya_: has joined #RubyOnRails
[17:24:01] The_Phoenix: has joined #RubyOnRails
[17:24:47] B1n4r10: has joined #RubyOnRails
[17:24:54] LambdaSo_: has joined #RubyOnRails
[17:26:04] safety_cut: has joined #RubyOnRails
[17:26:23] atomical: has joined #RubyOnRails
[17:28:06] bronson: has joined #RubyOnRails
[17:28:22] markh: has joined #RubyOnRails
[17:28:36] dangerousdave: has joined #RubyOnRails
[17:28:58] pyemkey: has joined #RubyOnRails
[17:29:27] bricker: has joined #RubyOnRails
[17:30:07] sharkman: has joined #RubyOnRails
[17:30:54] sharkman: i have a table Game and a table BoxScore. each game entry contains two box scores. i want to query for all box scores ordered on the date of the associated game
[17:30:57] sharkman: how can i do that
[17:31:08] seaworthy: has joined #RubyOnRails
[17:31:08] seaworthy: has joined #RubyOnRails
[17:31:40] herbst: has joined #RubyOnRails
[17:36:45] mrbubbles: has joined #RubyOnRails
[17:37:08] LambdaSource: has joined #RubyOnRails
[17:38:37] mbreedlove: has joined #RubyOnRails
[17:39:06] claytonzaugg: has joined #RubyOnRails
[17:40:07] kt2: has joined #RubyOnRails
[17:40:33] arup_r: sharkman: "on the date of the game..." not clear what u meant ?
[17:40:47] sharkman: the game table has a date column
[17:40:54] sharkman: the box score table does not have a date column
[17:40:56] pyemkey: has joined #RubyOnRails
[17:41:59] _Tariq: has joined #RubyOnRails
[17:43:19] chrisarcand: sharkman: http://guides.rubyonrails.org/active_record_querying.html#joining-tables and http://guides.rubyonrails.org/active_record_querying.html#ordering
[17:44:10] flashpoint9: has joined #RubyOnRails
[17:44:22] Pazician: has joined #RubyOnRails
[17:45:47] flashpoint9: Im working on a job that will send out an email daily with some data in it, for job execution what is the best 3rd party to use? Sidekiq, Resque, Delayed Job? Keep in mind I'm not awesome with rails so difficulty level matters a little
[17:46:03] jkamenik: has joined #RubyOnRails
[17:46:25] edwinvdgraaf: has joined #RubyOnRails
[17:48:11] ericfreese: has joined #RubyOnRails
[17:49:46] momomomomo: has joined #RubyOnRails
[17:49:59] rakm: has joined #RubyOnRails
[17:52:13] mhib: has joined #RubyOnRails
[17:53:12] sleungcy: has joined #RubyOnRails
[17:53:28] _djbkd: has joined #RubyOnRails
[17:54:47] lacuna: has joined #RubyOnRails
[17:54:49] nfk|laptop: has joined #RubyOnRails
[17:55:32] _djbkd: has joined #RubyOnRails
[17:55:40] LambdaSource: has joined #RubyOnRails
[17:55:52] mikecmpbll: has joined #RubyOnRails
[17:57:13] reckoner: has left #RubyOnRails: ()
[17:57:30] aegis3121: has joined #RubyOnRails
[18:00:51] mag42c: has joined #RubyOnRails
[18:01:57] greengriminal: has joined #RubyOnRails
[18:04:45] ornerymoose: has joined #RubyOnRails
[18:06:43] roshanavand: has joined #RubyOnRails
[18:06:53] DEA7TH_: has joined #RubyOnRails
[18:07:24] srinidhi: has joined #RubyOnRails
[18:08:11] sleungcy: has joined #RubyOnRails
[18:09:14] kerunaru: has joined #RubyOnRails
[18:11:05] pyemkey: has joined #RubyOnRails
[18:13:46] nfk|laptop: has joined #RubyOnRails
[18:14:00] orikremer: has joined #RubyOnRails
[18:15:09] kt2: has joined #RubyOnRails
[18:15:26] LambdaSource: has joined #RubyOnRails
[18:16:31] northfurr: has joined #RubyOnRails
[18:17:27] bronson: has joined #RubyOnRails
[18:17:38] guacamole: has joined #RubyOnRails
[18:21:13] codepete: has joined #RubyOnRails
[18:21:59] rhizome: flashpoint9: whatever's listed as most popular or active at ruby-toolbox.com
[18:22:06] emtsmth: has joined #RubyOnRails
[18:22:30] DEA7TH_: has joined #RubyOnRails
[18:22:30] DEA7TH_: has joined #RubyOnRails
[18:22:39] zpe: has joined #RubyOnRails
[18:23:06] emtsmth: even with the coming changes in rails 5, is rails really a practical solution for building APIs? with --api isn't the remaining package still kind of bloated?
[18:23:36] rhizome: "kind of bloated" is a value judgement, so it's a personal decision on that point
[18:23:47] rhizome: i.e. context dependent
[18:24:11] Rodya_: has joined #RubyOnRails
[18:24:48] momomomomo: has joined #RubyOnRails
[18:25:35] orikremer: has joined #RubyOnRails
[18:25:41] flashpoint9: rhizome: thanks
[18:25:58] mordof_work: has joined #RubyOnRails
[18:26:00] uris: has joined #RubyOnRails
[18:26:10] aegis3121: has joined #RubyOnRails
[18:26:30] nickjj: flashpoint9, i've been using sidekiq for a long time. no complaints here
[18:26:32] arthurix: has joined #RubyOnRails
[18:27:16] flashpoint9: nickjj: that's going to be my second attempt if this other gem doesnt work (https://github.com/javan/whenever) the whenever gem seems super simple
[18:27:39] nickjj: flashpoint9, totally different use cases for those gems
[18:28:22] nickjj: whenever is a cron abstraction , sidekiq is a background/task queue
[18:28:34] flashpoint9: hmmmm, i already have a mailer setup, using letter_opener to test, I only need that mailer task run once a day
[18:28:59] nickjj: whenever would be ok for that
[18:29:29] flashpoint9: nickjj: what is sidekiq used more for?
[18:30:04] nickjj: flashpoint9, if let's say you want to kick off an email after a user submits a form
[18:30:20] nickjj: it would be beneficial to send the email through sidekiq, so it gets executed outside of your main rails process
[18:30:26] flashpoint9: ah ok, so sidekiq gives you more granular functionality
[18:30:46] jthomas_: has joined #RubyOnRails
[18:30:49] jhn: has joined #RubyOnRails
[18:30:51] nickjj: this way if your mail provider takes 30 seconds to respond (something out of your control), it won't block the entire unicorn worker or whatever you're using as an app server
[18:31:14] flashpoint9: thats really cool
[18:31:18] shibabu: has joined #RubyOnRails
[18:31:56] nickjj: yeah, i would use sidekiq for any third party http request or any task that you know will take some amount of time that's not near instant
[18:33:19] nickjj: whenever is still good to use tho, i use it for things like daily sitemap regeneration
[18:33:33] nickjj: but only on legacy projects
[18:33:34] flashpoint9: nickjj: could i also use whenever to schedule an api call and set those values to my database, im hitting quandl api for daily prices on gold and silver but each call takes 5 seconds, really slowed down the app
[18:34:01] flashpoint9: oh so sidekiq is better for the api calls?
[18:34:02] nickjj: for recurring tasks now a days i just use clockwork
[18:34:13] flashpoint9: ok ill check clickwork
[18:34:24] edwinvdgraaf: has joined #RubyOnRails
[18:34:30] nickjj: https://github.com/tomykaira/clockwork
[18:34:51] jottr: has joined #RubyOnRails
[18:35:04] flashpoint9: nickjj: so dont use the adamwiggins one?
[18:35:04] nickjj: but in this case, i was/am already using sidekiq
[18:35:25] nickjj: the fork is maintained
[18:35:53] nickjj: my use case might be a different than yours tho
[18:35:57] sandstrom: has joined #RubyOnRails
[18:36:12] nickjj: i use clockwork with sidekiq because it doesn't depend on having cron installed on your host
[18:36:22] voidDotClass: has joined #RubyOnRails
[18:38:42] smathy: ACTION can't imagine a host without a cron daemon
[18:39:59] uris: has joined #RubyOnRails
[18:40:39] pulgolino: has joined #RubyOnRails
[18:41:26] smathy: I wonder how logs get rotated, system/security updates are checked for, backups are done, ntp is resynced... *shudder*
[18:41:58] LambdaSource: has joined #RubyOnRails
[18:42:33] nickjj: smathy, no need for log rotation when things are logged to stdout and distributed to a central server
[18:43:26] nickjj: i do backups from a 2nd host and for the rest, i use systemd timed services which could be compared to cron
[18:43:35] B1n4r10: has joined #RubyOnRails
[18:44:24] fmcgeough: has joined #RubyOnRails
[18:46:02] _Tariq: has joined #RubyOnRails
[18:46:24] [Butch]: has joined #RubyOnRails
[18:47:49] orikremer: has joined #RubyOnRails
[18:49:07] kt2: has joined #RubyOnRails
[18:49:19] Guest: has joined #RubyOnRails
[18:55:12] uris: has joined #RubyOnRails
[18:58:53] baweaver: has joined #RubyOnRails
[18:59:05] Encapsulation: has joined #RubyOnRails
[18:59:43] blackmesa: has joined #RubyOnRails
[19:00:09] Psyq: has joined #RubyOnRails
[19:00:48] uris: has joined #RubyOnRails
[19:01:11] mhib: has joined #RubyOnRails
[19:03:02] smathy: Ok, so instead of having a crond installed you have systemd instead.
[19:04:09] sonofdirt: has joined #RubyOnRails
[19:04:34] JohnT: has joined #RubyOnRails
[19:06:17] LambdaSource: has joined #RubyOnRails
[19:06:43] treehug88: has joined #RubyOnRails
[19:09:08] cnk: has joined #RubyOnRails
[19:09:42] Raydiation: has joined #RubyOnRails
[19:09:48] nickjj: smathy, yep but i also use systemd for managing processes / service dependencies, etc.
[19:11:03] voidDotClass: anyone know how to get rspec expects to work with boolean values?
[19:11:17] Limix: has joined #RubyOnRails
[19:11:20] voidDotClass: e.g i'm doing expect (! acct.valid?) but that seems to always work no matter what
[19:11:32] ur5us: has joined #RubyOnRails
[19:13:02] Papierkorb: voidDotClass: that's not how it works.
[19:13:07] Papierkorb: voidDotClass: expect(acct).to be_valid
[19:13:17] Papierkorb: voidDotClass: yes that'll work without further work on your end
[19:13:30] baweaver: has joined #RubyOnRails
[19:13:54] voidDotClass: Papierkorb, what about things like expect ( acct.authenticate(TEST_PW))
[19:14:41] Papierkorb: voidDotClass: expect(returns_a_boolean).to be true
[19:15:01] Papierkorb: voidDotClass: OR if it just needs to be a truth value: expect(x).to be_truthy
[19:15:33] symbole: has joined #RubyOnRails
[19:15:34] Papierkorb: voidDotClass: https://github.com/rspec/rspec-expectations also refer to the README
[19:15:58] voidDotClass: Papierkorb, expect (acct.valid?).to eq false
[19:15:58] voidDotClass: NoMethodError:
[19:15:58] voidDotClass: undefined method `to' for false:FalseClass
[19:15:59] northfurr: has joined #RubyOnRails
[19:16:15] pipework: voidDotClass: The space between the expect and the parens needs to be removed.
[19:16:16] guacamole: has joined #RubyOnRails
[19:16:16] pyemkey: has joined #RubyOnRails
[19:16:33] Papierkorb: voidDotClass: no spaces between function calls and the argument list, if the argument list uses parens
[19:16:56] Papierkorb: (x) is an expression on its own
[19:17:29] hannelita: has joined #RubyOnRails
[19:17:35] Papierkorb: the space there in Java is already uncommon on itself :P
[19:17:56] Papierkorb: Coming from C++, I did so too and learnt it the same in ruby.
[19:19:22] kadoppe: has joined #RubyOnRails
[19:23:08] fox_mulder_cp: critical bug in ssh. 7.1 released
[19:23:29] zpe: has joined #RubyOnRails
[19:24:41] jhn: has joined #RubyOnRails
[19:24:51] Rodya_: has joined #RubyOnRails
[19:25:22] guacamole: has joined #RubyOnRails
[19:25:54] PedramT: has joined #RubyOnRails
[19:26:07] arup_r: has joined #RubyOnRails
[19:27:03] lacuna: has joined #RubyOnRails
[19:27:04] lacuna: has joined #RubyOnRails
[19:27:47] pyemkey: has joined #RubyOnRails
[19:27:48] bronson: fox_mulder_cp: just openssh clients. servers are ok.
[19:33:03] PedramT: has joined #RubyOnRails
[19:33:34] baweaver: has joined #RubyOnRails
[19:33:44] manfrin: has joined #RubyOnRails
[19:35:37] Hans267: has joined #RubyOnRails
[19:35:39] orikremer: has joined #RubyOnRails
[19:36:15] flat_white: has joined #RubyOnRails
[19:36:32] ericfreese: has joined #RubyOnRails
[19:36:56] borodin_: has joined #RubyOnRails
[19:37:10] Deft: has joined #RubyOnRails
[19:37:31] borodin_: what's your favorite online tool for building little css widgets?
[19:38:12] PedramT: has joined #RubyOnRails
[19:38:48] chadhs: has joined #RubyOnRails
[19:39:20] uris: has joined #RubyOnRails
[19:39:57] jkamenik: has joined #RubyOnRails
[19:40:30] brycesenz: has joined #RubyOnRails
[19:41:59] alex88: has joined #RubyOnRails
[19:43:40] pyemkey: has joined #RubyOnRails
[19:45:09] flat_white: has joined #RubyOnRails
[19:45:58] edwinvdgraaf: has joined #RubyOnRails
[19:47:04] djbkd: has joined #RubyOnRails
[19:48:17] nettoweb: has joined #RubyOnRails
[19:49:33] LambdaSource: has joined #RubyOnRails
[19:53:31] superscott: has joined #RubyOnRails
[19:55:37] pyemkey: has joined #RubyOnRails
[19:57:16] mrbubbles: has joined #RubyOnRails
[19:58:45] uris: has joined #RubyOnRails
[19:59:07] FernandoBasso: has joined #RubyOnRails
[20:00:17] rubyonrails578: has joined #RubyOnRails
[20:00:23] Sawbones: has joined #RubyOnRails
[20:02:44] rubyonrails210: has joined #RubyOnRails
[20:03:16] pyemkey: has joined #RubyOnRails
[20:03:33] bronson: I hate that Array::Hash::Array is legal, and I really hate that Rails autoloading hides when it happens.
[20:04:00] bronson: 30 minutes in, still haven't found the broken dependency
[20:05:35] roshanavand: has joined #RubyOnRails
[20:05:49] Radar: GOOD MORNING
[20:06:10] Radar: Papierkorb: Believe in your heart that you have access to the bot.
[20:06:28] Papierkorb: Radar: OOOHHHAAAYYYOOO SIR!
[20:06:40] roshanavand: has joined #RubyOnRails
[20:06:49] tetraktys: has joined #RubyOnRails
[20:07:02] fox_mulder_cp: Radar good morning )) at 22:00 ))))
[20:07:16] Radar: fox_mulder_cp: little thing called timezones. Quite amazing relaly.
[20:07:17] Papierkorb: Radar: I promise I may use the power of the bot to mostly help and only sometimes troll!
[20:07:34] uris: has joined #RubyOnRails
[20:08:04] Radar: Papierkorb: He can take away as easily as he giveth
[20:08:07] jnj: has joined #RubyOnRails
[20:08:28] fox_mulder_cp: Radar: what what? what is timezone?^)
[20:09:43] jnj: So I have a pretty basic rails question. I'm trying to create a directory that'll list off a bunch of buildings, and then when you click on the building it'll list off all the rooms. How do I make it such that when you create a room you must specify the building it belongs to, and whenever you're editing a building you can also add rooms?
[20:10:10] jnj: I currently have active record associations, and I'm looking through a bunch of the rails guides
[20:11:45] voidDotClass: in my test, expect(acct.valid?).to eq true is failing. but when i do puts "errors: #{acct.errors.messages}" , it shows: "errors: {}"
[20:11:49] voidDotClass: showing that there were no errors?
[20:11:56] voidDotClass: then why is acct.valid? returning false
[20:12:50] bronson: jnj, sounds like a ui issue? or are you asking about validations?
[20:12:57] AntiSpamMeta: has joined #RubyOnRails
[20:13:19] bronson: voidDotClass: acct.valid? might return something other than true or false
[20:13:21] yardenbar: has joined #RubyOnRails
[20:13:25] solars: general question: with rails 5, action cable etc coming up, I want to learn a "new" frontend framework. does anyone know good articles guiding through the react, angular, polymer jungle so I can find out what's best to learn? :)
[20:13:29] voidDotClass: bronson, it is returning false
[20:13:43] voidDotClass: expected: true
[20:13:59] jnj: bronson: validations, I'm reading through the rails guides now. I naively thought I could get started on my project just be reading the getting started guide haha. Turns out the initial guide doesn't have everything I need.
[20:14:06] Radar: jnj: rooms would be a nested route within buildings
[20:14:12] mordof_work: has joined #RubyOnRails
[20:14:21] dsimon: has joined #RubyOnRails
[20:14:28] Z00t: has joined #RubyOnRails
[20:14:29] bronson: voidDotClass: huh, that is weird. mocking/stubbing issue?
[20:14:41] dsimon: hey all, seeing some strange behavior in params that i'm not even sure how to name well enough to google
[20:15:03] jnj: Radar: So something like resources :buildings do resources :rooms?
[20:15:07] voidDotClass: bronson, why would it be
[20:15:11] Radar: jnj: gisting one moment
[20:15:15] dsimon: i have a Roster model and a (non-restful) RostersController, which has a method that accepts json
[20:15:16] bronson: solars: back in Jul I went through React, Angular and Backbone. Ended up on React fwiw.
[20:15:29] Radar: jnj: https://gist.github.com/radar/a373fc2375198c178632
[20:15:30] jnj: Radar: Thanks!
[20:15:32] bronson: don't know of any good tutorials but it isn't too bad... just got to stick with it until you have that a-ha moment.
[20:15:45] Radar: voidDotClass: Show the full code please.
[20:15:46] solars: bronson, a lot of people seem to write that it's just a workaround for polymer, and angular is more powerful..
[20:15:51] solars: bronson, very confused
[20:15:57] voidDotClass: Radar , acct = build(:customer) puts "errors: #{acct.errors.full_messages}" expect(acct.valid?).to eq true . output: errors: [] , expected: true got: false
[20:16:00] Radar: voidDotClass: You're likely putting the errors check before the .valid? call and expecting it to show you errors.
[20:16:06] dsimon: Whenever I pass, via JSON, an attribute that has the same name as a field in Roster, it appears normally in params under that name, but ALSO in a "roster" sub-param
[20:16:16] bronson: I wonder if all the noisy phpers back in the day turned into fronted developers.
[20:16:19] voidDotClass: good catch Radar
[20:16:20] Radar: voidDotClass: Yup, exactly right. You need to call acct.valid? on the line before you do the .errors check
[20:16:36] bronson: so much religion in npm....
[20:16:41] yfeldblum: has joined #RubyOnRails
[20:16:54] dsimon: For example, Roster has a field called "exam", and if I send {"exam": 33} via JSON then params contains {"exam" => 33, "roster" => { "exam" => 33 }}
[20:17:02] bronson: solars: sure, Angular gives you more, but it's a hell of a lot more to learn. I didn't need it.
[20:17:11] voidDotClass: is there a way to get rspec to automatically show the errors, or a string, in case of a failure like that
[20:17:16] dsimon: why is Rails doing this? is it because the controller name matches a model name?
[20:17:32] cnk: solars: watch this first - so you have a basis for making your decision http://confreaks.tv/videos/mwrc2014-unpacking-technical-decisions
[20:17:37] robbyoconnor: has joined #RubyOnRails
[20:17:37] jnj: radar: :o, didn't know you were the one of the people who wrote rails 4 in action. Any guides for rails that you recommend for someone just starting out? I absolutely adore ruby, and rails is amazing
[20:17:42] dsimon: there's nothing else that particularly associates that controller with that model, and it happens even if the action method doesn't do anything but render a fixed dummy response
[20:18:00] Radar: jnj: yeah that's me :)
[20:18:02] robbyoconnor: has joined #RubyOnRails
[20:18:06] bronson: workaround for polymer? ha, no. not unless polymer suddenly got declarative.
[20:18:07] Radar: jnj: Rails guides or Ruby guides?
[20:18:39] dsimon: i've verified also that this behavior doesn't occur for attribute names that don't match anything in my model
[20:18:43] bronson: jnj: other than R4IA? hard to do better than that book for big picture stuff.
[20:19:05] dsimon: e.g. sending {"foo": 123} ends up with nothing but the params {"foo" => 123}
[20:19:25] aegis3121: has joined #RubyOnRails
[20:19:55] solars: bronson, cnk, thx, I think I know it already - I spent the last couple of years in ruby backends, so I need to get back on the frontend train a bit.. many changes there
[20:20:01] Radar: dsimon: http://api.rubyonrails.org/classes/ActionController/ParamsWrapper.html
[20:20:05] Radar: dsimon: That is what is doing it
[20:20:34] bronson: solars: only if you want to... it'll all be different 3 years from now.
[20:20:41] cnk: solars: I really liked her slide with the options - if you thnk like X, you might enjoy this framework...
[20:20:50] bronson: that said, I do like React. I don't miss jquery at all.
[20:20:53] cnk: Personally I am really liking React
[20:20:56] solars: bronson, sure but I also do want to work on some private projects that have a frontend :) so it doesn't hurt
[20:21:08] jnj: bronson: sweet, I'll definitely but R4IA in the future. I already have the well-grounded rubyist and eloquent ruby, it'll be a great book to add to my collection
[20:21:16] dsimon: Radar, ah, that's it! thank you :-)
[20:21:36] dsimon: sometimes i love magic, but sometimes it can be very disorienting
[20:22:04] cnk: I am using it on a Django project but have been meaning ot check out these guys React on Rails http://www.shakacode.com/opensource/
[20:22:29] Radar: Apparently I can't math good this morning. It's currently 7:22am and my train is at 7:28am, but it's a 15min walk to the station.
[20:22:31] kfrz: has joined #RubyOnRails
[20:22:40] Radar: Too busy answering questions here!
[20:22:54] bronson: Radar: bike!
[20:23:09] dsimon: Tell whoever you're late meeting up with that we appreciate the sacrifices you make for us :-)
[20:23:25] Radar: bronson: not a terrible idea :)
[20:23:29] Radar: dsimon: It's my job.
[20:23:38] bronson: cnk: the shaka react-on-rails project is the most mature one so far
[20:23:44] safety_cut: has joined #RubyOnRails
[20:24:30] bronson: but I don't need isomorphism, and I really like react hot loader, so I'm doing my frontend and backends as separate projects.
[20:24:50] AntiSpamMeta: has joined #RubyOnRails
[20:25:24] bronson: frontend is pure webpack etc, backend is just rails-api. I started on shaka's stuff (back when they were Maui on Rails) but couldn't keep up with the churn.
[20:25:40] Rodya_: has joined #RubyOnRails
[20:25:52] nickjj: bronson, i wrote a webpack plugin that integrates with rails if you're interested
[20:26:29] eljimmy: has joined #RubyOnRails
[20:28:00] kfrz: has joined #RubyOnRails
[20:28:08] baweaver: has joined #RubyOnRails
[20:28:19] bronson: nickjj: link? not sure what it would give me that I don't have now though.
[20:29:00] nickjj: bronson, not sure what it would give you atm. basically it exports a manifest file that rails understands so you can continue using all of the helpers without any server side gems
[20:29:21] nickjj: https://github.com/nickjj/manifest-revision-webpack-plugin , it's not specific to rails but has an option to export the file in a rails format (all detailed in the readme)
[20:30:04] bronson: ah, gotcha. yea, I'll keep it in mind. Not a problem I'm facing now though.
[20:30:21] nickjj: it will write a out a manifest of all your assets (similar to the asset pipeline), except you don't need to use the asset pipeline anymore
[20:30:38] hardtail: has joined #RubyOnRails
[20:31:06] roshanavand: has joined #RubyOnRails
[20:31:48] baweaver: has joined #RubyOnRails
[20:31:55] bronson: nickjj: does it make it easy to do that at runtime? I want to put cache-busters on images users are uploading to my site.
[20:32:03] shibabu: has joined #RubyOnRails
[20:32:36] bronson: oh, it's all js. nm!
[20:32:37] nickjj: bronson, in dev mode it uses the webpack dev server but for production you can do it once at build time
[20:33:12] bronson: actually, I could call out to it using therubyracer... but probably still not a great fit.
[20:33:14] nickjj: you build it, and it will md5'ify all of your assets and create the manifest once, and you're done for production
[20:33:23] snowy: has joined #RubyOnRails
[20:33:56] nickjj: if you are using webpack already, this is just a custom plugin for it
[20:34:23] bronson: yep, using it to package up the client stuff. haven't thought about deploy yet, gonna be a while.
[20:34:40] AntiSpamMeta: has joined #RubyOnRails
[20:34:49] jnj: Whenever I try to create a scaffold, it just ends up doing nothing and I end up having to ctrl C. Does anyone know what I'm doing wrong?
[20:35:05] jnj: I ran rails new, then cd in the directory and ran bundle install
[20:35:12] sinkensabe: has joined #RubyOnRails
[20:35:12] bronson: jnj: other stuff works? tests & stuff?
[20:35:16] mordof_work: has joined #RubyOnRails
[20:35:28] bronson: usually when Rails is hanging on me it's because Postgres needs a restart.
[20:35:29] emachnic_: has joined #RubyOnRails
[20:35:55] bronson: (figure a connection pool leak or something, haven't investigated)
[20:37:05] jnj: bronson: Yeah, running rake test works. It's using sqlite3
[20:37:36] jnj: bronson: oh wait, haha I didn't have the gem for sqlite3
[20:37:44] jottr: has joined #RubyOnRails
[20:40:14] centrx: has joined #RubyOnRails
[20:42:53] kalzz: has joined #RubyOnRails
[20:42:56] ur5us: has joined #RubyOnRails
[20:43:27] mhib: has joined #RubyOnRails
[20:43:30] edwinvdgraaf: has joined #RubyOnRails
[20:43:57] centrx: has joined #RubyOnRails
[20:44:24] G: has joined #RubyOnRails
[20:45:09] Palsson: has joined #RubyOnRails
[20:45:21] jkamenik: has joined #RubyOnRails
[20:47:03] Snowy_: has joined #RubyOnRails
[20:47:35] LambdaSource: has joined #RubyOnRails
[20:47:45] Cohedrin: has joined #RubyOnRails
[20:48:08] noah256: has joined #RubyOnRails
[20:48:17] pawnbox: has joined #RubyOnRails
[20:48:31] jottr: has joined #RubyOnRails
[20:49:27] _3dwardsharp: has joined #RubyOnRails
[20:51:43] mrbubbles: has joined #RubyOnRails
[20:51:52] manfrin: has joined #RubyOnRails
[20:52:35] ur5us: has joined #RubyOnRails
[20:53:34] djbkd: has joined #RubyOnRails
[20:54:22] hahuang65: has joined #RubyOnRails
[20:54:23] marienz: has joined #RubyOnRails
[20:55:01] dideler: has joined #RubyOnRails
[20:55:53] meoblast001: has joined #RubyOnRails
[20:57:37] FCser: has joined #RubyOnRails
[20:58:08] voidDotClass: how do you define an array of string mapping when adding a model?
[20:58:20] voidDotClass: rails g model Test stuff:string[] ?
[20:59:59] roshanavand: has joined #RubyOnRails
[21:00:06] Z00t_: has joined #RubyOnRails
[21:00:08] FailBit: voidDotClass: just modify the migration to have array: true
[21:00:19] FailBit: for the relevant column
[21:00:33] benlieb: has joined #RubyOnRails
[21:00:43] voidDotClass: FailBit, will the model have the right method automatically?
[21:00:57] FailBit: the schema defines the model
[21:01:04] FailBit: not the other way around
[21:01:46] sarink: has joined #RubyOnRails
[21:02:11] snowy: has joined #RubyOnRails
[21:02:12] baweaver: has joined #RubyOnRails
[21:02:52] sandstrom: has joined #RubyOnRails
[21:02:58] Deft: has joined #RubyOnRails
[21:03:00] ducklobster: has joined #RubyOnRails
[21:03:23] cac: has joined #RubyOnRails
[21:03:38] rubyonrailed: has joined #RubyOnRails
[21:05:10] brycesenz: has joined #RubyOnRails
[21:05:12] _djbkd: has joined #RubyOnRails
[21:07:58] mordof_work: has joined #RubyOnRails
[21:08:18] nfk|laptop: has joined #RubyOnRails
[21:08:33] Malgorath: has joined #RubyOnRails
[21:09:56] guacamole: has joined #RubyOnRails
[21:10:20] safety_cut: has joined #RubyOnRails
[21:10:41] Malgorath: Can anyone suggest some good beginner tutorials (videos)? Even subscription ones that are current and can kinda take you through the flow of an app from start to deployment
[21:11:52] Malgorath: Can anyone suggest some good beginner tutorials (videos)? Even subscription ones that are current and can kinda take you through the flow of an app from start to deployment
[21:12:40] brycesenz: Malgorath - there are like, a million "intro to Rails apps" videos on YouTube. If you're brand new, just pick one of those that has a lot of views.
[21:13:00] fox_mulder_cp: Malgorath: rails 4 in actions, official rails guides, agile web devvelopment with rails 4
[21:13:05] pyemkey: has joined #RubyOnRails
[21:13:08] brycesenz: Malgorath - odds are, you'll learn to build a blog app in 15 minutes...
[21:13:45] roshanavand: has joined #RubyOnRails
[21:13:57] fox_mulder_cp: rails 4 in actions - task manager, agile - online store, official guides - blog
[21:15:08] Malgorath: Would you guys suggest I just watch the most basic stuff till I have it memorized?
[21:15:29] Cohedrin: no just make an app
[21:15:40] Cohedrin: https://www.railstutorial.org/
[21:15:42] Cohedrin: there you go
[21:15:48] Cohedrin: I just made you a rails dev
[21:16:18] LambdaSource: has joined #RubyOnRails
[21:16:21] fox_mulder_cp: Cohedrin: say him for address, for medal achievment :)
[21:18:18] sinkensabe: has joined #RubyOnRails
[21:19:08] Malgorath: Cohedrin, thanks I'll look at that
[21:20:21] yardenbar: has joined #RubyOnRails
[21:20:50] sinkensabe: has joined #RubyOnRails
[21:21:17] flashpoint9: has joined #RubyOnRails
[21:23:33] sinkensabe: has joined #RubyOnRails
[21:24:22] mices: has joined #RubyOnRails
[21:24:32] mices: anyone can help me with def mailboxer_email
[21:24:56] maxx88: Malgorath: also might be helpful; learn ruby on rails by daniel kehoe, rails crash course by anthone lewis, learn ruby on rails by john elder
[21:25:13] voidDotClass: how do i create a helper which is automatically included in all models / controllers
[21:25:23] fox_mulder_cp: maxx88: u can't say about hardened deeply ruby
[21:25:36] fox_mulder_cp: voidDotClass: no. concern + include
[21:26:11] kammalage: has joined #RubyOnRails
[21:26:35] Rodya_: has joined #RubyOnRails
[21:26:45] fox_mulder_cp: helper - concern, for app, for model or controller
[21:29:45] pyemkey: has joined #RubyOnRails
[21:30:41] nettoweb: has joined #RubyOnRails
[21:30:46] voidDotClass: so I have a helper called foo.rb in app/helpers, how do i include it in app/models/bar?
[21:30:56] voidDotClass: i'm doing require 'app/helpers/foo' , doesn't work
[21:31:10] G: has joined #RubyOnRails
[21:31:12] voidDotClass: require 'helpers/foo' also didn't work
[21:32:25] brycesenz: mices - what issue are you having with it?
[21:32:31] pydave6367: has joined #RubyOnRails
[21:34:19] jeanre: has joined #RubyOnRails
[21:34:19] B1n4r10: has joined #RubyOnRails
[21:34:29] voidDotClass: fox_mulder_cp, include asks for module name
[21:34:36] voidDotClass: and the helper is in the same module as the model
[21:34:46] mices: brycesenz: my Profile model is messagable but not my User model, users has_one profile, that's my configuration, and i have no idea how to return the value of mailbox_email or how to check if i should return a value or nil
[21:35:18] brycesenz: mices - can you show me some code that illustrates what you are trying to do?
[21:36:58] dmarr: has joined #RubyOnRails
[21:37:22] ur5us: has joined #RubyOnRails
[21:37:37] voidDotClass: I have module MyApp::Helpers, class Foo in app/helpers/foo.rb , how do I access it in a model? I've done include MyApp, as well as include MyApp::Helpers, no luck
[21:37:44] ericfreese: has joined #RubyOnRails
[21:37:57] mices: brycesenz: https://gist.github.com/mices/60fdb876f23d196c634e
[21:39:07] choke: has joined #RubyOnRails
[21:39:29] mices: brycesenz: i don't think that code's supposed to go in initializers/mailboxer.rb
[21:42:42] brycesenz: mices - every class that acts_as_messagable needs to have a 'name' method and a 'mailbox_boxer' method. It looks like your Profile acts_as_messageable. Does it have those methods?
[21:42:47] pyemkey: has joined #RubyOnRails
[21:43:00] _djbkd: has joined #RubyOnRails
[21:43:14] mices: brycesenz: what mailbox_boxer method?
[21:43:30] brycesenz: mices - sorry, 'mailboxer_email' method
[21:44:26] qejk: has joined #RubyOnRails
[21:44:32] mices: they say every has to have email and user right, but if the model doesn't have the email you're supposed to tell it where to get it, in my case, user which profile(the messagable model) belongs to
[21:45:15] Glenny: has joined #RubyOnRails
[21:46:27] Radar: why do you want to access a helper (a view helper) in a model?
[21:46:31] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[21:46:36] helpa: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[21:47:30] brycesenz: mices - every class that acts_as_messagable needs to have those properties
[21:47:49] brycesenz: mices - so, if your Profile acts_as_messageable, it needs those methods. That's all straight out of the documentation
[21:48:46] marienz: has joined #RubyOnRails
[21:50:01] durexlw: has joined #RubyOnRails
[21:50:07] durexlw: evening all
[21:50:41] ja: What would make e.g. `.select(%{date(concat(to_char(date, 'YYYY-MM'), '-01')) AS beginning_of_month})` generate `SELECT beginning_of_month AS beginning_of_month`? I must be doing it very wrong.
[21:50:49] mices: brycesenz: but it doesn't have to be in the messagable model, it can be in another model
[21:50:50] ja: https://gist.github.com/alminde/830779a7a8df2fc1755e ??? Perhaps some clever person can tell me what I???m missing?
[21:51:10] brycesenz: mices - why do you think that?
[21:51:50] mices: because they tell you that you made need to do this in the mailboxer docs
[21:51:57] alexhartley: has joined #RubyOnRails
[21:51:57] mices: s/made/may/
[21:52:08] claytonzaugg: has joined #RubyOnRails
[21:52:43] mices: it has to be profile.user.email
[21:52:55] mices: that's what the value of mailboxer_email has to be
[21:52:56] dtordable: has joined #RubyOnRails
[21:53:23] mices: it's like an accessor method, something like that
[21:53:31] mices: but only understood by mailboxer
[21:53:40] durexlw: ja: didn't you miss a symbol sign in the order by?
[21:53:43] brycesenz: mices - yes, but that method "mailboxer_email" needs to live in your Profile class
[21:54:06] mices: so in there it would be self.user.email ?
[21:54:12] zpe: has joined #RubyOnRails
[21:55:15] ja: durexlw: On line 3? No.
[21:55:26] ja: I should've made my example clearer by not having that `beginning_of_month = %{date(concat(to_char(date, 'YYYY-MM'), '-01'))}` variable
[21:56:48] mices: brycesenz: https://gist.github.com/mices/4ab3363de6c83b20ad77
[21:56:52] ja: ACTION updates gist.
[21:57:10] durexlw: ja: just notice you have in the first occurrence no symbol signs and in the second you do... not sure if that's a problem, it just seems odd to me just looking at it
[21:57:54] ja: durexlw: Yeah, that's not it. Look again now. AR is generating weird SQL. `beginning_of_month AS beginning_of_month`
[21:57:58] brycesenz: mices - yeah, I made a note on your original gist as well
[21:58:08] brycesenz: mices - your Profile model needs a "name" method as well
[21:58:11] durexlw: lemme check
[21:58:14] pyemkey_: has joined #RubyOnRails
[21:58:16] kitsuneyo: has joined #RubyOnRails
[21:59:34] Klumben: has joined #RubyOnRails
[21:59:58] durexlw: ja: odd indeed "beginning_of_month AS beginning_of_month"
[22:01:35] paulodiniz: has joined #RubyOnRails
[22:02:39] ja: durexlw: ??\_(???)_/?? I found it curious. Sure, I can just go with the first approach, but I don't like to repeat myself, and I don't like when AR does weird things
[22:02:43] mices: brycesenz: yes, it has :name in the model
[22:02:52] safety_cut: has joined #RubyOnRails
[22:03:01] brycesenz: mices - ok, good. Did those changes fix your issue?
[22:03:16] durexlw: ja: I hear ya... gives a funny feeling huh
[22:03:46] Voker57|2: has joined #RubyOnRails
[22:04:12] LambdaSource: has joined #RubyOnRails
[22:04:12] Voker57|2: has joined #RubyOnRails
[22:04:29] ja: durexlw: Any minute now Radar will chime in and explain what I'm doing hilariously wrong
[22:04:57] durexlw: you're on his Radar *insert spooky sound here*
[22:05:06] mices: brycesenz: yes, ty
[22:05:31] n1lo: has joined #RubyOnRails
[22:05:32] brycesenz: mices - Yay!
[22:05:42] edwinvdgraaf: has joined #RubyOnRails
[22:06:02] safety_cut: has joined #RubyOnRails
[22:06:34] durexlw: Hey I need a quick sanity check here: simple example: say you have a todo_list that has_many todo_items. Would you ever use nested resources on that? It just seem to overly complex the controllers and path-helpers. Am I missing something?
[22:06:40] mices: brycesenz: but why do have have to pass, literally (object) to def mailboxer_email ?
[22:06:50] tomjoro: has joined #RubyOnRails
[22:06:54] mices: s/have/we/
[22:06:58] codepete: has joined #RubyOnRails
[22:07:41] brycesenz: mices - I believe that the object that is coming into the method is the Message/Notification object. I think they give you access to that object in case you want to make the target email conditional on some aspect of that object
[22:07:45] fox_mulder_cp: https://gist.github.com/peternixey/1978249
[22:08:07] brycesenz: mices - like, if the title had "Admin" in it, maybe you would send it to a different inbox. That kind of thing. But I'm just speculating.
[22:08:27] voidDotClass: how can you specify a custom error message when specifying validations in a model?
[22:08:50] chipotle: has joined #RubyOnRails
[22:08:55] mices: brycesenz: i'd like to give users the option to toggle email notificaitons
[22:09:12] fox_mulder_cp: github hacks via rails
[22:09:34] adamscott: has joined #RubyOnRails
[22:09:38] threeminutemonta: has joined #RubyOnRails
[22:09:53] bmalum_: has joined #RubyOnRails
[22:10:33] edwinvdgraaf: has joined #RubyOnRails
[22:10:46] durexlw: fox_mulder_cp: the truth is out there man :)
[22:10:54] durexlw: nasty article right there
[22:12:16] voidDotClass: how can you specify a custom error message when specifying validations in a model?
[22:12:53] brycesenz: mices - ok. There are lots of ways to do that. You could add some logic to your UserMailer class, or whatever your Mailer class is called
[22:13:25] fox_mulder_cp: voidDotClass: i18n, as example
[22:13:25] durexlw: voidDotClass: { message: "Story title is required" }
[22:13:40] fox_mulder_cp: t'some error here'
[22:13:44] brycesenz: mices - you can also probably search the issues queue on that repo to see how others have done it. I'm sure that you're not the first to want that functionality
[22:14:21] brycesenz: mices - I'm heading out for the day, but best of luck with the rest of your project!
[22:14:38] Axsuul: has joined #RubyOnRails
[22:14:59] mordof_work: has joined #RubyOnRails
[22:16:15] edwinvdgraaf: has joined #RubyOnRails
[22:16:22] DoubleMalt: has joined #RubyOnRails
[22:16:26] bmalum: has joined #RubyOnRails
[22:17:23] edwinvdgraaf: has joined #RubyOnRails
[22:18:57] paulodiniz: has joined #RubyOnRails
[22:20:10] jgpawletko: has joined #RubyOnRails
[22:20:30] markh: has joined #RubyOnRails
[22:20:55] markh: has left #RubyOnRails: ()
[22:21:46] yardenbar: has joined #RubyOnRails
[22:21:47] mrbubbles: has joined #RubyOnRails
[22:22:07] [Butch]: has joined #RubyOnRails
[22:22:32] pyemkey: has joined #RubyOnRails
[22:22:43] Radar: ja: I am busy right now, otherwise maybe.
[22:23:55] yfeldblum: has joined #RubyOnRails
[22:24:36] jkamenik: has joined #RubyOnRails
[22:27:16] Rodya_: has joined #RubyOnRails
[22:28:32] cac: has joined #RubyOnRails
[22:28:50] kerunaru: has joined #RubyOnRails
[22:29:10] Ergo: has joined #RubyOnRails
[22:29:40] edwinvdgraaf: has joined #RubyOnRails
[22:30:11] pyemkey: has joined #RubyOnRails
[22:30:20] _3dwardsharp: has joined #RubyOnRails
[22:30:40] _djbkd: has joined #RubyOnRails
[22:31:28] Radar: ja: what are you trying to do with that code evn?
[22:31:42] Radar: %{date(concat(to_char(date, 'YYYY-MM'), '-01'))})
[22:31:50] Radar: This is confusing and so there's probably a much better way to do it
[22:32:06] Radar: group things by a month?
[22:33:04] fox_mulder_cp: Radar: oh, Date.strftime'%HH:%mm' ...?
[22:33:10] Radar: fox_mulder_cp: no, it's in the DB
[22:33:50] fox_mulder_cp: Radar: postgres? timestamp properly grouped by pg
[22:34:00] Radar: no idea, it's ja's code.
[22:34:13] shibabu: has joined #RubyOnRails
[22:35:10] fox_mulder_cp: shit. after restart server my app dropped foundation-rails... assets precompile failed
[22:35:27] fox_mulder_cp: Sass::SyntaxError: File to import not found or unreadable: foundation/functions.
[22:35:54] mustmodify: has joined #RubyOnRails
[22:36:12] _djbkd: has joined #RubyOnRails
[22:36:25] jeanre: has joined #RubyOnRails
[22:36:26] fox_mulder_cp: wow. i found that: https://github.com/presidentbeef/brakeman
[22:36:40] _djbkd: has joined #RubyOnRails
[22:36:41] mustmodify: Here's a mystery. A MySQL table 'addresses' has a row 'zipcode' limit => 10. From the db console, I can insert a zipcode+4. But from the rails console, I can not issue the same insert.
[22:36:42] fox_mulder_cp: some rails security checks
[22:37:29] kammalage: has joined #RubyOnRails
[22:37:53] Deft: has joined #RubyOnRails
[22:37:59] ja: Radar: That is confusing, yeah, and yes, I'm attempting to group things by month while also summing.
[22:38:14] jgt: has joined #RubyOnRails
[22:38:52] xnp70: has joined #RubyOnRails
[22:39:30] kitsuneyo: i'm making a date of birth field for a form. what's the best way? isn't there a good gem or something?
[22:39:45] smathy: mustmodify, !gist your console sessions
[22:39:45] helpa: mustmodify: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[22:40:17] kitsuneyo: with bootstrap
[22:41:26] guacamole: has joined #RubyOnRails
[22:41:33] Honeycomb: has joined #RubyOnRails
[22:41:35] ja: Radar: I love how you say you're busy but then you look anyway! ^-^ I've updated my gist with the desired output. Even if there's a better way to do this, I still don't understand why I get "x AS x" when I `.select("somefunc() AS x")`
[22:42:11] alexhartley: has joined #RubyOnRails
[22:42:16] northfurr: has joined #RubyOnRails
[22:42:21] alexhartley: has joined #RubyOnRails
[22:42:42] blackmesa: has joined #RubyOnRails
[22:43:44] roshanavand: has joined #RubyOnRails
[22:45:01] snowy: has joined #RubyOnRails
[22:45:16] killerbunny: has joined #RubyOnRails
[22:46:39] gbgdev: has joined #RubyOnRails
[22:48:17] quazimodo: has joined #RubyOnRails
[22:49:41] uris: has joined #RubyOnRails
[22:51:56] mag42c: has left #RubyOnRails: ()
[22:55:18] crystal77: has joined #RubyOnRails
[22:56:06] linoespinoza: has joined #RubyOnRails
[22:56:15] LambdaSource: has joined #RubyOnRails
[22:59:34] aegis3121: has joined #RubyOnRails
[22:59:58] wethu: has joined #RubyOnRails
[23:00:41] jgpawletko: has joined #RubyOnRails
[23:03:05] bronson: has joined #RubyOnRails
[23:03:37] baweaver: has joined #RubyOnRails
[23:05:01] Liothen: has joined #RubyOnRails
[23:05:38] snowy: has joined #RubyOnRails
[23:05:52] _3dwardsharp: has joined #RubyOnRails
[23:07:49] sarink: has joined #RubyOnRails
[23:08:10] jsrn_: has joined #RubyOnRails
[23:08:59] ornerymoose: has joined #RubyOnRails
[23:09:09] Oog: has joined #RubyOnRails
[23:09:31] northfurr: has joined #RubyOnRails
[23:15:56] Sawbones: has joined #RubyOnRails
[23:19:46] allcentury: has joined #RubyOnRails
[23:21:46] uris: has joined #RubyOnRails
[23:22:03] blackmesa: has joined #RubyOnRails
[23:24:12] yardenbar: has joined #RubyOnRails
[23:24:49] bronson: has joined #RubyOnRails
[23:26:29] janebootydoe: has joined #RubyOnRails
[23:28:04] Rodya_: has joined #RubyOnRails
[23:28:13] lacrymology: I usually return `render json: object, status: :created, location: object` from #create methods in controllers, but this is not working for a nested resource, how should I do this?
[23:28:32] roshanavand: has joined #RubyOnRails
[23:28:53] ja: lacrymology: how is it ???not working???? what happens, or what error do you get?
[23:29:07] lacrymology: the url doesn't exist
[23:29:16] lacrymology: ja: give me a second, I just saw that it might be something else
[23:29:27] ja: lacrymology: alright
[23:29:43] lacrymology: ja: no, yes I'm getting this exception: undefined method `event_url' for #<EventsController:0x00562ffba97b90>
[23:30:55] roshanavand: has joined #RubyOnRails
[23:33:48] uris: has joined #RubyOnRails
[23:35:22] baweaver: has joined #RubyOnRails
[23:36:22] ja: lacrymology: See rule 3: https://gist.github.com/radar/996779
[23:36:35] sarink: has joined #RubyOnRails
[23:37:12] Ropeney: has joined #RubyOnRails
[23:38:04] jeanre: has joined #RubyOnRails
[23:38:39] lemur: has joined #RubyOnRails
[23:39:00] sar1nk: has joined #RubyOnRails
[23:40:01] sar1nk: has joined #RubyOnRails
[23:41:49] kies^: has joined #RubyOnRails
[23:44:44] diegoviola: has joined #RubyOnRails
[23:44:57] alphaatom: has joined #RubyOnRails
[23:47:35] voidDotClass: I have an array of integers in a model, how can i validate each element in the array to make sure it falls within a range?
[23:47:38] voidDotClass: custom validator?
[23:47:52] lacrymology: am I doing something wrong? in model Event: has_one :message, as: :start_message
[23:48:03] lacrymology: NoMethodError: undefined method `start_message' for #<Event:0x00563efd6099f0>
[23:48:14] lacrymology: (when calling event.start_message)
[23:48:48] voidDotClass: lacrymology , probably need through: instead of as:
[23:48:48] droptone: Question: On an old Rails 3.2 project, I'm trying to change the page that the user is redirected to after updating their password via Devise's registrations edit view.
[23:49:06] droptone: I want the page they're redirected to to be different based on user.type.
[23:49:38] droptone: I've tried appending a method to the registrations controller as specified here: https://github.com/plataformatec/devise/wiki/How-To:-Customize-the-redirect-after-a-user-edits-their-profile
[23:50:23] Vintila: has joined #RubyOnRails
[23:50:38] droptone: But when I alter the code in the specified after_update_path_for method to specify individual redirect_to statements dependent on current_user.type, I receive a DoubleRenderError in RegistrationsController#update
[23:51:12] droptone: Does anyone have a working example of how to perform such?
[23:51:25] peeja: has joined #RubyOnRails
[23:52:35] ja: ACTION didn't even know Rails had a DoubleRenderError
[23:53:22] dirk_diiggler: has joined #RubyOnRails
[23:53:29] FailBit: doublerendererror is when you render twice
[23:53:38] droptone: AbstractController::DoubleRenderError in RegistrationsController#update
[23:54:02] droptone: Right, so I'm sure in Devise's native code it's got a redirect_to call built in, but I'm not sure where it is or how to override it.
[23:54:12] FailBit: you need to gimme some code
[23:54:16] droptone: I need specific user types to redirect to specific pages after updating their information.
[23:54:18] lacrymology: voidDotClass: why would I need through? there's no middle model..
[23:54:36] lacrymology: event has astart_message_id
[23:54:37] droptone: FailBit: The code I'm leveraging is on that github page, I'm working from the Devise documentation.
[23:54:42] lacrymology: maybe there's a typo somewhere
[23:55:24] FailBit: is that the _exact_ code?
[23:55:31] droptone: It's the example from that page where you create def after_update_path_for(resource)
[23:55:49] nfk|laptop: has joined #RubyOnRails
[23:56:33] droptone: https://gist.github.com/anonymous/058044cdebc50fa10c66
[23:56:39] droptone: That's my registrations_controller
[23:56:55] FailBit: s/redirect_to //
[23:56:59] FailBit: that's all you gotta do
[23:57:18] droptone: Say what? Switch redirect_to to //
[23:57:25] FailBit: I mean delete the redirect_to call
[23:57:32] FailBit: it's asking for a path not for you to redirect
[23:57:39] droptone: Interesting.
[23:59:10] droptone: Brilliant, thank you.