« Back to channel list

#RubyOnRails - 18 December 2015

« Back 1 day Forward 1 day »
[00:00:30] nocontrol: has joined #RubyOnRails
[00:02:01] owenjones: has joined #RubyOnRails
[00:02:06] crdpink2: has joined #RubyOnRails
[00:02:18] nocontrol: has joined #RubyOnRails
[00:02:42] hahuang65: has joined #RubyOnRails
[00:04:06] nocontrol: has joined #RubyOnRails
[00:04:34] fcser_: has joined #RubyOnRails
[00:04:41] shock_one: has joined #RubyOnRails
[00:05:59] nocontrol: has joined #RubyOnRails
[00:06:52] yfeldblum: has joined #RubyOnRails
[00:07:51] nocontrol: has joined #RubyOnRails
[00:08:12] yfeldblum: has joined #RubyOnRails
[00:09:40] nocontrol: has joined #RubyOnRails
[00:09:48] kies^: has joined #RubyOnRails
[00:11:28] nocontrol: has joined #RubyOnRails
[00:11:41] threeminutemonta: has joined #RubyOnRails
[00:12:26] StevenXL: has joined #RubyOnRails
[00:12:27] StevenXL: has joined #RubyOnRails
[00:12:52] sypheren: has joined #RubyOnRails
[00:13:16] nocontrol: has joined #RubyOnRails
[00:15:07] nocontrol: has joined #RubyOnRails
[00:16:02] wethu: has joined #RubyOnRails
[00:16:58] nocontrol: has joined #RubyOnRails
[00:18:41] Jake232: has joined #RubyOnRails
[00:18:48] nocontrol: has joined #RubyOnRails
[00:19:07] Radar: pureofpure: The Well Grounded Rubyist gets my recommendation.
[00:20:35] nocontrol: has joined #RubyOnRails
[00:22:29] nocontrol: has joined #RubyOnRails
[00:24:16] K_r3aPeR: has joined #RubyOnRails
[00:24:17] nocontrol: has joined #RubyOnRails
[00:26:00] Palsson: has joined #RubyOnRails
[00:26:08] nocontrol: has joined #RubyOnRails
[00:26:35] jbrhbr: has joined #RubyOnRails
[00:27:56] nocontrol: has joined #RubyOnRails
[00:29:45] nocontrol: has joined #RubyOnRails
[00:30:01] Oliphaunte: has joined #RubyOnRails
[00:30:32] chouhoulis: has joined #RubyOnRails
[00:31:27] Or1on: has joined #RubyOnRails
[00:31:36] nocontrol: has joined #RubyOnRails
[00:31:36] Sawbones: has joined #RubyOnRails
[00:32:33] Oliphaunte: has joined #RubyOnRails
[00:32:52] owenjones: has joined #RubyOnRails
[00:33:27] nocontrol: has joined #RubyOnRails
[00:34:43] Sawbones: has joined #RubyOnRails
[00:35:14] nocontrol: has joined #RubyOnRails
[00:35:45] daniel: has joined #RubyOnRails
[00:36:28] djbkd_: has joined #RubyOnRails
[00:36:33] markh: has joined #RubyOnRails
[00:37:06] nocontrol: has joined #RubyOnRails
[00:37:12] twilling_: has joined #RubyOnRails
[00:38:54] nocontrol: has joined #RubyOnRails
[00:40:03] manfrin: has joined #RubyOnRails
[00:40:23] rodfersou: has joined #RubyOnRails
[00:40:45] nocontrol: has joined #RubyOnRails
[00:42:10] lunatech: has joined #RubyOnRails
[00:42:36] nocontrol: has joined #RubyOnRails
[00:42:42] baweaver: has joined #RubyOnRails
[00:42:56] Oliphaunte: has joined #RubyOnRails
[00:43:30] dandaman: has joined #RubyOnRails
[00:44:25] nocontrol: has joined #RubyOnRails
[00:45:05] Sawbones: has joined #RubyOnRails
[00:46:15] nocontrol: has joined #RubyOnRails
[00:46:44] dandaman: has joined #RubyOnRails
[00:48:05] nocontrol: has joined #RubyOnRails
[00:49:45] nertzy: has joined #RubyOnRails
[00:49:47] jessemcgilallen: has joined #RubyOnRails
[00:49:54] nocontrol: has joined #RubyOnRails
[00:51:46] nocontrol: has joined #RubyOnRails
[00:53:37] nocontrol: has joined #RubyOnRails
[00:53:55] rodfersou: has joined #RubyOnRails
[00:53:58] atomical: has joined #RubyOnRails
[00:55:09] neredsenvy: Radar, c9.io suck it Linux
[00:55:25] nocontrol: has joined #RubyOnRails
[00:55:48] sevenseacat: has joined #RubyOnRails
[00:56:02] _djbkd: has joined #RubyOnRails
[00:57:16] nocontrol: has joined #RubyOnRails
[00:58:19] bigbob: has joined #RubyOnRails
[00:58:23] baweaver: http://cdn.meme.am/instances/65058600.jpg
[00:59:04] nocontrol: has joined #RubyOnRails
[00:59:14] ja: wth @ c9.io
[00:59:35] ja: intriguing that it has those ???workspaces??? with built-in terminal ???n??? all
[00:59:42] baweaver: says Windows > all. Uses cloud service.
[01:00:09] lyoshajapan: has joined #RubyOnRails
[01:00:23] ja: ???Code together in real time??? ??? pretty cool
[01:00:43] ja: why can???t *all* text editors do that?
[01:00:55] nocontrol: has joined #RubyOnRails
[01:01:05] sevenseacat: I sense theres a popcorn discussion going on
[01:01:28] build22_: has joined #RubyOnRails
[01:01:28] baweaver: it's not new
[01:01:30] ja: baweaver: I still haven???t gotten that working for multiple users
[01:01:30] rhizome: "Shit's Easy Syndrome"
[01:01:34] ja: ^______^
[01:01:39] ja: like?????cross-users
[01:01:42] ja: whachamacallit
[01:01:53] rhizome: it'll come to you
[01:01:54] ja: sudo screen -x doesn???t work
[01:02:29] baweaver: http://collectiveidea.com/blog/archives/2014/02/18/a-simple-pair-programming-setup-with-ssh-and-tmux/
[01:02:39] kknight: has joined #RubyOnRails
[01:02:45] nocontrol: has joined #RubyOnRails
[01:03:03] baweaver: difference there is that with tmux you can port any terminal application through it.
[01:03:25] DLSteve: has joined #RubyOnRails
[01:03:28] ja: oh, thanks baweaver!
[01:03:42] ja: it???s been quite some years since I last gave it a tr
[01:03:43] baweaver: learning tmux is abundantly useful
[01:03:55] baweaver: there's a PragProg book over it out there
[01:03:56] ja: Surely seems so.
[01:04:02] ja: Wht do you mean ???port any terminal application through it????
[01:04:08] ja: oh, relaly?
[01:04:10] baweaver: https://pragprog.com/book/bhtmux/tmux
[01:04:27] ja: nice cover :B
[01:04:31] baweaver: it's a mini book but has enough info to get started
[01:04:33] nocontrol: has joined #RubyOnRails
[01:04:46] ja: i like how it???s apparently focused on mouse-free development
[01:04:52] ja: productive mouse-free development, nonetheless
[01:05:32] shibabu: has joined #RubyOnRails
[01:05:57] baweaver: the number of times I actually touch a mouse in a day is normally < 20 at work
[01:06:08] ja: https://media.pragprog.com/images/cms/bhtmux-cartoon.jpg XD
[01:06:09] ja: ACTION dies
[01:06:23] nocontrol: has joined #RubyOnRails
[01:06:29] ja: baweaver: for reals? that???s sick
[01:06:32] baweaver: Pianobar(pandora terminal) helps
[01:06:51] baweaver: then again I started as a SysAdmin so Vim was already heavily used.
[01:06:58] baweaver: because they were all headless servers
[01:07:06] ja: so do you use a text-only or at least keyboard-only web browser, baweaver? ^_^
[01:07:21] ja: I can get behind Vim
[01:07:24] _djbkd: has joined #RubyOnRails
[01:07:32] ja: I just wish I didn???t suck so much at Vim
[01:07:34] baweaver: I have lynx, but don't use it much
[01:07:39] ja: I can barely make it find and replace
[01:07:42] ja: lol, lynx
[01:07:47] ja: so you use elinks more these days? ;D
[01:08:04] ja: or just `nc`
[01:08:14] nocontrol: has joined #RubyOnRails
[01:08:22] baweaver: eh, not much love for netcat
[01:08:28] baweaver: I need to learn it better
[01:10:02] nocontrol: has joined #RubyOnRails
[01:10:30] nettoweb: has joined #RubyOnRails
[01:10:31] FailBit: 80wpm is too slow
[01:10:48] ja: FailBit: are you on typeracer.com?
[01:10:56] ja: it???s great
[01:11:01] ja: try it if you dare
[01:11:04] wethu: has joined #RubyOnRails
[01:11:33] FailBit: http://typingforfucks.neocities.org/
[01:11:38] ja: the site itself looks very ???hi i just learnt php and wat is everything??? but I like the game
[01:11:52] nocontrol: has joined #RubyOnRails
[01:11:58] ja: lol nice
[01:12:02] ja: i bet you made that yourself, FailBit
[01:12:32] FailBit: I didn't, actually
[01:12:32] owenjones: has joined #RubyOnRails
[01:13:01] nyaa: has joined #RubyOnRails
[01:13:17] lacuna: has joined #RubyOnRails
[01:13:43] nocontrol: has joined #RubyOnRails
[01:15:34] nocontrol: has joined #RubyOnRails
[01:15:54] King_Rex: has joined #RubyOnRails
[01:17:01] ro: has joined #RubyOnRails
[01:17:03] Oliphaunte: has joined #RubyOnRails
[01:17:26] nocontrol: has joined #RubyOnRails
[01:18:08] ro: <%= link_to "Export", users_path(request.parameters.merge({:format => :xls})) , {class: "btn btn-primary"}%>
[01:18:13] ja: ACTION comes back from the fridge to discover his monitor covered with ever-spawning profanity
[01:18:21] ro: how can i implement link_to like this
[01:18:24] ja: hi ro. nice nick length.
[01:18:28] _djbkd: has joined #RubyOnRails
[01:18:32] ro: but calling other action?
[01:18:44] ro: should i create new path in routes?
[01:18:47] ja: ACTION doesn???t follow
[01:18:50] ja: what are you rtying to do, ro?
[01:19:14] ro: i am export data to excel file
[01:19:16] nocontrol: has joined #RubyOnRails
[01:19:27] ro: and i call every time the index action
[01:19:30] ro: from users controller
[01:19:35] rgtk: has joined #RubyOnRails
[01:19:41] ro: but i want to move all the logic to another action method
[01:19:41] ja: oh. errh???
[01:19:48] ro: not to use it on index method
[01:19:49] ja: why do you need the `request.parameters.merge`?
[01:19:50] ja: need/want
[01:19:58] ja: alright, I???m completely lost, I should sleep
[01:20:04] slash_kick: roja is my favorite color
[01:20:08] ja: get Radar to help you! x3
[01:20:20] ro: `request.parameters.merge` is wrong?
[01:20:31] helpa: Help us Radar! You are our only hope.
[01:20:38] ja: Depends on what you want to do, ro.
[01:20:54] ro: i am exporting xls file
[01:21:01] nocontrol: has joined #RubyOnRails
[01:21:09] ja: yeah, so you want to link to the export URL?
[01:21:17] ja: using the already provided request params?
[01:21:27] ja: why `request.parameters` and not just `params` anyway?
[01:21:32] banister: has joined #RubyOnRails
[01:21:37] ja: but anyway: why? what???s in the params that you need?
[01:21:51] ja: and what is the real issue anyway? doesn???t your pasted code work?
[01:22:00] ja: slash_nick: halp
[01:22:28] ja: that's not useful, slash_nick??? >8C
[01:22:29] ro: yeah its work
[01:22:39] ro: but i dont know if its the right way to call the index action
[01:22:50] ro: instead of make a new action for export_to_xls
[01:22:51] nocontrol: has joined #RubyOnRails
[01:22:54] ro: and call it
[01:22:59] ja: no, this sounds good
[01:23:02] ja: format: is good
[01:23:21] ja: does your index.xls contain roughly the same data as your index.html?
[01:23:43] ro: its contain all the records from the users model
[01:23:45] ja: someone kick me before I confuse more people including myself
[01:24:44] nocontrol: has joined #RubyOnRails
[01:25:00] ro: ok, lets assume that i have method called "export" in users_controller
[01:25:15] ro: how can i call it with link_to and pass it params ?
[01:25:25] ja: oh. yeah. you need at route for that.
[01:25:34] ro: i need new route?
[01:26:08] ja: `get 'export', on: :member` or something inside your `resource :users do ??? end`
[01:26:17] ja: ??\_(???)_/?? am I wrong, peeps?
[01:26:29] ro: and how implement the link_to?
[01:26:30] nocontrol: has joined #RubyOnRails
[01:26:34] ro: and pass param to this action?
[01:27:14] ja: you???d end up with a `users_export_path`
[01:27:23] ja: (or `user_export_path` in singular? SOMEONE HALP PLS)
[01:27:33] ja: ro: do you know of `rake routes`?
[01:27:36] ja: running that from the terminal
[01:27:49] ja: can clear up a lot of confusion
[01:28:20] owenjones: has joined #RubyOnRails
[01:28:22] nocontrol: has joined #RubyOnRails
[01:28:39] ro: sorry i become annoying , i write mostly in c++ , but i got rails part job
[01:28:52] ro: to help a friend of mine
[01:28:54] lessless: has joined #RubyOnRails
[01:28:57] ja: no problem. I haven???t slept in ages so I???m pretty head thick right now.
[01:29:08] ja: you haven???t been annoying, ro.
[01:29:28] ja: ro: tell me: do you prefer /users/1.xsl or /users/1/export.xsl?
[01:29:32] tuelz: has joined #RubyOnRails
[01:29:43] ja: as the URL
[01:29:49] ja: (obviously. hi.)
[01:30:09] ro: the thing is that i export every user is selected on the page
[01:30:12] nocontrol: has joined #RubyOnRails
[01:30:25] ja: so it should realyy be /users.xsl simply?
[01:30:29] ja: really*
[01:30:38] ja: so a collection route
[01:30:41] ja: not a member route
[01:31:05] ja: why not just use `users_path(format: :xsl)`, ro?
[01:31:23] ro: so i will use the index action
[01:31:28] chouhoulis: has joined #RubyOnRails
[01:31:28] ro: and put all the logic in the index
[01:31:30] ja: and UsersController#index with respond_to format.xsl
[01:31:30] ro: right ?
[01:31:34] ja: in respond_to
[01:31:36] DavidDudson: has joined #RubyOnRails
[01:31:52] ja: you have one of those already? with `format.html`?
[01:32:02] nocontrol: has joined #RubyOnRails
[01:32:05] snoozelose: has joined #RubyOnRails
[01:32:14] snoozelose: has joined #RubyOnRails
[01:32:22] ro: and its works
[01:32:39] ja: then just add format.xsl and you should be golden, I guess
[01:32:44] ro: but i was thinking that is bad to have all this logic in index action
[01:33:08] ja: yeah, if you have loads of lines, then sure
[01:33:10] ja: you could move it somewhere else
[01:33:15] ro: i have implement the import too
[01:33:15] ja: make a UsersExporter class or something
[01:33:22] ja: oh, jeez
[01:33:29] ro: but with another way
[01:33:37] Oliphaunte: has joined #RubyOnRails
[01:33:46] ja: not simply by POST???ing to /users?
[01:33:50] nocontrol: has joined #RubyOnRails
[01:34:19] ro: resources :users do { collection { post :import } end
[01:34:30] ro: i have all the login in the model
[01:34:47] ja: ???all the login????!
[01:34:48] ro: and import action in the controller
[01:35:02] ro: is that right?
[01:35:02] ja: that sounds good
[01:35:07] ja: or dunno really
[01:35:21] ja: haha. I would???ve probably moved the import logic out of the model and into some UsersImporter class or something
[01:35:31] ja: so it doesn???t clog up your model layer nor your controllers
[01:35:40] ja: but I have no idae. You???ll have to ask Rebecca who wrote a book about awesome
[01:35:42] nocontrol: has joined #RubyOnRails
[01:35:48] IFrank00: has joined #RubyOnRails
[01:36:07] ro: btw when you mean you would make some class UsersImport
[01:36:12] ElFerna: has joined #RubyOnRails
[01:36:12] ro: where would you make it?
[01:36:15] ro: in libs?
[01:36:18] ja: ro: lib/
[01:36:25] ja: I guess
[01:36:36] ro: so its something like global, right?
[01:36:37] ornerymoose: has joined #RubyOnRails
[01:36:45] ro: sorry i am comming from c like languages
[01:36:48] ja: only if it makes sense. how big are your import/export methods?
[01:37:02] ja: yeah, lib/ is as ???global???-y as it gets in Rails
[01:37:09] ro: about 50-60 lines
[01:37:21] ja: not that there???s really any actual separation of things
[01:37:30] nocontrol: has joined #RubyOnRails
[01:37:31] ja: nothing and everything is ???global???
[01:37:32] pipework: This is all concerning.
[01:37:46] ja: right. 50-60 sounds large.
[01:37:55] ja: pipework: my answers or ro???s questions or both?
[01:38:06] pipework: ja: I am a punbot 6000.
[01:38:24] ro: so how can i call class from lib ?
[01:38:27] ja: where've you been all this time lil buddy???
[01:38:31] ro: in my models and controllers?
[01:38:49] ja: ro: Rails autoloads it all if you follow the Java-esque conventions with the file names named after the class/module inside
[01:38:52] ja: (right?)
[01:39:18] nocontrol: has joined #RubyOnRails
[01:39:39] ja: so if you have `class UserImporter ???` in `lib/user_importer.rb` you should be able to `UserImporter.new` from any other file
[01:39:53] ja: no? yes? am I wrong? pipework give me a hinting pun
[01:39:55] sbarg1: has joined #RubyOnRails
[01:40:10] ja: ACTION should really finish reading http://guides.rubyonrails.org/autoloading_and_reloading_constants.html >.<
[01:40:17] idefine: has joined #RubyOnRails
[01:40:34] ja: rails??? autoloading system seems quite involved
[01:40:57] pipework: ja: I don't autoload lib, I require things in it.
[01:40:57] _djbkd: has joined #RubyOnRails
[01:41:00] ja: Ilike it when it works.
[01:41:08] nocontrol: has joined #RubyOnRails
[01:41:10] sevenseacat: ruby and rails both have complex autoloading systems
[01:41:11] pipework: lib/user_importer.rb is in path as `user_importer` for your require.
[01:41:15] ja: pipework: So Rails doesn???t do so automatically either through its autoloading system?
[01:41:19] ja: Oh hi, sevenseacat!
[01:41:32] ja: pipework: Alright. Very well. I suck then.
[01:41:40] sevenseacat: happy friday!
[01:41:43] ja: ro: Listen to pipework. They know what???s up.
[01:41:47] ja: Yay! You too, sevenseacat!
[01:41:47] krz: has joined #RubyOnRails
[01:41:48] pipework: sevenseacat: I'll believe it when I see it.
[01:42:03] hardtail: not for a few hours but yea, happy friday xD
[01:42:47] sevenseacat: https://www.dropbox.com/s/52113v8z137ol87/friday.png?dl=0
[01:42:47] pipework: ro: Where is the file relative to lib/?
[01:42:49] pipework: What's it called?
[01:42:59] nocontrol: has joined #RubyOnRails
[01:43:03] pipework: sevenseacat: I guess one cannot unsee, miaow can they?
[01:43:06] ja: sevenseacat: Why aren???t you in -offtopic? It saddens us all. Or at least me.
[01:43:32] ro: pipework what you mean?
[01:43:35] pipework: Some offtopics are more equal than others.
[01:44:51] nocontrol: has joined #RubyOnRails
[01:44:56] nyaa: has joined #RubyOnRails
[01:45:40] lyoshajapan: Hello there! I was wondering if I can use sessions in a model instead of a database?
[01:46:02] lyoshajapan: is it madness? or I should be really doing something else instead
[01:46:39] nocontrol: has joined #RubyOnRails
[01:46:41] pipework: lyoshajapan: ideally, you wouldn't.
[01:47:11] pipework: Do you mean you want to have a model that 'persists' to the session instead of your normal activerecord-y database?
[01:47:59] lyoshajapan: pipework: yeah, because I need to be able to "edit" an object that hasnt been saved yet, and once it has, then I commit it to the database
[01:48:23] pipework: lyoshajapan: Oh you can totally do multi-step stuff like that.
[01:48:27] nocontrol: has joined #RubyOnRails
[01:48:57] lyoshajapan: pipework: what do you mean by that exactly? where will the data persist?
[01:48:59] pipework: You can even use the database to do it if you wanted, but you can also store the object's values into the session depending on the size of the data.
[01:49:15] guacamole: has joined #RubyOnRails
[01:49:24] ro: anyone use jetbrains Ruby Mine with linux here?
[01:49:39] lyoshajapan: its quite small, its just a few dates, its one of those calendar things lol
[01:49:40] rickmasta: has joined #RubyOnRails
[01:50:15] nocontrol: has joined #RubyOnRails
[01:51:35] nerium: Which class/module includes all view helpers?
[01:51:58] superlou: has joined #RubyOnRails
[01:52:05] nocontrol: has joined #RubyOnRails
[01:52:14] tuelz: has joined #RubyOnRails
[01:52:42] one_zero: has joined #RubyOnRails
[01:53:04] lyoshajapan: Its like, first the user sees a calendar, selects a time slot, then sees a create an appointment screens, but then, lets say she decides to change the date, so she has to go back to the calendar, and the calendar has to remember which date it was. Then, when she selects another timeslot, the form she sees again, needs to have all the values that were there from before she decided to change the date
[01:53:56] nocontrol: has joined #RubyOnRails
[01:55:06] pwnd_nsfw: has joined #RubyOnRails
[01:55:07] lyoshajapan: pipework: So, I figured I:ll just create a scheduling model that will persist an appointment model once the user finally makes up her mind and saves. Then, use that same model everytime she tries to reschedule it again
[01:55:47] nocontrol: has joined #RubyOnRails
[01:56:18] pipework: lyoshajapan: You can also use a scope on one object that only gets 'saved' related other models.
[01:57:00] cassioscabral: has joined #RubyOnRails
[01:57:38] nocontrol: has joined #RubyOnRails
[01:59:26] nocontrol: has joined #RubyOnRails
[01:59:45] _Tariq: has joined #RubyOnRails
[01:59:53] Darkman738: has joined #RubyOnRails
[02:00:38] idefine: has joined #RubyOnRails
[02:01:18] nocontrol: has joined #RubyOnRails
[02:03:08] nocontrol: has joined #RubyOnRails
[02:04:13] jun_: has joined #RubyOnRails
[02:04:57] nocontrol: has joined #RubyOnRails
[02:05:49] neanderslob: has joined #RubyOnRails
[02:06:32] hardtail: has joined #RubyOnRails
[02:06:44] greenride: has joined #RubyOnRails
[02:06:48] nocontrol: has joined #RubyOnRails
[02:06:55] greenride: has left #RubyOnRails: ()
[02:08:38] nocontrol: has joined #RubyOnRails
[02:09:29] guacamole: has joined #RubyOnRails
[02:10:24] nocontrol: has joined #RubyOnRails
[02:10:38] sucks: has joined #RubyOnRails
[02:12:19] nocontrol: has joined #RubyOnRails
[02:14:09] nocontrol: has joined #RubyOnRails
[02:15:32] Radar: sevenseacat: You're a different colour today and it is disturbing.
[02:15:49] sevenseacat: there' a glitch in the matrix.
[02:15:59] nocontrol: has joined #RubyOnRails
[02:16:04] n00bDev: has joined #RubyOnRails
[02:16:50] Radar: You were yellow and now you're dark blue.
[02:17:45] nocontrol: has joined #RubyOnRails
[02:18:12] sevenseacat: I'm red ;_; same as always
[02:19:34] idefine: has joined #RubyOnRails
[02:19:36] nocontrol: has joined #RubyOnRails
[02:19:38] _Tariq: has joined #RubyOnRails
[02:21:25] nocontrol: has joined #RubyOnRails
[02:22:05] _Tariq: has joined #RubyOnRails
[02:23:17] nocontrol: has joined #RubyOnRails
[02:23:18] wethu: has joined #RubyOnRails
[02:24:37] ss_much: has joined #RubyOnRails
[02:25:09] nocontrol: has joined #RubyOnRails
[02:25:24] hardtail: has joined #RubyOnRails
[02:26:40] ur5us: has joined #RubyOnRails
[02:26:57] nocontrol: has joined #RubyOnRails
[02:28:49] nocontrol: has joined #RubyOnRails
[02:29:04] shock_one: has joined #RubyOnRails
[02:30:37] nocontrol: has joined #RubyOnRails
[02:31:06] rakm: has joined #RubyOnRails
[02:32:12] chouhoulis: has joined #RubyOnRails
[02:32:49] owenjones: has joined #RubyOnRails
[02:33:24] pika_pika: has joined #RubyOnRails
[02:36:57] upsell5: has joined #RubyOnRails
[02:37:01] nyaa: has joined #RubyOnRails
[02:44:43] Oliphaunte: has joined #RubyOnRails
[02:44:53] twilling_: has joined #RubyOnRails
[02:45:03] SteenJobs: has joined #RubyOnRails
[02:47:59] snoozelose: has joined #RubyOnRails
[02:48:09] snoozelose: has joined #RubyOnRails
[02:48:53] snoozelose: has joined #RubyOnRails
[02:50:22] blackmesa: has joined #RubyOnRails
[03:00:49] twilling_: has joined #RubyOnRails
[03:01:13] ewnd9_: has joined #RubyOnRails
[03:06:34] n1lo: has joined #RubyOnRails
[03:07:34] shibabu: has joined #RubyOnRails
[03:11:12] dandaman: has joined #RubyOnRails
[03:11:43] threeminutemonta: has joined #RubyOnRails
[03:20:24] nocd: has joined #RubyOnRails
[03:20:45] circ-user-EwKuv: has joined #RubyOnRails
[03:21:43] _Tariq: has joined #RubyOnRails
[03:23:41] NBarnes: has joined #RubyOnRails
[03:23:48] sucks_: has joined #RubyOnRails
[03:25:12] circ-user-EwKuv: Hi all, suppose I have an ActiveRecord model 'MyThing' which has a string field 'my_field'. Is there an ActiveRecord command to generate the following SQL? "UPDATE my_things SET my_field='complete' WHERE id='123' AND my_field='pending'
[03:26:00] sevenseacat: sure, use `where` and `update`
[03:26:15] sevenseacat: it sounds complicated, I know.
[03:26:20] circ-user-EwKuv: I tried, but that generated two commands, first a select, then an update based only on id
[03:26:39] circ-user-EwKuv: using 'where' and 'update'
[03:26:53] sevenseacat: you may have to show your code, I'm not a mindreader.
[03:27:05] circ-user-EwKuv: I'll do a pastebin
[03:27:10] Radar: circ-user-EwKuv: !gist
[03:27:10] helpa: circ-user-EwKuv: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[03:27:11] circ-user-EwKuv: should have gone there first.
[03:27:14] Radar: circ-user-EwKuv: !rules
[03:27:14] helpa: circ-user-EwKuv: https://gist.github.com/996779
[03:27:26] circ-user-EwKuv: that works too.
[03:28:52] baweaver: has joined #RubyOnRails
[03:30:29] shock_one: has joined #RubyOnRails
[03:32:53] chouhoulis: has joined #RubyOnRails
[03:34:22] tuelz: has joined #RubyOnRails
[03:36:19] circ-user-EwKuv: I can't find my code that I originally tried... I think I deleted it. But in trying to recreate it, I learned that I've been using 'where' entirely wrong.
[03:36:41] circ-user-EwKuv: I will try again and return if I am unsuccessful. Thanks
[03:37:16] jgpawletko: has joined #RubyOnRails
[03:38:49] Oliphaunte: has joined #RubyOnRails
[03:40:09] one_zero: has joined #RubyOnRails
[03:41:18] Exce1l: has joined #RubyOnRails
[03:43:47] circ-user-EwKuv: sevenseacat, come to find out, my problem was that I tried to use 'take.update_attributes' rather than 'update_all'. 'take.update_attributes' generates a SELECT then an UPDATE, but the 'where...update_all' generates a single query. Thanks a ton!
[03:44:16] circ-user-EwKuv: that is, where(...).take.update_attributes(...), vs where(...).update_all(...)
[03:44:28] circ-user-EwKuv: so I'm good to go. cheers!
[03:44:51] Bloomer: has joined #RubyOnRails
[03:46:57] syzygy_: has joined #RubyOnRails
[03:50:00] lyoshajapan: has joined #RubyOnRails
[03:52:19] kknight: has joined #RubyOnRails
[03:52:41] pawnbox: has joined #RubyOnRails
[03:57:48] dstarh: has joined #RubyOnRails
[03:59:52] Oliphaunte: has joined #RubyOnRails
[04:02:47] Ropeney: has joined #RubyOnRails
[04:05:34] Spami: has joined #RubyOnRails
[04:08:58] Abhijit: has joined #RubyOnRails
[04:09:30] Abhijit: what am I doing wrong here? <%= link_to current_user.firstname current_user.lastname, user_path(:id=>current_user.id) %>
[04:09:44] shibabu: has joined #RubyOnRails
[04:10:09] sevenseacat: ` link_to current_user.firstname current_user.lastname` is a syntax error
[04:10:25] Abhijit: how can I link_to two works then?
[04:10:38] sevenseacat: build a string with the two words, then pass that to link_to ?
[04:13:13] sevenseacat: you'd need to do that anyway, because i presume you want to put a space in between the first name and last night, right?
[04:13:24] dandaman1: has joined #RubyOnRails
[04:13:25] sevenseacat: instead of just a mashup of the two words
[04:15:29] Scripore: has joined #RubyOnRails
[04:15:34] guytws: has joined #RubyOnRails
[04:16:01] braincrash: has joined #RubyOnRails
[04:17:22] fox_mulder_cp: has joined #RubyOnRails
[04:20:24] blackmesa: has joined #RubyOnRails
[04:25:45] Radar: http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
[04:25:50] Radar: Mandatory linkage because you're talking about names.
[04:27:01] sevenseacat: indeed, is a good read.
[04:27:28] mloy: has joined #RubyOnRails
[04:28:23] sevenseacat: my fiance has given up hoping to be referred to by his first name on any official documentation, because his name is laid out middle/first/last
[04:29:29] rgtk: has joined #RubyOnRails
[04:29:40] pipework: sevenseacat: laid out how
[04:30:23] sevenseacat: his middle name comes before his given name.
[04:30:42] pipework: sevenseacat: Pretty sure 'middle' is the operative word in this whole thing.
[04:30:57] sevenseacat: pipework: you might need to read the article :P
[04:31:23] pipework: sevenseacat: I mean that if you call it a middle name, then it's a middle name, right?
[04:31:35] pipework: I've read the article before, I was just poking fun.
[04:33:43] chouhoulis: has joined #RubyOnRails
[04:34:54] williamcage: has joined #RubyOnRails
[04:35:00] joshkovach: has joined #RubyOnRails
[04:35:16] tuelz: has joined #RubyOnRails
[04:35:57] stannard: has joined #RubyOnRails
[04:36:58] nocd: has left #RubyOnRails: ()
[04:37:46] _Tariq: has joined #RubyOnRails
[04:38:24] jun_: has joined #RubyOnRails
[04:39:25] djbkd: has joined #RubyOnRails
[04:44:56] guacamole: has joined #RubyOnRails
[04:51:12] kknight: has joined #RubyOnRails
[04:52:53] krz: has joined #RubyOnRails
[04:57:23] joshkovach: has joined #RubyOnRails
[04:57:36] djbkd: has joined #RubyOnRails
[04:57:42] boxofrox: has joined #RubyOnRails
[04:57:52] guacamole: has joined #RubyOnRails
[04:58:30] braincra-: has joined #RubyOnRails
[05:02:31] joshkovach: has joined #RubyOnRails
[05:06:18] berserk_ren: has joined #RubyOnRails
[05:06:24] ellisTAA: has joined #RubyOnRails
[05:07:03] ellisTAA: i???m looking for some experts in the web dev field to start learning from. can anyone recommend some?
[05:08:02] guacamole: has joined #RubyOnRails
[05:08:26] sevenseacat: oh this will be good
[05:08:44] Radar: ellistaa: I think sevenseacat is volunteering. How nice!
[05:08:53] sevenseacat: lol I'm no expert
[05:09:11] sevenseacat: ellistaa: did matz end up getting back to you?
[05:09:16] ellisTAA: sevenseacat: nope
[05:09:25] ellisTAA: sevenseacat: what???s your github so i can read your code
[05:09:41] Radar: ellistaa: guess
[05:09:53] shock_one: has joined #RubyOnRails
[05:10:13] sevenseacat: its a super secret.
[05:10:30] joshkovach: has joined #RubyOnRails
[05:11:37] foli_: has joined #RubyOnRails
[05:12:11] Radar: 100% secret
[05:12:14] Radar: guaranteed unguessable
[05:12:20] Radar: I didn't even know people could get GH names that long
[05:12:44] Contigi: has joined #RubyOnRails
[05:12:45] baweaver: has joined #RubyOnRails
[05:13:00] shibabu: has joined #RubyOnRails
[05:13:47] foli_: has left #RubyOnRails: ()
[05:13:53] lyoshajapan: has joined #RubyOnRails
[05:14:22] Radar: https://github.com/18717cfe799e65c0ac9cb46ecf63d85167e70f33d795d605e4654d20425d6e82
[05:14:26] Radar: I changed one character in that.
[05:14:39] Radar: This is your first step to finding an expert.
[05:15:06] sevenseacat: its the : isnt it
[05:17:21] dandaman: has joined #RubyOnRails
[05:19:38] threeminutemonta: has joined #RubyOnRails
[05:26:25] guacamole: has joined #RubyOnRails
[05:27:18] ynonp: has joined #RubyOnRails
[05:28:15] roshanavand: has joined #RubyOnRails
[05:28:42] guacamole: has joined #RubyOnRails
[05:33:20] sucks: has joined #RubyOnRails
[05:33:47] guacamole: has joined #RubyOnRails
[05:34:26] chouhoulis: has joined #RubyOnRails
[05:35:47] tuelz: has joined #RubyOnRails
[05:40:33] rubyonrailed: has joined #RubyOnRails
[05:41:46] buzz07630072: has joined #RubyOnRails
[05:42:10] pawnbox: has joined #RubyOnRails
[05:47:16] charby: has joined #RubyOnRails
[05:49:49] yfeldblum: has joined #RubyOnRails
[05:50:23] blackmesa: has joined #RubyOnRails
[05:50:47] pawnbox: has joined #RubyOnRails
[05:53:37] worknick: has joined #RubyOnRails
[05:54:43] worknick: i have setup rails app using unicorn and nginx. i am using paperclip to upload images. it works in rails default server in both dev and prod mode. but it gives something went wrong error on nginx production. what else i need to do with nginx to make it work?
[05:56:51] sevenseacat: whats the error in your error logs?
[05:57:18] worknick: the logs in myapp/logs are empty. the var/log/nginx access and nginx do not say anything about file upload error
[05:58:07] worknick: how can i make it write all the logs ?
[05:58:13] worknick: in production nginx.
[05:58:14] guacamole: has joined #RubyOnRails
[05:58:28] pawnbox: has joined #RubyOnRails
[06:07:47] williamcage: has joined #RubyOnRails
[06:08:30] SteenJobs: has joined #RubyOnRails
[06:10:22] barttenbrinke: has joined #RubyOnRails
[06:10:26] chrisseaton: has joined #RubyOnRails
[06:11:18] shock_one: has joined #RubyOnRails
[06:11:31] ELCALOR: has joined #RubyOnRails
[06:13:30] qejk: has joined #RubyOnRails
[06:14:33] zpe: has joined #RubyOnRails
[06:16:28] worknick: was a public folder permission issue. changed it to 777. now working.
[06:19:16] sevenseacat: https://twitter.com/dhh/status/677596614039613450
[06:20:38] ynonp: has joined #RubyOnRails
[06:21:26] startupality: has joined #RubyOnRails
[06:22:54] matthewd: sevenseacat: Not illustrated: the (multiple!) dates that Basecamp has previously had attached to that milestone :P
[06:24:07] startupality: has joined #RubyOnRails
[06:24:23] ynonp: has joined #RubyOnRails
[06:24:28] sevenseacat: matthewd: I'm really slow and just worked out that you're the one working to make this shit happen. keep up the good work :thumbsup:
[06:24:44] AzaToth: has joined #RubyOnRails
[06:25:07] sdwrage: has joined #RubyOnRails
[06:27:14] matthewd: hah.. I'm doing a nice collection of panic-merges, but can't take credit for driving the release :)
[06:29:52] lyoshajapan: has joined #RubyOnRails
[06:30:22] rgtk: has joined #RubyOnRails
[06:30:45] ur5us: has joined #RubyOnRails
[06:31:47] sdwrage: has joined #RubyOnRails
[06:33:45] chipotle: has joined #RubyOnRails
[06:35:10] chouhoulis: has joined #RubyOnRails
[06:36:38] tuelz: has joined #RubyOnRails
[06:37:38] juddey: has joined #RubyOnRails
[06:37:39] rvanlieshout: has joined #RubyOnRails
[06:39:19] steffkes: has joined #RubyOnRails
[06:39:20] steffkes: has joined #RubyOnRails
[06:39:29] dandaman: has joined #RubyOnRails
[06:42:00] dandaman1: has joined #RubyOnRails
[06:42:00] norc: has joined #RubyOnRails
[06:42:36] norc: Hi. I would like to use settings from a custom yml file in config/environments/X.rb - how would I go about that?
[06:43:03] norc: For example, I would like to configure whether Rails serves static assets through a config file, rather than an environment variable.
[06:43:58] yfeldblum: has joined #RubyOnRails
[06:46:19] lyoshajapan: has joined #RubyOnRails
[06:47:17] guacamole: has joined #RubyOnRails
[06:49:09] dionysus69: has joined #RubyOnRails
[06:52:11] blackmesa: has joined #RubyOnRails
[06:54:09] rvanlieshout: norc: you'd want to open that yaml in that .rb file and use it's settings. just plain ruby
[06:55:16] thoraxe: has joined #RubyOnRails
[06:55:19] thoraxe: has left #RubyOnRails: ()
[06:55:24] jun_: has joined #RubyOnRails
[06:55:53] norc: rvanlieshout: Ah well, I was hoping Rails had a generic mechanism for providing yml config files, like it does for secrets.yml
[06:58:53] rvanlieshout: well.. you could see what kind of object that secrets config this is, and see if it has an initializer where you can specify a custom config file
[06:59:34] norc: That is a good point. I mean I want the same mechanism, makes sense I trace it back in hopes of finding some usuable code. Thanks.
[07:00:23] norc: Another question before I head off writing a few rspecs. I have a monkey patch for Net::IMAP - in order to load it, I was thinking of placing it inside lib/ and requiring the file in an initializer.
[07:00:43] norc: Is that approach fine, or is there a preferred way to load monkey patch code?
[07:01:00] rvanlieshout: it makes sense, but why do you need to monkey patch it?
[07:01:03] rvanlieshout: is it a big patch?
[07:01:16] nocontrol: has joined #RubyOnRails
[07:01:55] Sawbones: has joined #RubyOnRails
[07:02:08] rvanlieshout: cause you could also consider creating a FooIMAP class < Net::IMAP
[07:02:40] norc: That again is a pretty valid argument... :-)
[07:05:30] zpe: has joined #RubyOnRails
[07:05:38] yfeldblum: has joined #RubyOnRails
[07:05:56] darkxploit: has joined #RubyOnRails
[07:06:52] Pazician: has joined #RubyOnRails
[07:07:17] AntiSpamMeta: has joined #RubyOnRails
[07:07:29] sypheren: has joined #RubyOnRails
[07:14:34] zpe: has joined #RubyOnRails
[07:15:43] shibabu: has joined #RubyOnRails
[07:20:50] ewnd9_: has joined #RubyOnRails
[07:27:55] sandstrom: has joined #RubyOnRails
[07:30:08] shibabu: has joined #RubyOnRails
[07:32:08] tagrudev: has joined #RubyOnRails
[07:34:36] djbkd: has joined #RubyOnRails
[07:35:06] tenzan: has joined #RubyOnRails
[07:35:41] tvw: has joined #RubyOnRails
[07:35:56] chouhoulis: has joined #RubyOnRails
[07:37:06] shibabu_: has joined #RubyOnRails
[07:37:23] tuelz: has joined #RubyOnRails
[07:38:29] lxsameer: has joined #RubyOnRails
[07:38:29] lxsameer: has joined #RubyOnRails
[07:41:29] srinidhi: has joined #RubyOnRails
[07:41:49] tetraktys: has joined #RubyOnRails
[07:45:05] Pazician: has joined #RubyOnRails
[07:45:38] shock_one: has joined #RubyOnRails
[07:48:34] williamcage: has joined #RubyOnRails
[07:48:39] matthewd: rvanlieshout: Sounds like norc wanted config_for, FYI
[07:54:07] quazimodo: has joined #RubyOnRails
[07:54:13] blackmesa: has joined #RubyOnRails
[07:54:27] Pazician: has joined #RubyOnRails
[07:55:35] steffkes: has joined #RubyOnRails
[07:55:35] steffkes: has joined #RubyOnRails
[07:56:45] Pazician: has joined #RubyOnRails
[07:58:54] nya: has joined #RubyOnRails
[08:02:58] Cervajz: has joined #RubyOnRails
[08:04:33] zpe: has joined #RubyOnRails
[08:05:28] williamcage: has joined #RubyOnRails
[08:11:35] darutoko: has joined #RubyOnRails
[08:12:21] srinidhi: has joined #RubyOnRails
[08:13:15] steffkes: i'm pretty sure there is something i haven't read/found yet, the problem i'm trying to solve: storing a property as integer-array. i'm using a getter/setter for this property which does split on . and to_i (converting 1.2.3 into [1,2,3] and back).
[08:13:32] roshanavand: has joined #RubyOnRails
[08:13:39] agoldboi: has joined #RubyOnRails
[08:13:47] steffkes: works fine for Entity.create - which obviously calls the setter. Entity.find_by_or_create doesn't. which means i'm unable to find the record i'm looking for.
[08:14:18] roshanavand: has joined #RubyOnRails
[08:14:48] steffkes: first idea: split and convert to_i the parameter i'm passing along - which does result in a property IN(1,2,3) query, which is not what i thought it would do. any pointers?
[08:16:07] medvedu: has joined #RubyOnRails
[08:16:33] chipotle_: has joined #RubyOnRails
[08:16:34] mikecmpbll: has joined #RubyOnRails
[08:17:30] neanderslob: has joined #RubyOnRails
[08:17:44] sonOfRa: has joined #RubyOnRails
[08:17:55] jbrhbr: has joined #RubyOnRails
[08:17:58] steffkes: if some code and/or other samples & stuff might help to understand what i'm trying to describe - let me know :)
[08:18:05] pawnbox: has joined #RubyOnRails
[08:18:49] ur5us: has joined #RubyOnRails
[08:24:53] aganov: has joined #RubyOnRails
[08:27:48] roshanavand: has joined #RubyOnRails
[08:28:51] ewnd9_: has joined #RubyOnRails
[08:30:46] rvanlieshout: steffkes: what do you want? :)
[08:31:10] rgtk: has joined #RubyOnRails
[08:31:57] USvER: has joined #RubyOnRails
[08:32:46] steffkes: rvanlieshout: that's a good question! probably i should start with understanding what the actual problem is. why one thing works and the other doesn't.
[08:32:58] rvanlieshout: so what is the actual problem?
[08:33:21] steffkes: give me a sec, i'll create a pastie - looks like it's easier that way than describing
[08:35:33] startupality: has joined #RubyOnRails
[08:36:40] chouhoulis: has joined #RubyOnRails
[08:38:34] quazimodo: has joined #RubyOnRails
[08:38:47] steffkes: rvanlieshout: first try: http://pastie.org/private/c8jq9j5kxq5hxzyyiksppa
[08:39:17] tuelz: has joined #RubyOnRails
[08:39:49] steffkes: given a few quirks, because i copy/pasted the code together from multiple places ;o hopefully it's still okay
[08:40:27] rvanlieshout: it is. so the problem?
[08:40:58] steffkes: it does not convert the version string into an array of integers. therefore i'm not finding any record
[08:41:55] rvanlieshout: http://api.rubyonrails.org/classes/ActiveRecord/Aggregations/ClassMethods.html#method-i-composed_of
[08:42:56] steffkes: from reading .. that's exactly what i'm looking for, thanks already rvanlieshout
[08:42:59] nbdy: has joined #RubyOnRails
[08:43:13] steffkes: from reading ^= having had a first/quick look
[08:43:51] steffkes: sounds like that could be a replace for my getter/setter as well. i'll give that a try
[08:44:22] steffkes: thanks for being that patient with me rvanlieshout, appreciate it
[08:47:03] shock_one: has joined #RubyOnRails
[08:49:32] sandstrom: has joined #RubyOnRails
[08:51:33] nya: has joined #RubyOnRails
[08:51:48] agoldboi: has left #RubyOnRails: ()
[08:53:56] comrad: has joined #RubyOnRails
[08:54:12] artto: has joined #RubyOnRails
[08:56:56] nettoweb: has joined #RubyOnRails
[08:57:13] blackmesa: has joined #RubyOnRails
[09:00:50] agoldboi: has joined #RubyOnRails
[09:01:46] shock_one: has joined #RubyOnRails
[09:01:56] erichu: has joined #RubyOnRails
[09:03:39] pawnbox: has joined #RubyOnRails
[09:04:57] arBmind: has joined #RubyOnRails
[09:05:05] baweaver: has joined #RubyOnRails
[09:07:59] drptbl: has joined #RubyOnRails
[09:09:22] artto: has joined #RubyOnRails
[09:09:32] sandstrom: has joined #RubyOnRails
[09:10:27] jsrn_: has joined #RubyOnRails
[09:13:10] defsdoor: has joined #RubyOnRails
[09:13:38] lyoshajapan: has joined #RubyOnRails
[09:13:41] teclator: has joined #RubyOnRails
[09:17:08] drptbl: has joined #RubyOnRails
[09:23:38] lyoshajapan: has joined #RubyOnRails
[09:26:34] sandstrom: has joined #RubyOnRails
[09:27:02] mark3: has joined #RubyOnRails
[09:28:15] PlasmaStar: has joined #RubyOnRails
[09:29:55] DavidDudson: has joined #RubyOnRails
[09:31:33] yogeshrt: has joined #RubyOnRails
[09:33:07] blackhuey: has joined #RubyOnRails
[09:35:48] sandstrom: has joined #RubyOnRails
[09:37:27] chouhoulis: has joined #RubyOnRails
[09:37:46] arooni-mobile: has joined #RubyOnRails
[09:37:51] rodfersou: has joined #RubyOnRails
[09:37:57] sandstrom: has joined #RubyOnRails
[09:40:09] sandstrom: has joined #RubyOnRails
[09:42:02] ql6wlld: has joined #RubyOnRails
[09:42:43] blackmesa: has joined #RubyOnRails
[09:44:41] sandstrom: has joined #RubyOnRails
[09:46:40] sandstrom: has joined #RubyOnRails
[09:48:42] sandstrom: has joined #RubyOnRails
[09:50:31] medvedu: hi, there. Can anyone suggest some interest project on github for rails learning. ty
[09:51:59] konsolebox: has joined #RubyOnRails
[09:52:46] NBarnes: has joined #RubyOnRails
[09:53:01] yogeshrt: has joined #RubyOnRails
[09:53:42] Cervajz: has joined #RubyOnRails
[09:54:36] yos7ph: has joined #RubyOnRails
[09:55:05] tetraktys: has joined #RubyOnRails
[09:55:36] Cervajz: has joined #RubyOnRails
[09:56:28] Palsson: has joined #RubyOnRails
[09:56:43] Cervajz: has joined #RubyOnRails
[09:58:59] sandstrom: has joined #RubyOnRails
[10:01:28] Pro|: Hey, is there way to test controller methods that respond to HTTP options
[10:03:43] pawnbox: has joined #RubyOnRails
[10:07:35] PedramT: has joined #RubyOnRails
[10:07:54] vasilakisfil_: has joined #RubyOnRails
[10:08:24] vasilakisfil_: has left #RubyOnRails: ()
[10:08:25] Sephyros: has joined #RubyOnRails
[10:08:46] vasilakisFiL: has joined #RubyOnRails
[10:10:18] vasilakisFiL: is there a way to see the request waiting queue size in puma web server?
[10:11:26] rwsq1: has joined #RubyOnRails
[10:13:13] marr: has joined #RubyOnRails
[10:16:05] rwsq1: so I have a report that I need to do out of a database. It's an html table that summarises a query that joins many postgres tables. I'm aware that I should do as little logic in the view as possible, but I'm struggling to avoid it. I have to calculate subtotals of takings for Organisations, Accounts, Contracts and each one is nested inside the other. How is this sort of thing normally done?
[10:16:43] mekekem: in the controller
[10:16:58] mekekem: or with helpers
[10:17:35] rwsq1: doesn't that mean doing many passes on the same data? Won't that be slow?
[10:17:57] jds: has joined #RubyOnRails
[10:18:11] Sylario: has joined #RubyOnRails
[10:18:45] rwsq1: this report is summarising a few million transactions, so although it's not 'big' it's not small either
[10:19:48] yogeshrt: has joined #RubyOnRails
[10:20:00] rwsq1: The only way I can think of doing it logically is building up a hash in memory of organisations, and inside each putting the total for that organisation and the its accounts and iterating down, but that could potentially use a large amount of RAM
[10:20:37] gregf_: has joined #RubyOnRails
[10:22:02] roshanavand: has joined #RubyOnRails
[10:23:30] lyoshajapan: has joined #RubyOnRails
[10:26:03] xlogic: has joined #RubyOnRails
[10:26:10] nya: has joined #RubyOnRails
[10:26:55] roshanavand: has joined #RubyOnRails
[10:27:26] ynonp: has joined #RubyOnRails
[10:27:59] build22_: has joined #RubyOnRails
[10:28:09] braincra-: has left #RubyOnRails: ()
[10:28:33] nfk|laptop: has joined #RubyOnRails
[10:32:05] rgtk: has joined #RubyOnRails
[10:37:24] braincrash: has joined #RubyOnRails
[10:37:46] tuelz: has joined #RubyOnRails
[10:38:08] chouhoulis: has joined #RubyOnRails
[10:39:33] Palsson: has joined #RubyOnRails
[10:41:23] htmldrum: has joined #RubyOnRails
[10:43:15] tuelz: has joined #RubyOnRails
[10:43:21] krz: has joined #RubyOnRails
[10:47:45] xlogic: has joined #RubyOnRails
[10:51:38] Ergo: has joined #RubyOnRails
[10:52:34] artto: has joined #RubyOnRails
[10:56:10] Meow-J: has joined #RubyOnRails
[10:58:12] htmldrum: has joined #RubyOnRails
[10:58:33] shock_one: has joined #RubyOnRails
[11:01:02] startupality: has joined #RubyOnRails
[11:01:54] Scripore: has joined #RubyOnRails
[11:02:49] artto: has joined #RubyOnRails
[11:03:31] alex88: has joined #RubyOnRails
[11:08:52] elaptics: rwsq1: can you create a postgres view doing as much as possible then you can simply present the results of that - makes the view as simple as iterating each of the row of results
[11:09:14] FooMunki: has joined #RubyOnRails
[11:09:15] roshanav_: has joined #RubyOnRails
[11:09:23] yogeshrt: has joined #RubyOnRails
[11:09:26] fluxsource: has joined #RubyOnRails
[11:13:07] guacamole: has joined #RubyOnRails
[11:14:02] Detch: has joined #RubyOnRails
[11:14:18] tenderlove: has joined #RubyOnRails
[11:14:25] ruid: has joined #RubyOnRails
[11:14:25] ruid: has joined #RubyOnRails
[11:14:39] roshanavand: has joined #RubyOnRails
[11:15:53] rwsq1: elaptics: can a postgres view handle things like running totals per record type?
[11:16:20] rwsq1: I've been thinking about using the rdbms more generally
[11:16:45] fluxsource: has joined #RubyOnRails
[11:18:43] roshanavand: has joined #RubyOnRails
[11:19:21] PedramT: has joined #RubyOnRails
[11:19:56] fluxsource: has joined #RubyOnRails
[11:20:00] USvER[1]: has joined #RubyOnRails
[11:20:24] rickmasta: has joined #RubyOnRails
[11:21:08] srinidhi: has joined #RubyOnRails
[11:21:59] drim: has joined #RubyOnRails
[11:22:07] htmldrum: has joined #RubyOnRails
[11:22:24] drim: what can be the reason, when using my app on production my asset path do not contain any digest?
[11:24:55] elaptics: rwsq1: quite probably
[11:25:13] ur5us: has joined #RubyOnRails
[11:28:13] USvER: has joined #RubyOnRails
[11:31:32] lacrymology: has joined #RubyOnRails
[11:32:47] Cervajz: has joined #RubyOnRails
[11:33:27] bmalum: has joined #RubyOnRails
[11:33:36] PedramT: has joined #RubyOnRails
[11:33:43] srinidhi: has joined #RubyOnRails
[11:36:08] bmalum: has joined #RubyOnRails
[11:36:28] fluxsource: has joined #RubyOnRails
[11:38:54] chouhoulis: has joined #RubyOnRails
[11:40:41] c355E3B: has joined #RubyOnRails
[11:42:43] arBmind1: has joined #RubyOnRails
[11:43:23] jhass: drim: you having the corresponding setting set to false?
[11:43:31] drim: what setting?
[11:44:01] jhass: http://guides.rubyonrails.org/asset_pipeline.html#turning-digests-off
[11:44:23] tuelz: has joined #RubyOnRails
[11:44:37] drim: when running precompile, its generating assets with digest
[11:44:44] remjih: has joined #RubyOnRails
[11:45:04] drim: nop its set to true
[11:45:31] Spami: has joined #RubyOnRails
[11:46:36] jhass: did you maybe neglect to use the proper helpers to reference your assets?
[11:46:42] ewnd9_: has joined #RubyOnRails
[11:46:47] drim: <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
[11:47:01] drim: doesnt seem so
[11:47:23] jhass: are you really sure you set the right RAILS_ENV when starting your application?
[11:47:33] drptbl: has joined #RubyOnRails
[11:47:44] drim: what do you mean?
[11:47:55] drim: when running the server?
[11:48:21] drim: I see the cloudfront url for assets
[11:48:29] drim: which is set in the production initializer
[11:48:39] drim: https://fox.mobilebase-docker.staging.c66.me/
[11:49:23] jhass: initializers are not subject to per environment configuration by default
[11:49:49] drim: talking about config/environment/*
[11:49:57] jhass: that your cert there doesn't match won't help anything either btw
[11:50:34] drim: yes i know :)
[11:50:39] drim: one issue at a time ^^
[11:51:21] sandstrom: has joined #RubyOnRails
[11:52:14] tetraktys: has joined #RubyOnRails
[11:53:57] Cervajz: has joined #RubyOnRails
[11:55:56] shibly: has joined #RubyOnRails
[11:56:02] drim: jhass > any others suggestions?
[11:56:50] shibly: I know php, i know basics of rubyonrails, what should i develop with rails?
[11:58:29] rvanlieshout: shibly: something you need
[11:58:31] sevenseacat: whatever you want
[11:58:35] rvanlieshout: and don't forget to learn about design patterns
[11:59:47] arup_r: has joined #RubyOnRails
[12:00:20] shibly: What is design patterns?
[12:02:17] jhass: drim: no, not without hands on
[12:04:12] cassioscabral: has joined #RubyOnRails
[12:04:17] rvanlieshout: shibly: something you need to know about thoroughly
[12:04:23] rvanlieshout: if you want to become a proper rails dev
[12:06:22] shibly: has left #RubyOnRails: ()
[12:07:26] ElFerna: has joined #RubyOnRails
[12:08:21] pawnbox: has joined #RubyOnRails
[12:09:48] drim: jhass: still here?
[12:10:14] arup_r: has joined #RubyOnRails
[12:11:10] nfk|laptop: has joined #RubyOnRails
[12:12:25] Sawbones: has joined #RubyOnRails
[12:13:38] nyaa: has joined #RubyOnRails
[12:13:54] jhass: drim: I don't see how I can help you any further
[12:15:21] nerium: has joined #RubyOnRails
[12:21:50] Miron_: has joined #RubyOnRails
[12:23:45] adre: has joined #RubyOnRails
[12:23:53] Oliphaunte: has joined #RubyOnRails
[12:24:01] doodlehaus: has joined #RubyOnRails
[12:30:41] PedramT: has joined #RubyOnRails
[12:31:10] King_Rex: has joined #RubyOnRails
[12:32:17] pcpanic__: has joined #RubyOnRails
[12:32:38] pcpanic__: Hello peoples, I know this ain't the place, but the tsql/sql channel is dead...
[12:32:48] pcpanic__: https://gist.github.com/ysinc88/363eb0f39810a3afd5bd how does one simply concat in tsql?
[12:32:55] rgtk: has joined #RubyOnRails
[12:33:42] build22_: has joined #RubyOnRails
[12:35:04] atumzin: has joined #RubyOnRails
[12:35:04] atumzin: has joined #RubyOnRails
[12:35:11] tuelz: has joined #RubyOnRails
[12:35:27] srinidhi: has joined #RubyOnRails
[12:39:11] upsell5: has joined #RubyOnRails
[12:39:38] chouhoulis: has joined #RubyOnRails
[12:40:56] Yomero3: has joined #RubyOnRails
[12:41:14] mentero: has joined #RubyOnRails
[12:42:27] artto: has joined #RubyOnRails
[12:43:04] gavit: https://github.com/rgeo/rgeo <- this states By default, the gem installation looks for the Proj4 library. how do I know if I found the proj directory?
[12:45:25] gavit: require 'RGeo' fails on my production server :(
[12:45:40] PedramT: has joined #RubyOnRails
[12:51:01] solars: anyone have a dockerfile for creating a mysql container with both a test as well as dev db?
[12:53:22] gthank: has joined #RubyOnRails
[12:53:22] gthank: has joined #RubyOnRails
[12:57:20] cassioscabral: has joined #RubyOnRails
[12:57:30] Sephyros: has joined #RubyOnRails
[12:57:51] nyaa: has joined #RubyOnRails
[12:58:30] benhuda: has joined #RubyOnRails
[12:59:54] PedramT: has joined #RubyOnRails
[13:00:55] wethu: has joined #RubyOnRails
[13:01:28] pika_pika: has joined #RubyOnRails
[13:03:06] Sephyros: ActiveRecord has a default ordering?
[13:03:24] Sephyros: i know that isnt id or created_at...
[13:03:26] ruid: has joined #RubyOnRails
[13:03:27] ruid: has joined #RubyOnRails
[13:04:31] steffkes: Sephyros: not that i'd know of - if the application doesn't specify an ORDER BY clause the database does "natural sorting" whatever that means in detail ;)
[13:06:13] gurix: has joined #RubyOnRails
[13:06:35] Ergo^: has joined #RubyOnRails
[13:06:43] Sephyros: ok... i updated one row and know cannot order...even order(:id) or oder(:created_at) wont work....
[13:09:01] baweaver: has joined #RubyOnRails
[13:09:52] Oliphaunte: has joined #RubyOnRails
[13:10:03] steffkes: "cannot order" means what exactly? parts of the query ignored? error message?
[13:10:42] Darkman738: has joined #RubyOnRails
[13:11:59] USvER[1]: has joined #RubyOnRails
[13:12:19] roshanavand: has joined #RubyOnRails
[13:12:29] Sephyros: the updated row comes first... even if i order by created_at (all the same)...
[13:13:22] Sephyros: i think i will need to create a column with a fixed ordering to order >.< but i dont like that =/
[13:13:51] adre: has joined #RubyOnRails
[13:15:47] Ergo: has joined #RubyOnRails
[13:16:39] Sephyros: for example... i have 3 records created at same time (come from seed), updated at same time... if i leave this way its ok, the ordering is the same ordering from seed file, but if i update one of these rows the updated row come on first if i use ".all"
[13:16:43] PedramT: has joined #RubyOnRails
[13:17:27] Sephyros: in production and test i can order by ID, but not in dev
[13:19:02] mikecmpbll: has joined #RubyOnRails
[13:20:52] roshanavand: has joined #RubyOnRails
[13:21:31] roshanavand: has joined #RubyOnRails
[13:22:46] atomical: has joined #RubyOnRails
[13:23:27] roshanavand: has joined #RubyOnRails
[13:25:00] tetraktys: has joined #RubyOnRails
[13:25:26] Surt_Q: has joined #RubyOnRails
[13:26:30] Jet4Fire: has joined #RubyOnRails
[13:27:36] d0nn1e: has joined #RubyOnRails
[13:28:34] Oliphaunte: has joined #RubyOnRails
[13:29:29] Hates_: Sephyros: have you checked the SQL?
[13:30:14] moises_k9: has joined #RubyOnRails
[13:30:42] ankitkulshrestha: has joined #RubyOnRails
[13:30:50] jkamenik: has joined #RubyOnRails
[13:31:02] ankitkulshrestha: Hi rails community. Django convert here
[13:32:10] ankitkulshrestha: Switched over from Django, now very happy with Rails
[13:32:42] CornishPasty: Hey ankitkulshrestha
[13:32:56] hardtail: has joined #RubyOnRails
[13:33:32] puria: has joined #RubyOnRails
[13:34:17] xlogic: has joined #RubyOnRails
[13:38:11] kp666: has joined #RubyOnRails
[13:38:14] roshanav_: has joined #RubyOnRails
[13:39:59] ramortegui: has joined #RubyOnRails
[13:40:22] chouhoulis: has joined #RubyOnRails
[13:41:58] Sephyros: yes, checked, and is ok, its what i want
[13:42:10] chipotle: has joined #RubyOnRails
[13:43:10] ynonp: has joined #RubyOnRails
[13:44:38] chipotle_: has joined #RubyOnRails
[13:47:59] nyaa: has joined #RubyOnRails
[13:48:50] Hates_: Sephyros: so the SQL is right but the order is wrong?
[13:49:07] dstarh: has joined #RubyOnRails
[13:49:18] MissionCritical: has joined #RubyOnRails
[13:50:25] swav: has joined #RubyOnRails
[13:50:42] goodcodeguy: has joined #RubyOnRails
[13:51:01] maxz: has joined #RubyOnRails
[13:51:48] tuelz: has joined #RubyOnRails
[13:52:02] soahccc: has joined #RubyOnRails
[13:52:06] williamcage: has joined #RubyOnRails
[13:54:41] atomical_: has joined #RubyOnRails
[13:56:16] adre: has joined #RubyOnRails
[13:56:24] shibabu: has joined #RubyOnRails
[13:58:45] maxz: has joined #RubyOnRails
[13:59:22] lipoqil: has joined #RubyOnRails
[14:01:37] King_Rex: has joined #RubyOnRails
[14:04:26] Scripore: has joined #RubyOnRails
[14:06:09] akaiiro: has joined #RubyOnRails
[14:09:26] adre: has joined #RubyOnRails
[14:09:31] nfk|laptop: has joined #RubyOnRails
[14:09:40] centrx: has joined #RubyOnRails
[14:09:50] moeabdol: has joined #RubyOnRails
[14:10:38] Denarii: has joined #RubyOnRails
[14:12:23] atomical: has joined #RubyOnRails
[14:14:01] LightStalker: has joined #RubyOnRails
[14:14:25] moeabdol: has joined #RubyOnRails
[14:15:21] eyck: has joined #RubyOnRails
[14:17:02] maxz: has joined #RubyOnRails
[14:17:41] eyck: has joined #RubyOnRails
[14:18:15] sankaber: has joined #RubyOnRails
[14:20:09] p8m: has joined #RubyOnRails
[14:20:42] doodlehaus: has joined #RubyOnRails
[14:22:18] arup_r: has joined #RubyOnRails
[14:23:12] worknick: has joined #RubyOnRails
[14:24:07] worknick: i installed act as votaable. added act as votable to post model and act as voter to user model. when i try to print pa.votes or .likes it says method votes / likes undefined.
[14:24:35] worknick: but pa.liked_by current_user says true. pa is my instance of post model. what am i doing wrong?
[14:24:54] worknick: no user has yet voted or liked anything. this is first time i am printing this. does that matter?
[14:25:49] elaptics: worknick: !code
[14:25:49] helpa: worknick: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[14:26:26] worknick: tbh, its just <%= pa.likes %>. nothing else.
[14:26:28] sevenseacat: we cant help you figure out what you've done wrong, if we can't see what you've done
[14:26:43] worknick: i installed gem, rake db migrate and <%= pa.likes %> only three steps.
[14:26:57] sevenseacat: in that case, you didnt set up the gem correctly
[14:27:17] Or1on: has joined #RubyOnRails
[14:27:17] Or1on: has joined #RubyOnRails
[14:27:36] elaptics: worknick: I would imagine you should have generated a migration - there's no point just running db:migrate unless a migration was created
[14:27:38] worknick: i am following this https://github.com/ryanto/acts_as_votable
[14:28:07] elaptics: worknick: so did you generate a migration like it shows in the readme?
[14:28:11] worknick: elaptics: yes. according to their doc, i generated migration. made post act as votable made user act as voter db migrate
[14:28:19] wildlander: has joined #RubyOnRails
[14:28:35] sevenseacat: so where does it say you can call .likes on a post
[14:28:36] worknick: there is new votes table in my db;
[14:28:52] worknick: "Registered Votes"
[14:28:58] sevenseacat: you've definitely skipped steps in the installation
[14:29:01] wildlander: has joined #RubyOnRails
[14:29:01] sevenseacat: and configuration
[14:29:02] worknick: i just want to show likes / votes of current post. i thought thats how we do it.
[14:29:04] elaptics: worknick: double check that you have followed all the steps correctly, saved all the files, and make sure you've restarted your web server
[14:29:05] Scripore: has joined #RubyOnRails
[14:29:27] sevenseacat: worknick: pro tip - when we ask to see some code, we mean it.
[14:30:00] Aarkon: has joined #RubyOnRails
[14:30:02] worknick: yeah i know. its just one <%= statement. hence i hesitated.
[14:30:10] wildlander: has joined #RubyOnRails
[14:30:14] elaptics: except it's not just one step/statement
[14:30:18] MissionCritical: has joined #RubyOnRails
[14:30:22] sevenseacat: because you didnt configure your models correctly.
[14:30:22] build22: has joined #RubyOnRails
[14:30:28] build22: has left #RubyOnRails: ()
[14:30:36] doodlehaus: has joined #RubyOnRails
[14:30:37] sevenseacat: and you skipped telling us that you generated a migration
[14:30:43] sevenseacat: and you generally just annoyed me
[14:30:54] wildlander: has joined #RubyOnRails
[14:32:39] pwnd_nsfw: has joined #RubyOnRails
[14:32:55] Aarkon: Hey guys!
[14:33:09] helpa: We're not all guys here - while you probably didn't mean to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[14:33:28] Aarkon: Why not. Hey folks then! :)
[14:33:46] rgtk: has joined #RubyOnRails
[14:34:04] Aarkon: I just wanted to know if anyone is confident with setting up a rails installation on a virtual machine?
[14:34:42] PedramT: has joined #RubyOnRails
[14:34:45] Aarkon: I find it impossible to connect to the WEBrick server from the host machine.
[14:35:15] Aarkon: Host machine is my desktop, guest system a ubuntu server, headless.
[14:35:32] chouhoulis: has joined #RubyOnRails
[14:35:43] sevenseacat: connecting to the right IP address, and started your Rails server on the guest to listen on 0.0.0.0 ?
[14:35:51] Aarkon: I have set up a separate ip-adress for the guest, and I can connect to it with ssh.
[14:35:55] Oliphaunte: has joined #RubyOnRails
[14:36:13] Aarkon: Well, I got the ip adress right, i know that for sure.
[14:36:38] Aarkon: I'll check if I find where the Rails server listens.
[14:36:50] krz: has joined #RubyOnRails
[14:37:14] sevenseacat: its the --binding option when you start the server.
[14:37:33] Aarkon: Haven't altered it yet. Default is 0.0.0.0?
[14:37:39] sevenseacat: no, default is localhost.
[14:38:09] Aarkon: Ok, that would explain why I can see the default landing page using lynx locally.
[14:38:14] gurix: has joined #RubyOnRails
[14:38:18] Aarkon: Sorry, total new with rails. ^^
[14:38:44] sevenseacat: then I'd suggest not stuffing around with virtual machines and just learning rails, but thats my opinion.
[14:39:47] Aarkon: I set up the virtual machine in order to get back to a "clean start" whenever I need to.
[14:41:58] nullwarp: something like rbenv or rvm would do the same thing without the overhead of a VM
[14:43:22] polishdub: has joined #RubyOnRails
[14:43:29] Aarkon: It might. I even have rvm installed on the virtual machine.
[14:43:46] Aarkon: But with the binding-option, I managed to see my starting page, thanks so far! :)
[14:44:20] rgtk: has joined #RubyOnRails
[14:47:58] hardtail: has joined #RubyOnRails
[14:49:32] theod: has joined #RubyOnRails
[14:51:07] dionysus69: has joined #RubyOnRails
[14:58:54] hardtail: has joined #RubyOnRails
[14:59:43] ewnd9_: has joined #RubyOnRails
[14:59:46] elaptics: Aarkon: what are you using for the VM. I'd recommend using something like vagrant which makes it a lot easier to manage
[15:00:45] atomical_: has joined #RubyOnRails
[15:00:55] Aarkon: Nothing special: Virtual Box running Ubuntu Server.
[15:01:37] elaptics: Aarkon: I would totally look into vagrant then
[15:01:53] Aarkon: I made a fallback point with a clean installation of rvm
[15:01:58] Aarkon: I'll have a look, thanks!
[15:02:04] snowy: has joined #RubyOnRails
[15:02:32] elaptics: it makes it easy to manage the VMs for different projects and you won't have to worry about running the server differently, you just configure vagrant to forward the right ports for access locally
[15:03:08] Aarkon: This looks like something I might to install on my webserver to play around with rails from my university or elsewhere
[15:04:05] Aarkon: This really looks awesome, thank you!
[15:04:46] marr: has joined #RubyOnRails
[15:05:13] alex88: has joined #RubyOnRails
[15:06:33] Ergo: has joined #RubyOnRails
[15:06:49] atomical: has joined #RubyOnRails
[15:07:08] joshkovach: has joined #RubyOnRails
[15:07:42] IrishGringo: has joined #RubyOnRails
[15:10:54] n1lo: has joined #RubyOnRails
[15:12:15] jkamenik: has joined #RubyOnRails
[15:14:12] NBarnes: has joined #RubyOnRails
[15:14:59] alphaatom: has joined #RubyOnRails
[15:17:31] chouhoulis: has joined #RubyOnRails
[15:18:19] JahBless_: has joined #RubyOnRails
[15:18:23] nettoweb: has joined #RubyOnRails
[15:18:35] atomical_: has joined #RubyOnRails
[15:19:42] sucks: has joined #RubyOnRails
[15:21:20] Oliphaunte: has joined #RubyOnRails
[15:21:39] shanemcd: has joined #RubyOnRails
[15:21:46] silverdust: I looked the the guides on nested layout and it's so short I don't understand it or maybe it's just not doing what I want. Here's how I think it works
[15:22:41] goodcodeguy: has joined #RubyOnRails
[15:22:43] silverdust: application.html.erb has major template but I want a fixed sidebar among some other views such that content can come in them
[15:22:56] havenwood: ?rails silverdust
[15:22:59] silverdust: partials could have been a good idea but the content in the sidebar may vary
[15:23:14] silverdust: what's that supposed to show?
[15:23:17] havenwood: silverdust: The #RubyOnRails channel is the best place for Rails-related questions.
[15:23:26] Zadrel: has joined #RubyOnRails
[15:23:28] sevenseacat: aaand thats where we are
[15:23:46] havenwood: ACTION crawls into a hole
[15:23:49] ql6wlld: has joined #RubyOnRails
[15:23:50] silverdust: haha you thought you were in #ruby
[15:23:58] havenwood: ACTION feels shame
[15:23:58] ferr: has joined #RubyOnRails
[15:24:03] sevenseacat: ACTION gives havenwood a cup of #{caffeinated_beverage}
[15:24:58] silverdust: should I just use a different layout for this?
[15:26:01] hardtail: has joined #RubyOnRails
[15:26:31] mag42c: has joined #RubyOnRails
[15:28:51] ql6wlld: has joined #RubyOnRails
[15:31:25] ornerymoose: has joined #RubyOnRails
[15:32:42] Ergo: has joined #RubyOnRails
[15:33:34] ynonp: has joined #RubyOnRails
[15:34:25] nertzy: has joined #RubyOnRails
[15:34:58] michael_mbp: what's the best way of testing if an OAuth token is valid, say for Facebook? Twitter has a specific API endpoint that lets you verify a token; FB does not. Should I just fetch the token user's profile info?
[15:36:14] Darkman738: has joined #RubyOnRails
[15:36:45] hfp: has joined #RubyOnRails
[15:37:15] hfp_work: has joined #RubyOnRails
[15:38:15] ibouvousaime: has joined #RubyOnRails
[15:39:50] ynonp: has joined #RubyOnRails
[15:41:27] draig: has joined #RubyOnRails
[15:42:39] alex88: has joined #RubyOnRails
[15:42:44] sandstrom: has joined #RubyOnRails
[15:44:07] PedramT: has joined #RubyOnRails
[15:47:24] nfk|laptop: has joined #RubyOnRails
[15:49:19] ElFerna: has joined #RubyOnRails
[15:50:45] alex88: has joined #RubyOnRails
[15:51:19] Palsson: has joined #RubyOnRails
[15:51:54] dideler: has joined #RubyOnRails
[15:52:10] williamcage: has joined #RubyOnRails
[15:55:30] Ergo^: has joined #RubyOnRails
[15:55:34] bratsche: has joined #RubyOnRails
[15:55:45] adre: has joined #RubyOnRails
[15:57:01] shibabu: has joined #RubyOnRails
[15:58:47] roshanavand: has joined #RubyOnRails
[15:59:12] rgtk: has joined #RubyOnRails
[15:59:43] AnoHito: has joined #RubyOnRails
[15:59:56] shanemcd: has joined #RubyOnRails
[16:04:56] nocontrol: has joined #RubyOnRails
[16:05:33] nocontrol: has joined #RubyOnRails
[16:06:39] stannard: has joined #RubyOnRails
[16:07:04] ewnd9_: has joined #RubyOnRails
[16:07:48] cassioscabral: has joined #RubyOnRails
[16:08:24] Oliphaunte: has joined #RubyOnRails
[16:08:35] ornerymoose: has joined #RubyOnRails
[16:11:55] benhuda: has joined #RubyOnRails
[16:13:34] lxkm: has joined #RubyOnRails
[16:14:46] hardtail: has joined #RubyOnRails
[16:15:18] Sawbones: has joined #RubyOnRails
[16:15:28] alfie_max15: has joined #RubyOnRails
[16:15:52] PedramT: has joined #RubyOnRails
[16:16:04] alfie_max15: i'm facing an issue using filepicker inside activeadmin forms
[16:16:26] alfie_max15: i've created a question on SO for the same : http://stackoverflow.com/questions/34358451/filepicker-field-in-active-admin-edit-page-doesnt-get-rendered
[16:16:41] alfie_max15: you can find the code and the specific error details there
[16:16:44] lucha: has joined #RubyOnRails
[16:17:13] atomical: has joined #RubyOnRails
[16:17:24] gambl0re: has joined #RubyOnRails
[16:18:09] kies^: has joined #RubyOnRails
[16:18:47] claytonzaugg: has joined #RubyOnRails
[16:20:38] _Tariq: has joined #RubyOnRails
[16:25:10] ElFerna: has joined #RubyOnRails
[16:26:59] bmalum: has joined #RubyOnRails
[16:27:49] Oliphaunte: has joined #RubyOnRails
[16:28:46] centrx: has joined #RubyOnRails
[16:29:22] adre: has joined #RubyOnRails
[16:31:11] shock_one: has joined #RubyOnRails
[16:32:46] Sawbones: has joined #RubyOnRails
[16:34:17] moeabdol: has joined #RubyOnRails
[16:34:17] lacuna: has joined #RubyOnRails
[16:34:18] lacuna: has joined #RubyOnRails
[16:35:12] dici: has joined #RubyOnRails
[16:35:20] jstransky: has joined #RubyOnRails
[16:37:14] The_Phoenix: has joined #RubyOnRails
[16:37:42] stannard: has joined #RubyOnRails
[16:38:59] doodlehaus: has joined #RubyOnRails
[16:41:21] [Butch]: has joined #RubyOnRails
[16:42:59] smathy: has joined #RubyOnRails
[16:47:14] stannard: has joined #RubyOnRails
[16:47:20] iateadonut: has joined #RubyOnRails
[16:48:05] stannard: has joined #RubyOnRails
[16:48:21] jbrhbr: has joined #RubyOnRails
[16:48:23] ElFerna: has joined #RubyOnRails
[16:50:59] IrishGringo: has joined #RubyOnRails
[16:53:53] ElFerna: has joined #RubyOnRails
[16:58:46] stannard: has joined #RubyOnRails
[17:00:00] Darkman738: has joined #RubyOnRails
[17:00:41] shibabu: has joined #RubyOnRails
[17:01:27] shanemcd: has joined #RubyOnRails
[17:03:12] rickmasta: has joined #RubyOnRails
[17:05:43] Seich: has joined #RubyOnRails
[17:06:56] twilling: has joined #RubyOnRails
[17:07:25] SPYGAME: has joined #RubyOnRails
[17:07:43] Pazician: has joined #RubyOnRails
[17:07:46] SPYGAME: hey guys, is there a free web app for papertrail ?
[17:08:41] stannard: has joined #RubyOnRails
[17:09:40] jkamenik: has joined #RubyOnRails
[17:09:50] roshanavand: has joined #RubyOnRails
[17:11:55] lsone: has joined #RubyOnRails
[17:13:03] atomical: has joined #RubyOnRails
[17:13:44] SPYGAME: has joined #RubyOnRails
[17:14:18] SPYGAME: hey guys, is there a free web app for papertrail ?
[17:15:16] lsone: spygame: what do you mean, free web app?
[17:15:32] lsone: there is a free tier for papertrail ...
[17:15:33] ElFerna: has joined #RubyOnRails
[17:17:06] SPYGAME: lsone: that's cool, i was introduced to a payment plan and i didn't know
[17:17:08] ferr: has joined #RubyOnRails
[17:20:40] djbkd: has joined #RubyOnRails
[17:21:31] lsone: spygame: https://papertrailapp.com/plans
[17:21:34] lsone: no problem at all
[17:21:47] roshanav_: has joined #RubyOnRails
[17:23:49] adre: has joined #RubyOnRails
[17:24:22] ornerymoose_: has joined #RubyOnRails
[17:26:19] Scripore: has joined #RubyOnRails
[17:28:52] arup_r: has joined #RubyOnRails
[17:31:47] arup_r: Hi, I am making my own error pages which will be served from my Rails app.. I followed 2 blogs http://thepugautomatic.com/2014/08/404-with-rails-4/ and https://mattbrictson.com/dynamic-rails-error-pages .. But they have shown the route declaration slightly differently.. should I need that via: [..] thing.. or only get '..' => .. is good to go ?
[17:32:31] matthewd: arup_r: !try
[17:32:31] helpa: arup_r: Why don't you try it and find out for yourself?
[17:32:59] arup_r: matthewd: What I will try .. I will make a POST request, and a PATCH request ... etc
[17:33:08] ferr: has joined #RubyOnRails
[17:33:39] arup_r: There are people.. Who might already used it, and can give me better advise .. take this approach or that approach,..
[17:34:03] arup_r: it is just a best practice question..
[17:34:27] markh: has joined #RubyOnRails
[17:35:32] treehug88: has joined #RubyOnRails
[17:37:18] djbkd: has joined #RubyOnRails
[17:38:40] sandstrom: has joined #RubyOnRails
[17:39:39] doodlehaus: has joined #RubyOnRails
[17:39:39] flashpoint9: has joined #RubyOnRails
[17:42:43] bigbob: has joined #RubyOnRails
[17:45:38] maxz: has joined #RubyOnRails
[17:47:05] nertzy: has joined #RubyOnRails
[17:47:53] rubyonrailed: has joined #RubyOnRails
[17:48:31] sandstrom: has joined #RubyOnRails
[17:49:30] [Butch]: has joined #RubyOnRails
[17:51:57] ashishsingh173: has joined #RubyOnRails
[17:52:48] Macca: has joined #RubyOnRails
[17:53:06] Oliphaunte: has joined #RubyOnRails
[17:53:14] IrishGringo: has joined #RubyOnRails
[17:53:55] mrtomme: has joined #RubyOnRails
[17:54:09] goodcodeguy: has joined #RubyOnRails
[17:55:27] sleungcy: has joined #RubyOnRails
[17:56:33] ElFerna: has joined #RubyOnRails
[17:57:07] maxz: has joined #RubyOnRails
[17:58:02] nettoweb: has joined #RubyOnRails
[17:58:53] syzygy_: has joined #RubyOnRails
[17:58:58] sandstrom: has joined #RubyOnRails
[18:01:40] benlieb: has joined #RubyOnRails
[18:03:15] benlieb: Should all migrations be runnable from the beginning for the life of the app to ???recreate??? the schema?
[18:03:17] jmrepetti: has joined #RubyOnRails
[18:04:26] tm_X: has joined #RubyOnRails
[18:06:45] Cervajz: has joined #RubyOnRails
[18:08:08] jbrhbr: has joined #RubyOnRails
[18:09:38] ngscheurich: has joined #RubyOnRails
[18:09:59] guacamole: has joined #RubyOnRails
[18:10:29] cassioscabral: has joined #RubyOnRails
[18:10:49] lsone: benlieb: i've seen it done, and had it done in 2 ways. one was keeping them as they are, always ensuring your ups/downs worked properly. the other way was eventually consolidating migrations, so as not to have thousands of files
[18:11:08] ur5us: has joined #RubyOnRails
[18:11:33] ur5us: has joined #RubyOnRails
[18:11:45] Cervajz: has joined #RubyOnRails
[18:12:24] lsone: "When migrations have gotten out of hand and take too long to run, or no longer create the database properly, developers should not be afraid to clear out the old migrations directory, dump a new schema, and continue on from there. Setting up a new development environment would then require a rake db:schema:load rather than the rake db:migrate that most developers rely on."
[18:12:29] steffkes: has joined #RubyOnRails
[18:12:29] steffkes: has joined #RubyOnRails
[18:12:55] lsone: benlieb: http://edgeguides.rubyonrails.org/active_record_migrations.html#schema-dumping-and-you
[18:16:06] manfrin: has joined #RubyOnRails
[18:16:40] benlieb: I can???t find that quote on that link. I really need to, because I???m arguing with my team and need the reference :)
[18:17:32] user083: has joined #RubyOnRails
[18:18:11] lacuna: has joined #RubyOnRails
[18:18:12] lacuna: has joined #RubyOnRails
[18:18:56] alfie_max15: benlieb, just google the quote ;)
[18:19:23] berserk_ren: has joined #RubyOnRails
[18:19:45] drbayer: has joined #RubyOnRails
[18:19:57] drbayer: has left #RubyOnRails: ()
[18:19:59] drbayer: has joined #RubyOnRails
[18:20:14] lsone: oh that quote was from toptal
[18:20:24] lsone: http://www.toptal.com/ruby-on-rails/top-10-mistakes-that-rails-programmers-make
[18:21:12] shanemcd: has joined #RubyOnRails
[18:23:51] Frem: has joined #RubyOnRails
[18:24:23] benlieb: yeah, I found it
[18:24:29] benlieb: it???s useful
[18:24:34] matthewd: benlieb: schema.rb is the authority; migrations are just how you get there
[18:24:53] matthewd: Migrations should be discardable once you can safely assume they've been run in every environment
[18:25:25] benlieb: I agree, but someone on my team thinks otherwise, and referenced this: http://blog.testdouble.com/posts/2014-11-04-healthy-migration-habits.html
[18:25:34] matthewd: (our app at work actually does the opposite, and migrates from scratch, which makes me sad.. but apparently there are reasons.)
[18:25:49] benlieb: Looks like there are 2 schools
[18:26:01] lsone: there definitely are
[18:26:14] matthewd: I'm sure there are.. but the above is Word of David.
[18:26:20] lsone: my mid-sized projects still have alllll their migrations and run from scratch far too often
[18:26:32] lsone: it is my larger projects, and personal side projects, where i lean on schema.rb
[18:27:27] jkamenik: has joined #RubyOnRails
[18:27:58] ModusPwnens: has joined #RubyOnRails
[18:28:48] ModusPwnens: If you want to add the ability to download a CSV representation of a model (or list of models), whose responsibility is that? I've seen a lot of examples of peopple adding a .to_csv method to their model, but is that the model's responsibility? Or is it more the view's?
[18:30:59] RegulationD: has joined #RubyOnRails
[18:31:52] bigbob: has joined #RubyOnRails
[18:32:17] rubyonrailed: has joined #RubyOnRails
[18:32:45] Darkman738: has joined #RubyOnRails
[18:33:05] _Tariq: has joined #RubyOnRails
[18:33:28] shanemcd: has joined #RubyOnRails
[18:33:39] NBarnes: has joined #RubyOnRails
[18:39:17] RegulationD: has joined #RubyOnRails
[18:39:34] dionysus69: has joined #RubyOnRails
[18:41:44] jbrhbr: has joined #RubyOnRails
[18:46:20] maxz: has joined #RubyOnRails
[18:47:54] Oliphaunte: has joined #RubyOnRails
[18:52:35] lacrymology: is anyone fluent in devise? any clues what's the right way to provide the 'reset password' functionality from an API?
[18:52:49] Darkman738: has joined #RubyOnRails
[18:54:58] tvw: has joined #RubyOnRails
[18:56:26] sandstrom: has joined #RubyOnRails
[18:56:53] lacuna: has joined #RubyOnRails
[18:56:54] lacuna: has joined #RubyOnRails
[18:57:55] syzygy_: has joined #RubyOnRails
[18:59:16] ciree: how do you handle complex redirect logic?
[18:59:21] ciree: just a huge if?
[19:00:45] Cervajz_: has joined #RubyOnRails
[19:02:15] shibabu: has joined #RubyOnRails
[19:04:24] ascarter: has joined #RubyOnRails
[19:04:30] doodlehaus: has joined #RubyOnRails
[19:06:56] rhizome: has joined #RubyOnRails
[19:07:11] sucks: has joined #RubyOnRails
[19:07:17] ferr: has joined #RubyOnRails
[19:08:01] lxsameer: has joined #RubyOnRails
[19:08:01] lxsameer: has joined #RubyOnRails
[19:08:07] ibouvousaime: has joined #RubyOnRails
[19:08:19] guacamole: has joined #RubyOnRails
[19:08:52] tuelz: has joined #RubyOnRails
[19:09:56] djbkd: has joined #RubyOnRails
[19:09:58] smathy: ciree, a method.
[19:10:16] ciree: well right, but within that method
[19:10:19] ciree: is a huge if
[19:10:56] epochwolf: ciree: do you have an example?
[19:11:33] epochwolf: Genreally you break logic out into multiple methods or even create an entire class if it's complex enough.
[19:12:21] startupality: has joined #RubyOnRails
[19:12:21] ciree: makes sense
[19:12:35] drbayer: has joined #RubyOnRails
[19:13:18] lacuna: has joined #RubyOnRails
[19:14:04] jottr: has joined #RubyOnRails
[19:14:40] arooni-mobile: has joined #RubyOnRails
[19:15:40] jottr: has joined #RubyOnRails
[19:17:12] colleenmcguckin: has joined #RubyOnRails
[19:19:03] twilling: has joined #RubyOnRails
[19:19:55] mostlybadfly: has joined #RubyOnRails
[19:24:11] pawnbox: has joined #RubyOnRails
[19:24:52] Pazician: has joined #RubyOnRails
[19:25:18] jottr: has joined #RubyOnRails
[19:26:42] sandstrom: has joined #RubyOnRails
[19:27:18] djbkd: has joined #RubyOnRails
[19:27:55] colleenmcguckin: has joined #RubyOnRails
[19:28:11] rodfersou|afk: has joined #RubyOnRails
[19:28:14] indiebrain: has joined #RubyOnRails
[19:28:30] edwinvdgraaf: has joined #RubyOnRails
[19:28:59] stannard_: has joined #RubyOnRails
[19:29:44] syzygy_: has joined #RubyOnRails
[19:30:29] drbayer: has joined #RubyOnRails
[19:30:36] Odie: has joined #RubyOnRails
[19:30:55] lacuna: has joined #RubyOnRails
[19:30:56] lacuna: has joined #RubyOnRails
[19:32:43] IrishGringo: has joined #RubyOnRails
[19:33:22] sankaber: has joined #RubyOnRails
[19:34:06] nettoweb: has joined #RubyOnRails
[19:34:48] srinidhi: has joined #RubyOnRails
[19:36:43] StevenXL: has joined #RubyOnRails
[19:36:44] StevenXL: has joined #RubyOnRails
[19:39:02] doodlehaus: has joined #RubyOnRails
[19:41:27] sankaber: has joined #RubyOnRails
[19:41:44] Oliphaunte: has joined #RubyOnRails
[19:42:46] lacuna_: has joined #RubyOnRails
[19:44:21] Synthead: is there a way to have a global variable or something that hangs around in memory, even after every request?
[19:44:29] Synthead: something that isn't session-based?
[19:45:39] epochwolf: Synthead: yeah, use a global variable but beware threading and multiple app servers in production
[19:46:42] epochwolf: Synthead: generally, if you need to save state between requests, you need to store it in a cookie or in the database (or other storage engine)
[19:47:45] Synthead: epochwolf: for sure. I have a bit of an odd use-case that doesn't really fit db or cache storage
[19:48:12] Synthead: epochwolf: good thinking about the multiple threads, too
[19:48:17] epochwolf: Synthead: then we should probably talk about it and find a solution.
[19:48:45] Synthead: epochwolf: haha, yeah. I'm still gathering my thoughts and figure out my approach as well so I'm not just rambling
[19:49:12] epochwolf: Synthead: what's the problem you're solving?
[19:49:40] Guest25944: has left #RubyOnRails: ()
[19:49:46] epochwolf: Is it a chat server that needs global state shared with everyone?
[19:50:05] epochwolf: Or a game needing something similar?
[19:50:10] teaearlgraycold: has joined #RubyOnRails
[19:50:33] teaearlgraycold: Is there a way to click around in the chrome dev console without the JS engine detecing my clicks
[19:50:33] epochwolf: Or are we talking about a shared resource that needs to be locked until some operation is finished?
[19:50:40] teaearlgraycold: And then auto-hiding popovers and shit?
[19:51:13] Synthead: epochwolf: I have a grid with ~13k rows built from a relational db (AR). Fetching all that data takes about ~20 seconds (yuck). So I put all 13k rows in a cache. Reading and writing this object as a Ruby object takes a moment to load and write. I could store all 13k rows invidivually, but looping takes almost twice as long
[19:51:39] Synthead: epochwolf: eventually, all that data gets stored as a JSON string in a secondary cache, and that's fast
[19:52:27] epochwolf: Synthead: I think that requires a specialized datastore... I'm not sure what the options are.
[19:52:50] epochwolf: Or you need to store it differently.
[19:52:55] Synthead: epochwolf: if a user modifies data, it doesn't really make sense to update all the unaffected rows and take ~20 seconds of server time, so I'm reading the large cached data, changing a row's worth of data, writing it, and expiring the JSON string cache
[19:53:04] smathy: Synthead, you're storing both the array object and the JSON in a cache?
[19:53:35] Synthead: epochwolf: that greatly increases the performance (gets it down to > 1 second), but I think I can do better
[19:54:15] Synthead: smathy: yes. Reading the cache with Ruby objects and rendering a JSON string takes about ~4-5 seconds on its own.
[19:54:23] smathy: Synthead, sounds like you're doing all the right things, maybe you just want to trigger the rebuild of that cache before it's needed?
[19:54:48] smathy: Synthead, yeah, assuming you're using the fastest JSON lib you can, it *will* take time.
[19:55:07] lacrymology: is there a very simple way for me to send an email from the console without having to set up any views? just something like send_email(foo@example.com, subject, body)
[19:55:10] nfk|laptop: has joined #RubyOnRails
[19:55:14] epochwolf: It is possible to just query the database direclty and completely bypass AR.
[19:55:17] bronson: has joined #RubyOnRails
[19:55:37] Synthead: smathy: yeah for sure. and it's a waste to generate JSON on the fly constantly, so I just store it. Rails says it takes >1ms to respond to a fully-cached request with that "string" cache
[19:55:40] epochwolf: Just read the results of the queries into an array of an array of strings.
[19:56:03] smathy: Synthead, I'd think about triggering the rebuild of those caches in a background job when a record in it is changed (rather than when you need the JSON).
[19:56:21] sameerynho: has joined #RubyOnRails
[19:56:35] Synthead: smathy: absolutely. that's on the burner :)
[19:56:46] alfie_max15: has left #RubyOnRails: ("Ex-Chat")
[19:56:50] smathy: Synthead, what epochwolf says too, is your data cache a simple array of hashes? Or is it still models?
[19:57:23] Synthead: smathy, epochwolf: it's a large nested hash, yeah
[19:57:36] twilling: has joined #RubyOnRails
[19:57:42] smathy: Synthead, ok, but they're not the models, you're only caching the attributes themselves?
[19:57:43] colleenmcguckin: has joined #RubyOnRails
[19:58:25] Synthead: smathy: yeah, that's right. It's already formatted as needed for the front-end stuff, just needs to be JSONified
[19:58:40] Synthead: smathy: I imagine that storing models themselves would be pretty slow, no?
[19:59:02] smathy: Synthead, storing not so bad, re-instantiating will be a killer though.
[19:59:25] Synthead: smathy: oh, casting the cache back to models, you mean?
[19:59:59] jottr: has joined #RubyOnRails
[20:00:02] Synthead: smathy: in a Rails.cache.read way?
[20:00:02] smathy: Synthead, another thing to think about would be to split your hash and JSON into X caches, so you can rebuild less.
[20:00:09] lacuna: has joined #RubyOnRails
[20:00:10] lacuna: has joined #RubyOnRails
[20:00:12] smathy: ...as long as you had a deterministic way of doing that.
[20:00:30] smathy: Synthead, yes.
[20:00:30] Synthead: smathy: yeah I thought of breaking it up into 500s based of primary keys
[20:00:46] roshanavand: has joined #RubyOnRails
[20:00:54] smathy: Synthead, right, very easy if it's a hash with pkeys as the keys.
[20:01:03] Synthead: smathy: seems like storing everything in a key is a little slow and looping individual entries is also pretty slow, too
[20:01:43] Synthead: smathy: maybe I should implement that before making other changes
[20:01:46] smathy: Synthead, I'd break it up so you always know which chunk to rebuild, like using `pkey % n` or something.
[20:02:20] Synthead: smathy: yeah, that's what I'm thinking too. I kinda came up with this (non-unique) idea on my own, so I'm really glad to hear you suggesting it
[20:02:31] srinidhi: has joined #RubyOnRails
[20:03:14] smathy: That n could be pretty arbitrary really, I mean if you do it right then joining all those parts to make the final chunk will never be very expensive.
[20:04:55] Synthead: smathy: I also thought of something that might work, too. I could keep an ID (maybe something based off a datetime with an incrementer appended) in the rails server memory and in cache. I'd also keep the cache's contents in cache. When updating the cache, check that ID to see if new cache was written. If not, just modify the cache in memory and write it to the cache, then update that ID on both the server and the cache.
[20:05:54] Synthead: smathy: if the IDs don't match, it was probably updated by another thread (maybe not even on the same box), so read the cache, store it on the server's memory, and then update the cache as usual
[20:05:58] smathy: Heh, you're rewriting CouchDB now ;)
[20:06:15] Synthead: smathy: oh shit, you're right
[20:06:30] Cervajz__: has joined #RubyOnRails
[20:06:43] smathy: ...but yeah, that's not a terrible idea - to have sort of revision id.
[20:07:00] Synthead: smathy: huh. how does couchdb compare to memcached in terms of caching performance?
[20:07:04] smathy: ...although I'd still work on pushing that out into a queue.
[20:07:22] Synthead: smathy: oh for sure. this logic could be built into the queue as well.
[20:08:08] baweaver: has joined #RubyOnRails
[20:08:20] smathy: Synthead, well, Couchbase (as opposed to CouchDB itself) is memcached with a CouchDB backend for persistence :()
[20:08:22] nocd: has joined #RubyOnRails
[20:08:28] smathy: ...err meant to be a normal :)
[20:08:51] smathy: ...and of course, that's all JSON.
[20:09:03] Synthead: yeah, which really is what I want I think
[20:09:11] williamcage: has joined #RubyOnRails
[20:09:15] smathy: That might be a great fit.
[20:09:26] Synthead: making me really think about this, haha
[20:09:27] smathy: It doesn't help you with the data/hash cache.
[20:09:40] tuelz: has joined #RubyOnRails
[20:09:41] smathy: ...but maybe you don't really need that at all.
[20:09:58] Synthead: yeah, if couch does it and handles the cache by itself, then no biggie
[20:10:25] smathy: Just have a DB trigger in your RDBMS to push the new content out into your CouchDB, then your read code just queries memcached which auto-refreshes when the underlying CouchDB data changes.
[20:10:43] smathy: ...DB trigger and/or job queue.
[20:11:04] Synthead: smathy: ah, I see. so keep the "string" cache still, but let couch handle all the updates and what not
[20:11:05] smathy: That actually is a really elegant solution.
[20:11:10] atumzin: has joined #RubyOnRails
[20:12:56] Synthead: smathy: yeah, I think I really like that. damn, good show! thanks!
[20:13:32] smathy: Synthead, you're welcome. Btw, I don't think you'd maintain the string cache, that's what will basically be stored for you in memcached, in JSON format.
[20:13:58] Synthead: smathy: in memcached via couch? or rails?
[20:14:05] smathy: Synthead, you'll just make your CouchDB view request, and Couchbase will return the big JSON chunk either from RAM or from the DB if anything has changed.
[20:14:07] cornerma1: has joined #RubyOnRails
[20:14:34] lemur: has joined #RubyOnRails
[20:14:37] nettoweb: has joined #RubyOnRails
[20:14:39] Synthead: smathy: oh I see, leveraging couch internals
[20:14:53] smathy: Yeah, and Couchbase internals.
[20:15:28] Synthead: well that's awesome
[20:15:33] Synthead: I'm going to be reading some docs now :)
[20:15:43] smathy: Yeah, it's great tech.
[20:15:52] Ergo: has joined #RubyOnRails
[20:16:21] pipework: pouchdb-server is cool too, but not exactly comparable.
[20:16:24] pipework: But pouchdb is awesome!
[20:17:17] Synthead: pipework: whaaaaat... local offline storage and syncing?
[20:17:37] smathy: Yeah, it's very neat.
[20:17:42] williamcage: has joined #RubyOnRails
[20:17:49] nettoweb: has joined #RubyOnRails
[20:17:53] smathy: There are also mobile CouchDB clients.
[20:18:01] smathy: *clients/servers
[20:18:05] smathy: Clients in the replication sense.
[20:18:20] PlasmaStar: has joined #RubyOnRails
[20:18:30] smathy: That was our whole architecture at Amco for the mobile product.
[20:18:54] Synthead: that's really interesting, wow
[20:19:17] Synthead: you'd have to hand-roll a lot to cowboy that
[20:19:28] smathy: Nope, Couchbase-Lite.
[20:19:34] DavidDudson: has joined #RubyOnRails
[20:19:37] smathy: Ready to drop into your iOS or Android app.
[20:19:53] Synthead: well that's really awesome
[20:20:15] Synthead: this is also making me think: my web front-end deals exclusively with JSON
[20:20:25] Synthead: (as most apps, really)
[20:20:34] sucks: has joined #RubyOnRails
[20:20:43] smathy: Our iOS developers never had to work on any syncing or online/offline issues, they made an auth request when the user first signed in/up and we sent back a unique URL that was the replication URL, and from then on the Couchbase iOS lib handled all the replication and offline detection, and the app just used its local DB.
[20:20:55] Synthead: but I'm using about 50/50 code from JS libs and my own work that handles the relationships
[20:21:05] Synthead: maybe I could just go with a pure couchbase implentation
[20:21:10] smathy: We never got around to doing the same thing for our web app, but we did a few proofs of concept, and PouchDB really was super simple.
[20:21:25] Synthead: smathy: man that's great
[20:21:29] Synthead: what a time saver
[20:21:37] smathy: Yeah it was.
[20:21:51] Synthead: I love hearing about non-unique use-cases that are implemented elegantly in projects like those
[20:22:25] smathy: Then basically, occasionally the app would ping the API on foregrounding, and the API would occasionally send them a new URL - that was how we did content updates. Also how we handled licensing.
[20:22:37] smathy: If you didn't pay, you didn't get any new content.
[20:24:12] Synthead: I think I'm going to get some lunch and read some docs about this
[20:24:16] smathy: It was easily the best example in my career of well chosen architecture/tools saving development time.
[20:24:37] Synthead: epochwolf, smathy: thank you for all your help!
[20:24:57] DavidDudson: has joined #RubyOnRails
[20:25:10] jottr: has joined #RubyOnRails
[20:25:36] blackmesa: has joined #RubyOnRails
[20:26:54] steffkes: has joined #RubyOnRails
[20:28:06] goodcodeguy: has joined #RubyOnRails
[20:28:54] threeminutemonta: has joined #RubyOnRails
[20:30:30] Miron_: has joined #RubyOnRails
[20:32:17] twilling: has joined #RubyOnRails
[20:33:18] roshanavand: has joined #RubyOnRails
[20:34:06] yfeldblum: has joined #RubyOnRails
[20:36:49] robbie246: has joined #RubyOnRails
[20:39:22] n1lo: has joined #RubyOnRails
[20:40:32] guacamole: has joined #RubyOnRails
[20:41:05] chipotle: has joined #RubyOnRails
[20:41:05] williamcage: has joined #RubyOnRails
[20:42:35] ur5us: has joined #RubyOnRails
[20:43:38] Spami: has joined #RubyOnRails
[20:43:48] twilling: has joined #RubyOnRails
[20:45:37] nyaa: has joined #RubyOnRails
[20:46:54] chouhoul_: has joined #RubyOnRails
[20:49:47] n008f4g_: has joined #RubyOnRails
[20:50:11] alex88: has joined #RubyOnRails
[20:51:14] zpe: has joined #RubyOnRails
[20:51:34] teclator: has joined #RubyOnRails
[20:52:14] djbkd: has joined #RubyOnRails
[20:52:16] juddey: has joined #RubyOnRails
[20:54:46] renegadeandy: has joined #RubyOnRails
[20:57:01] jessemcgilallen: has joined #RubyOnRails
[20:57:14] bigbob: has joined #RubyOnRails
[20:59:08] lapide_viridi: has joined #RubyOnRails
[21:00:22] rakm: has joined #RubyOnRails
[21:03:11] Darkman738: has joined #RubyOnRails
[21:04:54] benlieb: has joined #RubyOnRails
[21:05:04] shibabu: has joined #RubyOnRails
[21:08:29] corioliss: has joined #RubyOnRails
[21:09:33] guacamole: has joined #RubyOnRails
[21:10:09] atomical: has joined #RubyOnRails
[21:10:48] idefine: has joined #RubyOnRails
[21:11:00] bronson: has joined #RubyOnRails
[21:11:48] tuelz: has joined #RubyOnRails
[21:11:56] lacuna: has joined #RubyOnRails
[21:11:57] lacuna: has joined #RubyOnRails
[21:14:47] StaticVoid: has joined #RubyOnRails
[21:15:55] guacamole: has joined #RubyOnRails
[21:16:58] NBarnes: has joined #RubyOnRails
[21:17:47] nettoweb: has joined #RubyOnRails
[21:17:51] lacuna: has joined #RubyOnRails
[21:17:52] lacuna: has joined #RubyOnRails
[21:19:13] tuelz: has joined #RubyOnRails
[21:19:39] snowy: has joined #RubyOnRails
[21:19:57] atomical_: has joined #RubyOnRails
[21:20:02] chipotle: has joined #RubyOnRails
[21:21:06] idefine: has joined #RubyOnRails
[21:25:02] nettoweb: has joined #RubyOnRails
[21:26:53] lacuna: has joined #RubyOnRails
[21:26:53] lacuna: has joined #RubyOnRails
[21:27:03] Oliphaunte: has joined #RubyOnRails
[21:28:16] syzygy_: has joined #RubyOnRails
[21:29:06] roshanavand: has joined #RubyOnRails
[21:29:55] Oliphaunte: has joined #RubyOnRails
[21:32:46] roshanavand: has joined #RubyOnRails
[21:35:24] smathy: has joined #RubyOnRails
[21:37:39] claytonzaugg: has joined #RubyOnRails
[21:38:07] guacamole: has joined #RubyOnRails
[21:38:12] neanderslob: has joined #RubyOnRails
[21:40:18] yopp: has joined #RubyOnRails
[21:40:25] lacuna: has joined #RubyOnRails
[21:40:26] lacuna: has joined #RubyOnRails
[21:40:45] yopp: stupid question: why Content-Length is not present in the rails html responses?
[21:40:54] yopp: Neither Content-Encoding: chunked
[21:41:06] matthewd: http://weblog.rubyonrails.org/2015/12/18/Rails-5-0-beta1/ ????
[21:41:40] idefine: has joined #RubyOnRails
[21:44:19] matthewd: yopp: I think I would expect one of those to be there
[21:44:39] yopp: matthewd, me too
[21:45:30] FailBit: keepalive?
[21:45:31] yopp: Who is responsible of CL header? rails stack or rack server?
[21:46:11] matthewd: rails, surely
[21:46:17] matthewd: Otherwise we wouldn't pass rack lint
[21:47:48] yopp: FailBit, afaik curl got keepalive by default now
[21:47:52] lacrymology: any way from a before_filter to know which method is being called?
[21:48:08] FailBit: params[:action], lacrymology
[21:48:25] lacrymology: FailBit: thanks
[21:48:39] yopp: matthewd, then where should I start digging?
[21:49:06] yopp: lack of length or chunked prevents gzip compression with haproxy :|
[21:49:08] matthewd: yopp: What sort of response is it? Coming from a view?
[21:49:26] yopp: matthewd, yeah, from the view.
[21:49:30] FailBit: day 3 of moving to minitest from rspec
[21:49:33] FailBit: haven't looked back
[21:51:46] yopp: matthewd, but it works for the content from the /public/
[21:52:04] yopp: for example /500.html is served with content-length
[21:52:35] yopp: anyway, it might be a torquebox thing, let me check with different server
[21:53:33] atomical: has joined #RubyOnRails
[21:54:50] idefine: has joined #RubyOnRails
[21:55:07] idefine: has joined #RubyOnRails
[21:58:45] yopp: matthewd, oh. yeah, that seems like torquebox issue
[21:59:36] The_Phoenix: has joined #RubyOnRails
[22:01:31] goodcodeguy: has joined #RubyOnRails
[22:02:03] Maletor: has joined #RubyOnRails
[22:02:16] idefine: has joined #RubyOnRails
[22:02:29] Maletor: How do I run `where` on a self joined table?
[22:03:01] ur5us: has joined #RubyOnRails
[22:03:02] Oliphaunte: has joined #RubyOnRails
[22:03:12] pawnbox: has joined #RubyOnRails
[22:03:20] goodcodeguy: has joined #RubyOnRails
[22:03:29] guacamole: has joined #RubyOnRails
[22:05:43] baweaver: has joined #RubyOnRails
[22:05:59] goodcodeguy: has joined #RubyOnRails
[22:06:30] The_Phoenix: has joined #RubyOnRails
[22:07:08] benlieb: has joined #RubyOnRails
[22:08:44] Oliphaunte: has joined #RubyOnRails
[22:11:40] jbrhbr: has joined #RubyOnRails
[22:12:33] Synthead: maletor: what do you mean by self-joined?
[22:12:38] lacuna: has joined #RubyOnRails
[22:12:38] lacuna: has joined #RubyOnRails
[22:13:33] Maletor: Synthead: I mean like this https://gist.github.com/maletor/faeddf1f05df373c50f7
[22:13:51] jbrhbr1: has joined #RubyOnRails
[22:14:46] Synthead: maletor: it looks like you're doing it right
[22:14:49] Synthead: maletor: what's the error?
[22:14:53] Maletor: well it's not right
[22:14:59] Maletor: links isn't a table
[22:15:14] Synthead: maletor: what is the table you're trying to join to?
[22:15:48] Maletor: Synthead edited gist with desired query i'm trying to model
[22:16:11] Synthead: maletor: oooh, I see, you're joining the table to itself
[22:16:25] Maletor: c2 is the rub. i can't get at c2 with rails. you can see it's aliased. but how dependable is that alias name?
[22:16:45] Synthead: maletor: you know, that's a great question that I am wondering about as well
[22:17:01] Synthead: maletor: I haven't hit a road block with that yet, either
[22:17:14] Synthead: maletor: perhaps you can do a .joins() and specify an alias?
[22:17:32] Maletor: even still i need to get in where
[22:17:39] Synthead: maletor: for sure
[22:17:41] Maletor: a string joins
[22:17:45] Maletor: those are meh
[22:17:48] hardtail: has joined #RubyOnRails
[22:18:13] Synthead: maletor: oh no, I mean something like .joins("some_table", :alias_name). I'm looking up the documentation; that won't work
[22:18:20] Synthead: but just as principle
[22:18:41] Maletor: i don't think the API for joins takes alias name as you suggest
[22:19:06] Synthead: maletor: it doesn't (as I mentioned)
[22:19:46] williamcage: has joined #RubyOnRails
[22:20:19] Maletor: i suppose the alias name is dependable enough
[22:20:39] Synthead: maletor: I personally question it myself
[22:20:52] Maletor: if we're already writing wheres with table names then there is a certain degree of assumptions already there
[22:21:06] Synthead: maletor: oh yeah, but those table names are in your db as tables
[22:21:20] Synthead: maletor: they're explicit where aliases aren't, especially auto-generated ones
[22:21:55] Maletor: what the hell is rails doing aliasing tables anyways?
[22:22:14] Maletor: it doesn't need them -- they should be for humans
[22:22:46] paradisaeidae: has joined #RubyOnRails
[22:23:18] Synthead: maletor: I don't like writing in raw sql, but this should work: http://stackoverflow.com/a/20739176
[22:23:56] williamcage: has joined #RubyOnRails
[22:24:00] Synthead: maletor: I don't think it does when you do simple queries
[22:24:11] OmegaA: has joined #RubyOnRails
[22:24:16] Synthead: maletor: there isn't a way to join a table to itself without an alias, though
[22:24:36] Synthead: maletor: you're always ambiguous when selecting columns
[22:24:45] Maletor: another truth
[22:24:55] Synthead: 1 == 1, bro
[22:25:35] Synthead: oh yeah, speaking of unnecessary stuff, I think it's kinda goofy when you do a blank where
[22:25:42] Synthead: it does where 1 = 1
[22:25:46] fez: has joined #RubyOnRails
[22:27:25] Synthead: hm, can't reproduce it atm but I've seen it
[22:27:31] Synthead: probably wrong about the blank where bit then ;)
[22:31:59] shanemcd: has joined #RubyOnRails
[22:32:04] Maletor: Synthead: i could probably rewrite as subquery
[22:32:25] Maletor: and that would obviate the weird double where
[22:32:38] Synthead: maletor: careful with those. most dbs start to get very, very, very slow when a lot of subqueries are used
[22:33:05] Synthead: I've reduced queries that would hang for about 6 hours to less than a second by removing subqueries alone
[22:34:04] Maletor: Synthead: eh. percona does it in exactly the same time
[22:34:25] djbkd: has joined #RubyOnRails
[22:34:38] rhizome: has joined #RubyOnRails
[22:34:52] Synthead: maletor: right on, just keep an eye out
[22:35:01] Maletor: check out the edited gist
[22:35:06] Maletor: you think that'll be harder to model in rails?
[22:35:38] matthewd: Synthead: I think there are still places we do a 1=1, but sometimes avoiding it is just not worth the effort
[22:35:41] Maletor: i don't think AR can do it. ARel definitely can.
[22:36:26] Synthead: maletor: that's a weird one. I suppose you could gather IDs in rails and make a query off that, but that logic should stay in your db, imo
[22:36:53] Synthead: maletor: I have just avoided subqueries altogether so I've never done them in rails
[22:36:59] guacamole: has joined #RubyOnRails
[22:37:08] mostlybadfly: has joined #RubyOnRails
[22:37:33] matthewd: Synthead: Which RDBMS are you using, out of curiosity?
[22:37:45] Synthead: seems like there should be a feature request to specify alias names on joins
[22:37:53] matthewd: maletor: Sorry, trying to catch up.. which query are we trying to reproduce?
[22:37:55] jottr: has joined #RubyOnRails
[22:38:22] Maletor: matthewd: https://gist.github.com/maletor/faeddf1f05df373c50f7
[22:38:22] Synthead: matthewd: I've used mysql before oracle, percona, mariadb, but I've been interested in postgresql recently
[22:38:40] Synthead: matthewd: is this subquery issue not a thing anymore?
[22:38:56] Maletor: gistfile1 comes 99% of the way there but would depend on a generated alias
[22:38:59] Synthead: matthewd: https://gist.github.com/maletor/faeddf1f05df373c50f7#file-gistfile3-txt
[22:39:07] Synthead: oh sorry, heh
[22:39:32] matthewd: Synthead: I've only ever heard of subqueries being an issue in mysql, though I do know oracle has a reputation of sometimes needing hints in surprising-to-me places.
[22:40:01] yfeldblum: has joined #RubyOnRails
[22:40:11] matthewd: maletor: Oh, yeah. Depend on the generated alias.
[22:40:14] Synthead: matthewd: maletor originally wanted to do a .joins() on the same table but AR does mysterious things with aliases and (imo) it isn't very good to put these auto-generated names in your queries
[22:40:23] blackhuey: has joined #RubyOnRails
[22:40:24] Synthead: matthewd: is that ok?
[22:40:46] matthewd: Well, it has risks... but not from us
[22:40:46] Maletor: matthewd just curious where the confidence comes form
[22:40:53] Maletor: care to elaborate
[22:41:03] matthewd: The danger is some other join in the relation, which could cause the aliases to rearrange
[22:41:06] Maletor: who is "us"?
[22:41:06] Synthead: ACTION is curious too
[22:41:40] Maletor: matthewd: that's the thing
[22:41:40] matthewd: We're not going to change the way aliases are generated without lots of warning / deprecations... too many people depend on them.
[22:41:45] Maletor: i was gonna add another join on top of this
[22:41:48] Maletor: in another place
[22:41:55] Maletor: that alias should remain though right?
[22:41:58] Dude: has joined #RubyOnRails
[22:41:59] matthewd: To the same table?
[22:42:01] Maletor: a completely unrelated join
[22:42:11] matthewd: Yeah, then it'll be fine
[22:42:30] matthewd: Just if you manage to wrangle a particularly contrived example, with conflicting names, we'll obviously have to shift one, etc
[22:42:55] pawnbox: has joined #RubyOnRails
[22:43:07] Synthead: matthewd: oh sure, but it seems like there would be a backward-compatible way to be specific about an alias, you know?
[22:43:18] Maletor: i was probably gonna go that route. thanks for backing it up. much appreciated
[22:43:28] roshanavand: has joined #RubyOnRails
[22:43:53] matthewd: Synthead: It would be nice. Patches welcome ;)
[22:44:00] Synthead: matthewd: :)
[22:44:18] matthewd: From memory, there's a layering issue, trying to get the right information in the right place at the right time, to allow control/influence/querying of what the aliases will be.
[22:44:18] Synthead: matthewd: thanks a lot for confirming too; I was curious as well
[22:44:23] Maletor: Synthead: what does your API look like
[22:44:24] Oliphaunte: has joined #RubyOnRails
[22:44:38] Maletor: .joins.as(:relation, :alias). lol idk
[22:44:51] Synthead: maletor: oh I dunno, I haven't thought too deeply about it
[22:44:53] tvw: has joined #RubyOnRails
[22:45:44] ss_much: has joined #RubyOnRails
[22:45:49] RegulationD: has joined #RubyOnRails
[22:45:49] stannard: has joined #RubyOnRails
[22:46:02] lipoqil: has joined #RubyOnRails
[22:46:02] Synthead: maybe MyModelClass.joins(MyModelClass.alias(:model_class_1), MyModelClass.alias(:model_class_2)) ?
[22:46:05] Synthead: kinda cloogy
[22:46:59] Synthead: maletor: that .as thing is kinda neat
[22:47:14] Synthead: maletor: might make nested joins really weird
[22:47:32] Maletor: Synthead: maybe put together a rails issue that could circle up what we just discussed if you have a moment
[22:47:38] Synthead: I'm just being a speculation fire hose though
[22:48:03] matthewd: Synthead: Note in AR, you don't join classes to each other.. you join to an association
[22:48:08] cassioscabral: has joined #RubyOnRails
[22:48:31] Synthead: matthewd: oh for sure
[22:48:42] upsell5: has joined #RubyOnRails
[22:50:12] Maletor: so to complete this mental acrobatics it would be nice to have a assoc on User that ties into my Friendship class and pulls the mutual colleagues
[22:51:54] sandstrom: has joined #RubyOnRails
[22:52:42] Dude: has left #RubyOnRails: ()
[22:53:43] matthewd: How mutual?
[22:53:53] matthewd: Something more than user.friends.where(id: other_user.friends) ?
[22:54:14] Maletor: only that mutual, 1st degree
[22:54:31] Maletor: damnit, why didn't i think of that subquery
[22:54:58] ewnd9_: has joined #RubyOnRails
[22:57:01] gambl0re: has joined #RubyOnRails
[22:57:42] lacuna: has joined #RubyOnRails
[22:57:43] lacuna: has joined #RubyOnRails
[22:57:57] Maletor: matthewd i think it's more like user.friends.where({ friendships: { friend_id: other.friends.select(:id) } })
[22:58:03] idefine: has joined #RubyOnRails
[22:58:07] dfwqdfui2342: has joined #RubyOnRails
[23:01:01] bigbob: has joined #RubyOnRails
[23:01:20] lictor36: has joined #RubyOnRails
[23:02:28] matthewd: No need for the select
[23:03:42] Maletor: i gotta say, subqueries are a lot more logical. i think i prefer them. hopefully databases can just figure it out so we can write our code logically without having to write our code around what works fastest in a matter of speaking
[23:03:59] ornerymoose: has joined #RubyOnRails
[23:04:01] paradisaeidae: has joined #RubyOnRails
[23:04:34] sonofdirt: has joined #RubyOnRails
[23:05:46] erichu: has joined #RubyOnRails
[23:07:29] shibabu: has joined #RubyOnRails
[23:10:33] nyaa: has joined #RubyOnRails
[23:10:34] dfwqdfui2342: has left #RubyOnRails: ()
[23:13:00] IrishGringo: has joined #RubyOnRails
[23:17:15] alex88: has joined #RubyOnRails
[23:19:54] NBarnes: has joined #RubyOnRails
[23:21:17] yashinbasement: has joined #RubyOnRails
[23:21:37] jnylen: has joined #RubyOnRails
[23:21:46] brupm: has joined #RubyOnRails
[23:22:39] pawnbox: has joined #RubyOnRails
[23:23:04] rgtk: has joined #RubyOnRails
[23:23:08] ur5us: has joined #RubyOnRails
[23:23:19] devFrederick: has joined #RubyOnRails
[23:27:36] bronson: has joined #RubyOnRails
[23:29:39] ferr: has joined #RubyOnRails
[23:32:07] paradisaeidae: has joined #RubyOnRails
[23:35:23] stannard: has joined #RubyOnRails
[23:39:31] bronson: has joined #RubyOnRails
[23:39:52] taxen: has joined #RubyOnRails
[23:40:40] bronson: has joined #RubyOnRails
[23:42:03] taxen: Hey. I'm trying to use strong parameters for a create method with email and password, but keep getting a "password cant be blank" error. Even though I have permitted it. What could be the cause?
[23:42:38] taxen: When debugging it, I see the password in params[:password]
[23:42:42] Papierkorb: taxen: please gist your controller method and the model
[23:42:56] taxen: Papierkorb: sure, 1 sec
[23:44:08] taxen: Papierkorb: https://gist.github.com/anonymous/a9c1966f2eeccd9d3e1d
[23:45:10] taxen: I'm using Sorcery with this btw
[23:45:59] alex88: has joined #RubyOnRails
[23:47:07] colleenmcguckin: has joined #RubyOnRails
[23:47:15] williamcage: has joined #RubyOnRails
[23:48:09] idefine: has joined #RubyOnRails
[23:48:45] taxen: Papierkorb: here's a combined gist with the model
[23:48:45] taxen: https://gist.github.com/anonymous/c890b7c8de239607a634
[23:49:48] Papierkorb: taxen: Never used scocery, no idea if it does something 'special'
[23:50:27] colleenmcguckin: has joined #RubyOnRails
[23:50:56] taxen: Papierkorb: fair enough. assuming it doesnt affect that part of the app, do you see anything else that could be the problem?
[23:51:10] colleenmcguckin: has joined #RubyOnRails
[23:51:20] Papierkorb: taxen: looks fine to me.
[23:51:26] Papierkorb: (Could be wrong of course)
[23:53:29] stannard: has joined #RubyOnRails
[23:56:20] taxen: Papierkorb: hmm, I just noticed something strange in the debug
[23:56:24] taxen: Here's the hash:
[23:56:25] taxen: {"email"=>"max3@max.com", "password"=>"maxmaxmax", "format"=>"json", "controller"=>"api/v1/users", "action"=>"create", "user"=>{"email"=>"max3@max.com"}}
[23:56:49] taxen: password is not within the user's hash
[23:57:18] taxen: I'm testing this through a simple curl
[23:57:24] taxen: passing the data like this: -d '{"email":"max3@max.com", "password":"maxmaxmax"}'
[23:58:50] dkam: has joined #RubyOnRails
[23:59:13] taxen: Papierkorb: any ideas how that could be?
[23:59:27] Papierkorb: taxen: not without the view code