« Back to channel list

#RubyOnRails - 16 March 2017

« Back 1 day Forward 1 day »
[00:19:31] superlou: has joined #RubyOnRails
[00:31:35] arBmind: has joined #RubyOnRails
[00:34:02] aperkins81: has joined #RubyOnRails
[00:34:27] roamingdog: has joined #RubyOnRails
[00:34:39] Scriptonaut: has joined #RubyOnRails
[00:35:27] Scriptonaut: Hey y'all, I've been unable to run rake db:schema:load. I can't tell if it's related to elasticsearc or what, but I can't find anything on line after a couple hours of googling. Here's my output: http://sprunge.us/QdKV
[00:35:44] Scriptonaut: the error is: NoMethodError: undefined method `retry_on_failure=' for #<Faraday::ConnectionOptions:0x005645763772d0>
[00:35:47] Scriptonaut: full stacktrace in that sprunge
[00:37:02] Scriptonaut: I'm able to curl my elasticsearch server just fine: curl -X GET http://localhost:9200/
[00:37:53] xaviergmail_: has joined #RubyOnRails
[00:38:16] aperkins81: we're using memcached, is it possible to also mixin normal rails caching? something like specifying cache_store: :memory_store in a cache block
[00:41:24] d0nn1e: has joined #RubyOnRails
[00:41:26] aperkins81: (so we dont exceed our memcache limit)
[00:42:50] nOwz: has joined #RubyOnRails
[00:43:26] brent__: has joined #RubyOnRails
[00:43:52] joshsmith: has joined #RubyOnRails
[00:44:16] davedo321: has joined #RubyOnRails
[00:45:43] pawnbox: has joined #RubyOnRails
[00:53:33] l4v2: has joined #RubyOnRails
[00:56:05] cpruitt: has joined #RubyOnRails
[00:57:02] nettoweb: has joined #RubyOnRails
[00:57:46] Rodya_: has joined #RubyOnRails
[01:02:16] kruppm: has joined #RubyOnRails
[01:03:17] cschneid_: has joined #RubyOnRails
[01:04:14] kruppm: what i18n libraries do you guys use for JS? trying to find one that fits nicely with rails i18n - especially proper pluralization is important to me as i'll have to support languages like russian, polish and arabic with more than one plural form...
[01:04:47] duderonomy: has joined #RubyOnRails
[01:06:19] djbkd: has joined #RubyOnRails
[01:07:26] kruppm: any experience with i18n-js by fnando or i18next? both look kind of ok to me.
[01:15:28] pawnbox: has joined #RubyOnRails
[01:15:58] ahrs_: has joined #RubyOnRails
[01:25:52] _3dwardsharp: Scriptonaut how are you calling Faraday::Connection.new?
[01:26:21] fourcolors: has joined #RubyOnRails
[01:26:27] Technodrome: has joined #RubyOnRails
[01:26:51] fourcolors: has joined #RubyOnRails
[01:29:21] creature: has joined #RubyOnRails
[01:29:21] creature: has joined #RubyOnRails
[01:31:36] hotpancakes: has joined #RubyOnRails
[01:31:41] hotpanca_: has joined #RubyOnRails
[01:35:37] pawnbox: has joined #RubyOnRails
[01:41:01] AndroUser2: has joined #RubyOnRails
[01:49:20] eclecticjohny: has joined #RubyOnRails
[01:58:27] eclecticjohny: has joined #RubyOnRails
[02:01:38] xaviergmail_: Hey, if I wanted to use a concern to define an enum on two models but one model has a column named 'size' and the other is 'box_size' for example
[02:01:52] pickle_: has joined #RubyOnRails
[02:04:12] ahrs: has joined #RubyOnRails
[02:04:24] eclecticjohny: has joined #RubyOnRails
[02:05:37] jhack_: has joined #RubyOnRails
[02:06:30] ocpysh: has joined #RubyOnRails
[02:07:18] patarr: has joined #RubyOnRails
[02:08:25] eclecticjohny: has joined #RubyOnRails
[02:10:55] nya: has joined #RubyOnRails
[02:11:39] nyaa: has joined #RubyOnRails
[02:18:41] nahtnam: has joined #RubyOnRails
[02:19:23] r3vDev: has joined #RubyOnRails
[02:25:13] xaviergmail_: has joined #RubyOnRails
[02:26:23] eclecticjohny: has joined #RubyOnRails
[02:28:07] Emily: has joined #RubyOnRails
[02:39:47] pickle__: has joined #RubyOnRails
[02:42:55] DoctorMonocular: has joined #RubyOnRails
[02:43:24] nOwz: has joined #RubyOnRails
[02:43:31] ocpysh: has joined #RubyOnRails
[02:43:51] _3dwardsharp: has joined #RubyOnRails
[02:44:25] jenrzzz: has joined #RubyOnRails
[02:45:32] pickle_: has joined #RubyOnRails
[02:46:30] tomasm-: has joined #RubyOnRails
[02:51:20] hotpancakes: has joined #RubyOnRails
[02:55:46] roflmyeggo: has joined #RubyOnRails
[02:56:21] irishfromua: has joined #RubyOnRails
[02:58:31] joelsmith: has joined #RubyOnRails
[02:59:37] eclecticjohny: has joined #RubyOnRails
[03:04:23] ahrs: has joined #RubyOnRails
[03:04:50] libastral: has joined #RubyOnRails
[03:05:55] Scriptonaut: _3dwardsharp: I'm not calling it at all
[03:06:07] Scriptonaut: it's being called by elasticsearch I think
[03:06:49] _3dwardsharp: oh, well double check your config and initializers
[03:07:01] pickle_: has left #RubyOnRails: ()
[03:07:06] Scriptonaut: when I run rake db:schema:load, I get a Faraday::ConnectionOptions error: http://sprunge.us/QdKV
[03:07:41] _3dwardsharp: yea, i saw that...
[03:08:49] nya: has joined #RubyOnRails
[03:09:10] Scriptonaut: _3dwardsharp: the error happens on line 16 of my elasticsearch initializer (a ways up the stacktrace) https://gist.github.com/3c259a9388b13296e83d98082f5e4e5d
[03:11:09] _3dwardsharp: Scriptonaut something is probably wrong with your config variables, can you get a connection to work with the console?
[03:11:54] Scriptonaut: _3dwardsharp: the thing is, it's only happening on this one machine, I've been using that config for over a year on about 3 other machines personally, and my team (over 10 devs), have been using it as well with no issue
[03:12:31] Scriptonaut: from what I can tell, it's some weird system issue, like maybe one of my gems is the wrong version, or I don't have a library I need, I'm not sure
[03:14:40] pawnbox: has joined #RubyOnRails
[03:17:11] ajsharma: has joined #RubyOnRails
[03:17:39] eclecticjohny: has joined #RubyOnRails
[03:27:41] Rodya__: has joined #RubyOnRails
[03:31:23] ocpysh: has joined #RubyOnRails
[03:31:40] ocpysh: how could I install ruby on freebsd without bash?
[03:43:27] timdotrb: has joined #RubyOnRails
[03:44:19] pawnbox: has joined #RubyOnRails
[03:45:22] baweaver: To find out which one you're in: echo $0
[03:45:39] baweaver: but FreeBSD defaults to Bash so this should be a non-issue.
[03:47:42] Scriptonaut: I thought freeBSD defaults to tcsh?
[03:47:47] Scriptonaut: or was it mksh
[03:48:12] Scriptonaut: ah he left, nvm
[03:51:28] irishfromua: has joined #RubyOnRails
[03:54:53] timdotrb: has joined #RubyOnRails
[03:55:07] gambl0re: has joined #RubyOnRails
[03:56:57] pawnbox: has joined #RubyOnRails
[03:58:21] pulkit4tech: has joined #RubyOnRails
[04:00:12] nya: has joined #RubyOnRails
[04:00:31] Rodya_: has joined #RubyOnRails
[04:00:33] cschneid_: has joined #RubyOnRails
[04:04:27] ocpysh: has joined #RubyOnRails
[04:08:06] patarr: has joined #RubyOnRails
[04:10:06] ocpysh: baweaver : huh, freebsd doesn't default to bash
[04:11:03] baweaver: OpenBSD goes to KSH, could have sworn that FreeBSD went with Bash.
[04:11:32] baweaver: odd choice. Anyways....
[04:11:59] baweaver: why are you doing this all in root?
[04:12:10] baweaver: tcsh is root default, sh is user.
[04:19:35] gusrub: has joined #RubyOnRails
[04:20:34] roflmyeggo: has joined #RubyOnRails
[04:20:59] pawnbox: has joined #RubyOnRails
[04:21:56] rogue_koder: has joined #RubyOnRails
[04:22:47] artto: has joined #RubyOnRails
[04:23:43] ocpysh: baweaver : odd choice? bash is absolute crap
[04:24:09] ocpysh: I didn't say I'm doing it in tcsh
[04:24:40] ocpysh: using bash now anyhow, could not figure it out
[04:27:51] pawnbox: has joined #RubyOnRails
[04:29:53] pawnbox: has joined #RubyOnRails
[04:30:38] pickle_: has joined #RubyOnRails
[04:31:08] djbkd: has joined #RubyOnRails
[04:34:45] r3vDev: has joined #RubyOnRails
[04:37:02] AndroUser2: has joined #RubyOnRails
[04:43:04] Duckily: has joined #RubyOnRails
[04:44:44] pawnbox: has joined #RubyOnRails
[04:46:17] zero1one0: has joined #RubyOnRails
[04:47:04] siaw23: has joined #RubyOnRails
[04:47:31] siaw23: hi, need some guidance. trying to run a migration. but I don’t know why it’s failing with this: https://gist.github.com/siaw23/80ee957fe9642bf410eb71fa87339ef1#file-migrate-txt-L8
[04:48:54] siaw23: why is trying to find an Event with an ‘id’? and looking for an id that’s a path some rails file?
[04:49:48] itsgokul: has joined #RubyOnRails
[04:50:04] Technodrome: has joined #RubyOnRails
[04:50:21] itsgokul: i have manually added a field to table now how will i do rake migrate
[04:52:42] siaw23: itsgokul: if i were you i’d create a new migration file with up/down methods and run that instead
[04:53:04] hahuang65: has joined #RubyOnRails
[04:53:15] alethea_: has joined #RubyOnRails
[04:53:23] itsgokul: what will i do now
[04:54:04] DukeDave: has joined #RubyOnRails
[04:54:11] siaw23: itsgokul: generate a migration file
[04:54:16] siaw23: and run it
[04:54:58] siaw23: itsgokul: http://stackoverflow.com/questions/4834809/adding-a-column-to-an-existing-table-in-a-rails-migration
[04:55:25] hahuang65: has joined #RubyOnRails
[04:56:44] Suslov: has joined #RubyOnRails
[04:57:05] pawnbox: has joined #RubyOnRails
[05:00:19] r3vDev: has joined #RubyOnRails
[05:04:25] hahuang61: has joined #RubyOnRails
[05:06:48] hotpanca_: has joined #RubyOnRails
[05:09:14] pawnbox: has joined #RubyOnRails
[05:15:19] itsgokul: has joined #RubyOnRails
[05:18:22] devn: has joined #RubyOnRails
[05:18:58] devn: I could use some help. I want to run a background thread that does some work in my rails application, but I never want more than one of these to run at once.
[05:20:41] tercenya: has joined #RubyOnRails
[05:25:48] pickle_: has joined #RubyOnRails
[05:27:03] lightheaded: has joined #RubyOnRails
[05:27:38] lightheaded: has joined #RubyOnRails
[05:34:29] gusrub: has joined #RubyOnRails
[05:39:56] _3dwardsharp: has joined #RubyOnRails
[05:41:06] pawnbox: has joined #RubyOnRails
[05:43:08] pawnbox: has joined #RubyOnRails
[05:44:00] _3dwardsharp: um, is there a difference between modules in the lib/ dir vs. module (that are POROs) in the app/ dir? like i'm reading that classes/modules from the app/ dir are loaded once, but things from lib/ can get reloaded? i'm getting errors like: "A copy of MyModel has been removed from the module tree but is still active!"
[05:45:04] _3dwardsharp: well, MyModel just as example obj, it wouldn't actually be a rails model, fwiw...
[05:50:01] Rodya_: has joined #RubyOnRails
[05:51:13] lightheaded: has joined #RubyOnRails
[05:54:21] dminuoso: devn: How do you want to control whether it runs and what it has to do?
[05:55:50] dminuoso: devn: As for the generic interface to force such jobs down the throat you have ActiveJob. sidekiq can be an option but it requires at least a plugin to prevent concurent jobs (or if you dont use jobs otherwise you can just get away with having one worker thread)
[05:56:31] dminuoso: Other alternatives such as delayed_job exist which avoid redis, but redis is really such a small dependency that you can just run it along side of rails without an issue. delayed_job has a tendency to really spam the hell out of your activerecord logs.
[05:56:41] dminuoso: (At least in logging info or above)
[05:58:13] dminuoso: _3dwardsharp: The semantics depends on whether you have config.eager_load enabled.
[05:58:41] _3dwardsharp: dminuoso: ah, yes, i do have that to true in development.rb
[05:59:53] Scriptonaut: has left #RubyOnRails: ()
[06:01:30] dminuoso: _3dwardsharp: A look at your configuration config/environments/<yourEnv>.rb + config/application.rb would be useful.
[06:02:23] dminuoso: _3dwardsharp: The underlying issue is including a reloadable module in a non-reloadable model.
[06:03:32] hotpancakes: has joined #RubyOnRails
[06:03:54] dminuoso: _3dwardsharp: Also showing the related code would be helpful too.
[06:05:07] _3dwardsharp: yeah, i've been picking up on that loading a reloadable module in a non-reloadable context (e.g. a model class). so trying to figure out how i know if these POROs are one or the other
[06:05:12] _3dwardsharp: yeah, i got some ugly stuff in application.rb but here it is: https://gist.github.com/edwardsharp/90f0f089f87fea74614c74722ea3105d
[06:05:41] dminuoso: _3dwardsharp: be careful with the word "PORO" => almost all things in Ruby are just plain POROs with some const_missing methods defined on them.
[06:05:44] dminuoso: and method_missing
[06:05:48] dminuoso: In Rails I mean.
[06:06:00] dminuoso: _3dwardsharp: There's not too much of a difference between YourModel and YourFancyPoroClass
[06:06:02] _3dwardsharp: i've been pushing things around between app/*/, app/concerns/*/ and lib/*/
[06:07:19] _3dwardsharp: dminuoso right, good point about PORO, i just dealing with a bunch of files that don't really have the best place to live, and app/models/ doesn't seem like the place if it's not an AR-backed model class? i dunno, maybe i'm being stubborn?
[06:07:36] hotpancakes: has joined #RubyOnRails
[06:08:09] dminuoso: _3dwardsharp: Its too hard to argue how to fix your application without seeing the config files and the code.
[06:09:01] patarr: has joined #RubyOnRails
[06:10:41] _3dwardsharp: *nod* sorry if this is getting vague. i wish i could share code, but i fear nda implications :( however, can you elaborate more on this reloadable notion? like, how can i know if a class is reloadable or not?
[06:14:47] _3dwardsharp: ACTION reads https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies.rb
[06:16:10] hotpancakes: has joined #RubyOnRails
[06:18:11] lightheaded: has joined #RubyOnRails
[06:21:53] jeyraof^mbpr: has joined #RubyOnRails
[06:25:19] hotpancakes: has joined #RubyOnRails
[06:29:29] cschneid_: has joined #RubyOnRails
[06:31:36] r3vDev: has joined #RubyOnRails
[06:40:30] darutoko: has joined #RubyOnRails
[06:42:42] nya: has joined #RubyOnRails
[06:45:04] nOwz: has joined #RubyOnRails
[06:46:43] xaviergmail_: has joined #RubyOnRails
[06:47:09] juggler: has joined #RubyOnRails
[06:50:44] Rodya_: has joined #RubyOnRails
[06:54:47] lightheaded: has joined #RubyOnRails
[06:59:49] djbkd: has joined #RubyOnRails
[07:00:36] DrYockel1: has joined #RubyOnRails
[07:01:45] _djbkd: has joined #RubyOnRails
[07:10:22] pLaTo0n: has joined #RubyOnRails
[07:12:51] Cohedrin: has joined #RubyOnRails
[07:13:56] makufiru: has left #RubyOnRails: ()
[07:24:12] nOwz: has joined #RubyOnRails
[07:26:42] Andr3as: _3dwardsharp: does that help? http://vrybas.github.io/blog/2014/08/15/a-way-to-organize-poros-in-rails/
[07:27:40] Andr3as: he looks dangerous, so better believe him ;)
[07:28:03] hotpancakes: has joined #RubyOnRails
[07:29:53] Pumukel: has joined #RubyOnRails
[07:31:55] srinidhi: has joined #RubyOnRails
[07:34:44] pawnbox: has joined #RubyOnRails
[07:35:02] dionysus69: has joined #RubyOnRails
[07:37:40] nya: has joined #RubyOnRails
[07:43:44] conta: has joined #RubyOnRails
[07:45:11] kassav_: has joined #RubyOnRails
[07:52:08] _3dwardsharp: ah yes, nested classes. concerns would be my goto in that case...
[07:58:30] Rodya_: has joined #RubyOnRails
[08:01:21] aganov: has joined #RubyOnRails
[08:05:57] pawnbox: has joined #RubyOnRails
[08:07:39] unfo-: has joined #RubyOnRails
[08:09:50] unfo-: rails5. console. i do thing X => stack trace showing gems under .rvm; i manually edit one of the gems under .rvm to print out more debugging info; i tried reload! and quit; rails c again and it is still printing the old stacktrace (line numbers not matching with the file on disk any more)... where is rails caching the contents of that file since my changes to the apparent file on disk didn't affect
[08:09:56] unfo-: anything?
[08:09:59] patarr: has joined #RubyOnRails
[08:15:19] fcser_: has joined #RubyOnRails
[08:16:30] mark_66: has joined #RubyOnRails
[08:18:42] pawnbox: has joined #RubyOnRails
[08:18:44] hotpancakes: has joined #RubyOnRails
[08:19:33] antgel: has joined #RubyOnRails
[08:25:35] pLaTo0n: has joined #RubyOnRails
[08:26:47] Lann: has joined #RubyOnRails
[08:28:57] artto: has joined #RubyOnRails
[08:30:12] artto_: has joined #RubyOnRails
[08:32:23] xall: has joined #RubyOnRails
[08:34:45] artto: has joined #RubyOnRails
[08:37:11] srinidhi: has joined #RubyOnRails
[08:53:14] Technodrome: has joined #RubyOnRails
[08:53:28] lele: has joined #RubyOnRails
[08:59:22] Rodya_: has joined #RubyOnRails
[09:04:49] jsrn_: has joined #RubyOnRails
[09:06:49] dmnd: has joined #RubyOnRails
[09:07:25] pLaToOn: has joined #RubyOnRails
[09:07:43] Ergo: has joined #RubyOnRails
[09:07:50] patarr: has joined #RubyOnRails
[09:08:59] hotpancakes: has joined #RubyOnRails
[09:14:29] arup_r: has joined #RubyOnRails
[09:14:38] arup_r: I am using this lib http://ng-table.com/#/ . I am looking for a fixed header solution, do anybody have any reference to look into?
[09:14:58] tvw: has joined #RubyOnRails
[09:16:45] habitullence: has joined #RubyOnRails
[09:17:44] tbuehlmann: arup_r: shouldn't you ask this elsewhere?
[09:17:53] arup_r: sorry man
[09:18:04] arup_r: I thought I am in angular IRC
[09:18:06] arup_r: sorry again
[09:18:37] dionysus69: has joined #RubyOnRails
[09:20:08] jordansz: has joined #RubyOnRails
[09:26:59] xaviergmail_: has joined #RubyOnRails
[09:27:02] xall: has joined #RubyOnRails
[09:29:21] tvw: has joined #RubyOnRails
[09:34:24] tedwing: has joined #RubyOnRails
[09:34:50] jenrzzz: has joined #RubyOnRails
[09:34:50] jenrzzz: has joined #RubyOnRails
[09:35:08] artto: has joined #RubyOnRails
[09:37:00] iwada: has joined #RubyOnRails
[09:39:24] pawnbox: has joined #RubyOnRails
[09:41:29] sagarkinare007: has joined #RubyOnRails
[09:45:14] ferr1: has joined #RubyOnRails
[09:47:56] blackmes1: has joined #RubyOnRails
[09:50:04] cschneid_: has joined #RubyOnRails
[09:51:12] jordansz: hi everyone im trying to figure out a simple thing not working how to have - unless params[:controller].include?("deviser") with an array?
[09:51:18] unfo-: has left #RubyOnRails: ()
[09:51:26] jordansz: i would like to check multiple values against the params[:controller] anyone knows how to do this?
[09:52:54] ianfleeton: has joined #RubyOnRails
[09:54:20] tbuehlmann: jordansz: 42.in?([1, 2, 3]) or [1, 2, 3].include?(42)
[09:57:25] drale2k_: has joined #RubyOnRails
[09:59:09] lxsameer: has joined #RubyOnRails
[09:59:39] gloscombe: has joined #RubyOnRails
[09:59:49] kassav_: has joined #RubyOnRails
[10:00:02] Rodya_: has joined #RubyOnRails
[10:02:03] Qchmqs: has joined #RubyOnRails
[10:02:45] nettoweb: has joined #RubyOnRails
[10:02:58] arBmind: has joined #RubyOnRails
[10:03:00] harfangk: has joined #RubyOnRails
[10:05:38] drale2k_: has joined #RubyOnRails
[10:09:27] blackhuey: has joined #RubyOnRails
[10:09:57] dminuoso: My resource belongs_to many attachments. Is there some convention for nested attributes that lets me simply shove attachment_ids: [1,2,3] in, and have rails do *the right thing* (tm) ?
[10:10:34] blackhuey: has left #RubyOnRails: ()
[10:10:38] qchmqs_: has joined #RubyOnRails
[10:11:10] dminuoso: something like resource_attributes: { id: '2', _use: '1' } ?
[10:12:26] workmad3: has joined #RubyOnRails
[10:13:47] dminuoso: well and by belongs to many I mean has many. :S
[10:14:23] tbuehlmann: I'm confused. so Resource.has_many :attachments?
[10:15:51] Qchmqs: has joined #RubyOnRails
[10:16:36] dminuoso: tbuehlmann: Yeah.
[10:18:10] chagel: has joined #RubyOnRails
[10:18:38] kristofferR: has joined #RubyOnRails
[10:18:53] tbuehlmann: dminuoso: there's no _use, but the other way around, _destroy
[10:19:15] dminuoso: tbuehlmann: Mmm. It would be kind of awesome if there was also _use and _unuse :-)
[10:24:17] DrYockel: has joined #RubyOnRails
[10:25:48] zpe: has joined #RubyOnRails
[10:27:45] Technodrome: has joined #RubyOnRails
[10:27:47] dionysus69: has joined #RubyOnRails
[10:33:07] drale2k_: has joined #RubyOnRails
[10:33:31] srinidhi: has joined #RubyOnRails
[10:37:51] kruppm: any experience with `i18n-js` and/or `i18next` here, re-using rail's i18n files? especially with complex pluralization rules like russian or arabic
[10:39:37] pwnd_nsfw`: has joined #RubyOnRails
[10:41:51] marr: has joined #RubyOnRails
[10:42:49] dminuoso: kruppm: fox_mulder_cp might know :)
[10:43:38] dminuoso: kruppm: are you looking for something that integrates with rails at all?
[10:44:08] dminuoso: i18next would be my preference if I was to use i18n again
[10:44:35] Kilo`byte: hi there, i got a has_and_belongs_to relation between A and B. now i want to do something like A.where(b: includes(some_instance_of_b)). How would i do that.
[10:44:42] kruppm: dminuoso: would be nice if it did integrate without major issues, yes. most important to me is, that i do not have to maintain two translation tables, for rails and the js SPA frontend
[10:44:51] Kilo`byte: i assume that piece of code doesn't work
[10:46:36] DrYockel: has joined #RubyOnRails
[10:49:00] proboszcz: has joined #RubyOnRails
[10:50:28] dminuoso: kruppm: I thought about it too for a while but realized I dont want any localization on my rails side anyway.
[10:51:31] TvL2386: has joined #RubyOnRails
[10:54:13] lightheaded: has joined #RubyOnRails
[10:57:07] pwnd_nsfw: has joined #RubyOnRails
[10:57:22] kruppm: dminuoso: ye. but I really like the model translation, form generation, etc... rails provides. The frontend is written in vue and allows me to load rails-generated templates via XHR, which fits nicely with rails' form generators...
[10:57:35] chenzfroff: has joined #RubyOnRails
[10:57:52] kruppm: hard choice. that's why i'm asking for practical experiences here :)
[10:58:01] harfangk: does rails include warden middleware by default? if not, then does devise include warden middleware as dependency?
[10:58:26] ocpysh: has joined #RubyOnRails
[10:58:27] dminuoso: harfangk: No and yes.
[10:58:30] dminuoso: In that order. ;-)
[10:58:37] itsgokul: has joined #RubyOnRails
[10:59:07] artto: has joined #RubyOnRails
[10:59:36] dminuoso: kruppm: I decided that i18n requires a tremendous effort to do right so I told me users to "deal with it"
[10:59:53] dminuoso: kruppm: Im not surprised in the slightest that Slack for example still has no localization. :-)
[11:00:36] kruppm: dminuoso: i do not think my customer would be happy with that solution :D
[11:00:48] Rodya_: has joined #RubyOnRails
[11:00:53] kruppm: but ye, i18n is a PITA for larger applications
[11:01:05] jordansz: has joined #RubyOnRails
[11:01:58] dminuoso: kruppm: In particular things such as model translations I think are illplaced in i18n.
[11:03:21] kruppm: dminuoso: why would that be? you'd throw out the whole form-generation rails provides if you ditch the model translation
[11:05:12] _3dwardsharp: dminuoso collection_singular_ids?
[11:05:25] jordansz: has joined #RubyOnRails
[11:05:54] _3dwardsharp: collection_singular_ids=, rather.
[11:09:37] gregf_: has joined #RubyOnRails
[11:17:51] artto: has joined #RubyOnRails
[11:19:33] lightheaded: has joined #RubyOnRails
[11:20:26] hotpancakes: has joined #RubyOnRails
[11:21:13] echosystm: has joined #RubyOnRails
[11:21:22] echosystm: when installing rbenv and a rails app, wheres best to put it all?
[11:21:47] echosystm: i figure somewhere in /srv/ is suitable for the rails code
[11:21:53] echosystm: but what about rbenv?
[11:23:48] kristofferR: has joined #RubyOnRails
[11:25:52] Kilo`byte: echosystm: generally speaking, services have their home directories in /var/lib
[11:26:22] Kilo`byte: so for example /var/lib/myapp
[11:26:45] echosystm: ok what about rbenv?
[11:28:21] jordansz: hello everyone is there a way to cound the number of items on this : https://gist.github.com/jordanlance/2cf37b38066980ed55a7da8db9e83706
[11:28:59] jordansz: i want to count the number of tabs, they are only specified in the view, what would be a way to do this without hardcoding the numher of tabs in controller?
[11:30:19] lightheaded: has joined #RubyOnRails
[11:31:38] drale2k_: has joined #RubyOnRails
[11:31:50] Kilo`byte: echosystm: i haven't used it, but i assume it goes into ~/.rbenv
[11:31:59] Kilo`byte: so that'd be /var/lib/myapp/rbenv
[11:33:04] artto: has joined #RubyOnRails
[11:37:58] bga57: has joined #RubyOnRails
[11:38:42] artto: has joined #RubyOnRails
[11:39:12] Qchmqs: has joined #RubyOnRails
[11:42:13] loechel: has joined #RubyOnRails
[11:43:13] tdy: has joined #RubyOnRails
[11:45:03] lightheaded: has joined #RubyOnRails
[11:47:46] echosystm: Kilo`byte: i'm so confused
[11:48:14] echosystm: then rbenv would be inside my rails project folder?
[11:48:51] artto: has joined #RubyOnRails
[11:50:18] conta: has joined #RubyOnRails
[11:51:14] Pumukel: has joined #RubyOnRails
[11:51:54] adlerdias__: has joined #RubyOnRails
[11:59:18] artto: has joined #RubyOnRails
[12:01:04] kristofferR: has joined #RubyOnRails
[12:01:38] Rodya_: has joined #RubyOnRails
[12:03:37] kristofferR: has joined #RubyOnRails
[12:05:08] pawnbox: has joined #RubyOnRails
[12:06:17] r3vDev: has joined #RubyOnRails
[12:06:44] ldnunes: has joined #RubyOnRails
[12:07:11] ReBa_: has joined #RubyOnRails
[12:09:42] artto: has joined #RubyOnRails
[12:13:23] augcesar: has joined #RubyOnRails
[12:15:21] harfangk: devise customization seems more trouble than it's worth it
[12:15:30] harfangk: can i use devise with some models
[12:15:32] HoierM: has joined #RubyOnRails
[12:15:45] harfangk: and a custom rolled auth solution for other models
[12:15:51] harfangk: within a single rails app?
[12:17:17] xaviergmail_: has joined #RubyOnRails
[12:19:00] dangerousdave: has joined #RubyOnRails
[12:21:48] dminuoso: harfangk: Yes.
[12:22:33] dminuoso: harfangk: basically devise adds some controllers, routes, views and some helpers (current_user) -> but it's entirely customizable
[12:22:42] dminuoso: Without extra work even.
[12:22:43] keerthana: has joined #RubyOnRails
[12:22:54] dminuoso: Just supply your own authentication strategy, devise will work with it.
[12:23:36] teddysmoker: has joined #RubyOnRails
[12:23:42] harfangk: i'm looking at warden setup
[12:24:08] harfangk: if i were to separate my custom solution into a separate gem that uses warden on its own
[12:24:32] harfangk: how would i account for an app that already uses devise?
[12:24:41] harfangk: wouldn't warden settings override one another in that case?
[12:24:43] dminuoso: harfangk: Which part do you want to customize exactly?
[12:25:27] harfangk: for user model, i want to completely do away with password
[12:25:43] harfangk: auth through quickly expiring token using sms or email
[12:26:19] harfangk: for admin or staff, devise works fine so i want to keep it there
[12:26:38] dminuoso: harfangk: Do all your approaches map to the same actual model in the end?
[12:26:51] dminuoso: If not, you should at least separate the controllers.
[12:27:04] dminuoso: (Or at least use STI)
[12:27:24] harfangk: do you mean separate them more than user_controller and staff_controller?
[12:27:30] dminuoso: Reason is that any component concerned about current_user should get a predictable user object.
[12:27:51] dminuoso: harfangk: No that's fine then.
[12:28:00] dminuoso: harfangk: Are these base controllers?
[12:28:18] dminuoso: harfangk: are staff members and user members backed by different models?
[12:28:32] dminuoso: harfangk: Is that out of necessity or your plan?
[12:28:41] harfangk: it's planned
[12:28:49] harfangk: they have vastly differing use cases
[12:29:06] dminuoso: harfangk: Fair enough, so it's kinda like an admin to ebay and a customer?
[12:29:45] harfangk: something that would need more than simple roll separation
[12:29:52] dminuoso: Sounds fine
[12:30:06] dminuoso: harfangk: Yeah you will want two separate base controllers for certain.
[12:30:34] dminuoso: harfangk: And then you can use devise without any problem. Just have each use a different authentication strategy and they are cleanly separated.
[12:33:02] harfangk: hm i'll think over it a bit more then
[12:33:06] dminuoso: harfangk: Keep in mind that depending on your use case single-table inheritance can be extremely useful, since it still allows you to connect these users.
[12:33:27] dminuoso: Which could be useful to enable inter "user" communication even between groups.
[12:34:24] durexlw: has joined #RubyOnRails
[12:34:31] durexlw: Afternoon all
[12:34:53] harfangk: that'd be interesting
[12:34:56] workmad3: harfangk: btw, there's a how-to guide in devises's wiki that goes over having 2 models for devise authentication here: https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-Role
[12:35:44] dminuoso: harfangk: I have written multiple complete authentication strategies against ldap, rest apis, my own models, token based, etc. So if you have any questions during the implementation feel free to shoot.
[12:35:48] inbx: has joined #RubyOnRails
[12:38:02] artto: has joined #RubyOnRails
[12:39:15] rfoust: has joined #RubyOnRails
[12:39:58] harfangk: workmad3 thank you i will check it out!
[12:41:43] harfangk: dminuoso thank you very much! let me think through what you told me so far and work on my design
[12:41:48] Pumukel: has joined #RubyOnRails
[12:43:56] lxsameer: has joined #RubyOnRails
[12:44:08] dminuoso: https://gist.github.com/dminuoso/a2fbe5765abf32b45f8162500fc7aea3
[12:44:26] dminuoso: What the heck?
[12:44:54] drale2k_: has joined #RubyOnRails
[12:51:34] dminuoso: I need sleep.
[12:52:09] drale2k_: has joined #RubyOnRails
[12:54:57] Pumukel: has joined #RubyOnRails
[12:55:08] ebbflowgo: has joined #RubyOnRails
[12:55:11] Pumukel: has joined #RubyOnRails
[12:55:25] Derperperd: has joined #RubyOnRails
[12:59:14] pawnbox: has joined #RubyOnRails
[13:00:17] hotpancakes: has joined #RubyOnRails
[13:01:25] pawnbox: has joined #RubyOnRails
[13:01:56] ramortegui: has joined #RubyOnRails
[13:02:20] Rodya_: has joined #RubyOnRails
[13:02:45] ldnunes: has joined #RubyOnRails
[13:03:00] xall: has joined #RubyOnRails
[13:08:03] netzfisch: has joined #RubyOnRails
[13:12:35] tedwing: has joined #RubyOnRails
[13:13:51] alex88: has joined #RubyOnRails
[13:19:39] ramortegui: has joined #RubyOnRails
[13:21:58] Omnilord: has joined #RubyOnRails
[13:23:05] pLaTo0n: has joined #RubyOnRails
[13:23:38] doodlehaus: has joined #RubyOnRails
[13:29:23] DLSteve_: has joined #RubyOnRails
[13:29:24] agent_white: has joined #RubyOnRails
[13:31:16] dionysus69: has joined #RubyOnRails
[13:41:16] Technodrome: has joined #RubyOnRails
[13:41:27] invalidusrname: has joined #RubyOnRails
[13:42:12] roadrunneratwast: has joined #RubyOnRails
[13:43:31] roadrunneratwast: hey all. i get mixed up every time i start a ror project. I have a gemfile. Do I first create an rvm name for the project, like a virtualenv for python? Or do I just do bundle install && bundle update
[13:44:49] xall: has joined #RubyOnRails
[13:47:41] agent_white: Mornin' folks
[13:51:53] shinnya: has joined #RubyOnRails
[13:52:32] dblessing: has joined #RubyOnRails
[13:55:08] Fernando-Basso: has joined #RubyOnRails
[13:57:40] christo16: has joined #RubyOnRails
[13:58:27] christo16: Hi! I would like to overwrite the Rails 5 default template for generating database tables (located at https://github.com/rails/rails/blob/master/activerecord/lib/rails/generators/active_record/migration/templates/create_table_migration.rb) - What is the best way to do this?
[13:59:20] leeky: has joined #RubyOnRails
[14:01:25] hotpancakes: has joined #RubyOnRails
[14:03:06] Rodya_: has joined #RubyOnRails
[14:03:17] dangerousdave: has joined #RubyOnRails
[14:12:29] artto: has joined #RubyOnRails
[14:12:59] artto: has joined #RubyOnRails
[14:16:16] soahccc^: Is anyone aware of recent changes in chrome and maybe other browsers concerning strict transport security or something? Out of a sudden a specific DNS record - whilst unchanged - sortof stopped working but only with chrome (for me) and apparently firefox as well (someone else, can't reproduce)... It's really odd and it appears as that https is enforced on this subdomain where it wasn't before (but in chrome, curl, or anything really works)
[14:18:34] artto: has joined #RubyOnRails
[14:18:52] chouhoulis: has joined #RubyOnRails
[14:21:00] keegnotrub: has joined #RubyOnRails
[14:22:01] hotpancakes: has joined #RubyOnRails
[14:22:41] pLaTo0n: has joined #RubyOnRails
[14:24:46] envint: has joined #RubyOnRails
[14:26:24] cpruitt: has joined #RubyOnRails
[14:27:02] tbuehlmann: soahccc_: have you ever requested that site with https and did it work?
[14:27:31] pawnbox: has joined #RubyOnRails
[14:28:01] soahccc^: tbuehlmann: we use https everywhere except for one subdomain and that is downloads. So I realized that Chrome indeed redirects from http://cdn to https://cdn for no reason
[14:30:35] tbuehlmann: chrome heavily caches that and often times enforces https later on, even when manually requesting via http
[14:30:59] tbuehlmann: try a private tab and/or deleting every cache that ever existed in your browser
[14:34:54] soahccc^: I tried private tab with "disable cache" in network pane but no difference. I asked a friend who never visited the site... First request download => works, second request frontpage, download again => fail.... ARGH
[14:37:55] soahccc^: I mean we send (as we always had) HSTS with includeSubDomains but it was never a problem until recently so I assume they fixed a broken implementation?
[14:39:38] xaviergmail_: has joined #RubyOnRails
[14:41:57] r3vDev: has joined #RubyOnRails
[14:46:40] codelahoma: has joined #RubyOnRails
[14:53:45] nya: has joined #RubyOnRails
[14:57:56] blackmes1: has joined #RubyOnRails
[14:58:06] workmad3: has joined #RubyOnRails
[14:59:06] Ergo: has joined #RubyOnRails
[15:00:08] lightheaded: has joined #RubyOnRails
[15:00:40] doodlehaus: has joined #RubyOnRails
[15:03:03] dminuoso: tbuehlmann: It's really really freaking hard to purge HSTS. :-)
[15:03:11] dminuoso: Which I suppose is a good thing.
[15:03:48] Rodya_: has joined #RubyOnRails
[15:03:59] artto: has joined #RubyOnRails
[15:04:56] cschneid_: has joined #RubyOnRails
[15:06:34] envint: has joined #RubyOnRails
[15:08:17] patarr: has joined #RubyOnRails
[15:08:44] pulkit4tech: has joined #RubyOnRails
[15:11:34] madrat_: has joined #RubyOnRails
[15:12:13] Technodrome: has joined #RubyOnRails
[15:13:36] lightheaded: has joined #RubyOnRails
[15:13:56] doodleha_: has joined #RubyOnRails
[15:15:43] SteenJobs: has joined #RubyOnRails
[15:18:52] roadrunneratwast: has joined #RubyOnRails
[15:27:46] brent__: has joined #RubyOnRails
[15:29:10] envint: has joined #RubyOnRails
[15:31:27] hotpancakes: has joined #RubyOnRails
[15:39:31] cagomez: has joined #RubyOnRails
[15:41:38] cagomez: first time using RoR on an existing codebase. when I enter `rails db` I get dropped into a psql console. what are the commands I can use to interact in this console? Is it this: https://www.postgresql.org/docs/9.0/static/app-psql.html
[15:43:10] tbuehlmann: cagomez: are you sure you want to do something in the database console rather than the rails console?
[15:43:50] cagomez: tbuehlmann: yeah, I'm just in exploratory mode. I've tried the rails console and wanted to try the db console
[15:44:51] tbuehlmann: ah, okay. wrong channel then :)
[15:47:20] envint: has joined #RubyOnRails
[15:48:15] cagomez: I need to add 3 columns to a db, so I need to create a migration. is it best practice to create 3 migrations separately, or add all 3 columns at once (if that's even possible)?
[15:48:56] tbuehlmann: cagomez: I'd add them in one migration (yep, possible)
[15:51:17] sagax: has joined #RubyOnRails
[15:52:01] envint: has joined #RubyOnRails
[15:53:19] hotpancakes: has joined #RubyOnRails
[15:55:24] cagomez: in this case... `$ bin/rails generate migration AddDetailsToProducts part_number:string price:decimal`. Is the `Details` name arbitrary? as in, it doesn't effect the migration itself, and is only for devs to know what the migration is for
[15:55:26] Derperperd: has joined #RubyOnRails
[15:56:26] kinduff: has joined #RubyOnRails
[15:56:55] roadrunneratwast: has left #RubyOnRails: ()
[15:57:10] username1: has joined #RubyOnRails
[15:57:32] username1: is it possible to use tinyint(1) as a byte integer instead of coercing to boolean emulation?
[15:57:43] username1: i dont want to change the MySQL col type in the actual db
[16:01:43] lightheaded: has joined #RubyOnRails
[16:02:13] gusrub: has joined #RubyOnRails
[16:02:56] [Butch]: has joined #RubyOnRails
[16:03:27] cagomez: has joined #RubyOnRails
[16:05:01] seanhandley: has joined #RubyOnRails
[16:05:46] seanhandley: anyone use Redis as the backend for Rails cache? I'm in a situation where I need my cache layer to be accessible between multiple nodes so memcache is showing its limitations re: security, clustering, etc but I've never used Redis to cache things, so I'm not sure if there's any particular caveats to be aware of
[16:08:13] DoubleMalt: has joined #RubyOnRails
[16:09:24] kinduff: has joined #RubyOnRails
[16:13:36] kinduff: has joined #RubyOnRails
[16:16:15] rubyonrailed: has joined #RubyOnRails
[16:16:35] cagomez: what's the difference between Creating and Writing a Migration on this page? http://edgeguides.rubyonrails.org/active_record_migrations.html#migration-overview
[16:17:03] cagomez: is the former for generated migrations, where the latter is for handwritten migrations?
[16:18:13] hotpanca_: has joined #RubyOnRails
[16:18:24] dionysus69: has joined #RubyOnRails
[16:19:47] envint: has joined #RubyOnRails
[16:22:29] dionysus69: has joined #RubyOnRails
[16:23:23] Sylario: has joined #RubyOnRails
[16:26:30] keegnotrub: has joined #RubyOnRails
[16:27:53] Sylario: I want to add the ability to upload a file pasted from the clipboard. I am under the impression that the file upload must be it's own ajax action. Is it possible to have this inside a form (a form_for) with other fields ?
[16:31:50] hotpancakes: has joined #RubyOnRails
[16:33:00] gusrub: has joined #RubyOnRails
[16:35:28] polishdub: has joined #RubyOnRails
[16:36:00] joshsmith: has joined #RubyOnRails
[16:38:51] pwnd_nsfw`: has joined #RubyOnRails
[16:39:17] rogue_koder: has joined #RubyOnRails
[16:39:38] d0nn1e: has joined #RubyOnRails
[16:44:14] rubyonrailed: has joined #RubyOnRails
[16:47:09] kruppm_: has joined #RubyOnRails
[16:47:30] hotpancakes: has joined #RubyOnRails
[16:48:41] MrJoshua: has joined #RubyOnRails
[16:49:01] MrJoshua: has joined #RubyOnRails
[16:50:59] xall: has joined #RubyOnRails
[16:53:27] dionysus69: has joined #RubyOnRails
[16:55:16] keegnotrub: has joined #RubyOnRails
[16:58:07] envint: has joined #RubyOnRails
[16:58:23] cagomez: has joined #RubyOnRails
[17:03:42] hahuang61: has joined #RubyOnRails
[17:05:17] Rodya_: has joined #RubyOnRails
[17:06:52] jonjoe: has joined #RubyOnRails
[17:07:49] lightheaded: has joined #RubyOnRails
[17:12:02] duderonomy: has joined #RubyOnRails
[17:15:58] dopamean_: has joined #RubyOnRails
[17:17:01] jnj: has joined #RubyOnRails
[17:18:22] jnj: In seeds.rb what happens if you try to make a relation that already exists? For example, lets say I have two tables - Rooms and Tools, that have a habtm relationship between each other. My seeds.rb code was able to attach some tools to each room, but not all tools. What happens if I run seeds.rb again and it tries to add a tool that a room already has to it?
[17:19:56] Andr3as: hi everyone.. i#ve a lil routing issue and dont get what i am doing wrong.. i want jquery-ui-autocomplete fed by a json response and thought i've set up the routes correctly, but it is searching for a user, even though i've put the said route as the first one.. see gist https://gist.github.com/awunder/8e3c7dc0938a80a7f1f6be2a689172a0
[17:20:08] Andr3as: could someone please shed some light onto this?
[17:21:37] Technodrome: has joined #RubyOnRails
[17:22:19] rubyonrailed: has joined #RubyOnRails
[17:22:21] cpruitt: jnj: seeds.rb isn’t magic. It’s just ruby code. You’re responsible for testing conditions (like if a record or relationship exists) and then deciding to create it or not.
[17:23:28] cpruitt: Andr3as: Youmight want to gist your entire routes file, not just one line.
[17:23:38] djbkd: has joined #RubyOnRails
[17:24:04] cpruitt: Also run `rake routes` to verify your routes are loaded as expected.
[17:24:38] Andr3as: updated (its still a little messy, right now.. )
[17:25:02] Andr3as: the thing is, when i do not use "?term=" its working just fine (?)
[17:25:16] Andr3as: but autocomplete uses it, imho..?
[17:25:24] Andr3as: so its gotta be working with it as well
[17:25:46] Cohedrin: has joined #RubyOnRails
[17:27:29] tbuehlmann: cagomez: that's right. the first is generating migrations using the generators, the latter is doing that manually
[17:30:47] tedwing: has joined #RubyOnRails
[17:31:50] hotpancakes: has joined #RubyOnRails
[17:31:51] tomasm-: has joined #RubyOnRails
[17:32:53] SteenJobs: has joined #RubyOnRails
[17:33:29] Andr3as: got it working, cpruitt
[17:33:42] Andr3as: route needs to be get 'users/user_index', to: 'users#user_index', as: 'user_index'
[17:33:51] Andr3as: without the trailing slash
[17:36:00] ElDoggo: has joined #RubyOnRails
[17:37:43] ElDoggo: Does anyone know the right approach to take with linking to an attachment that's been parsed by the mikel / mail gem?
[17:39:57] jnj: cpruitt: I do have code checking for that, I was just wondering what would happen if you tried to create a relationship / record that already exists using seeds.rb? Will it cause seeds.rb to stop, throw an error, etc
[17:39:57] hotpancakes: has joined #RubyOnRails
[17:40:23] ElDoggo: I was going to make a "download" controller action that parses the email using the mail gem and then uses Rails' send_data method to send the attachment.
[17:40:49] ElDoggo: But I'm an insecure coder. So I'm here.
[17:41:00] Cohedrin: has joined #RubyOnRails
[17:41:38] cpruitt: jnj: Code in seeds.rb will act just like if you ran that code anywhere in your rails app (scope aside). So anything you do that will throw an error in, say, your controller, will also throw an error in seeds.rb. Far as I know there’s no special handling.
[17:42:03] jnj: cpruitt: Ah, makes sense. Thanks!
[17:43:11] Technodrome: has joined #RubyOnRails
[17:47:59] green_hat: has joined #RubyOnRails
[17:48:15] epochwolf: I've been looking at reform (https://github.com/trailblazer/reform) for adding form objects to my application. Any opinions?
[17:51:59] xall: has joined #RubyOnRails
[17:52:03] tbuehlmann: epochwolf: I always favored rolling my own with virtus and AM::Validations
[17:52:42] epochwolf: tbuehlmann: does that handle nesting?
[17:52:54] tbuehlmann: if you implement it, sure :)
[17:54:59] epochwolf: tbuehlmann: Looks like a workable solution for me. I only have one form that really needs this.
[18:00:40] meoblast001: has joined #RubyOnRails
[18:01:00] kinduff: has joined #RubyOnRails
[18:03:03] davedo321: has joined #RubyOnRails
[18:04:06] AzaToth: has joined #RubyOnRails
[18:06:00] Rodya_: has joined #RubyOnRails
[18:06:48] ahrs: has joined #RubyOnRails
[18:11:12] Technodrome: has joined #RubyOnRails
[18:13:37] epochwolf: tbuehlmann: virtus looks unmaintained?
[18:14:44] tbuehlmann: in favor of dry-something, right?
[18:14:56] dblessing: has joined #RubyOnRails
[18:16:06] epochwolf: oh, it looks like Reform is the updated version of virtus.
[18:17:30] xall: has joined #RubyOnRails
[18:18:36] pawnbox: has joined #RubyOnRails
[18:20:19] banisterfiend: has joined #RubyOnRails
[18:21:03] envint: has joined #RubyOnRails
[18:21:12] tbuehlmann: virtus is an abstraction level higher, it's just for "models" and its attributes
[18:23:31] ocpysh: has joined #RubyOnRails
[18:24:06] hotpanca_: has joined #RubyOnRails
[18:30:24] Rodya_: has joined #RubyOnRails
[18:33:36] hotpancakes: has joined #RubyOnRails
[18:34:47] nahtnam: has joined #RubyOnRails
[18:35:09] ocpysh: has joined #RubyOnRails
[18:35:27] dionysus69: has joined #RubyOnRails
[18:37:37] anime4christ: has joined #RubyOnRails
[18:41:11] hakash: has joined #RubyOnRails
[18:43:31] SteenJobs: has joined #RubyOnRails
[18:43:36] epochwolf: tbuehlmann: this? http://trailblazer.to/gems/disposable/api.html
[18:48:52] xall: has joined #RubyOnRails
[18:55:07] gusrub: has joined #RubyOnRails
[18:58:28] envint: has joined #RubyOnRails
[19:00:50] [Butch]_: has joined #RubyOnRails
[19:02:10] [Butch]_: has joined #RubyOnRails
[19:02:42] meoblast001: has joined #RubyOnRails
[19:02:55] [Butch]: has joined #RubyOnRails
[19:03:32] szulak_: has joined #RubyOnRails
[19:04:15] fox_mulder_cp: tbuehlmann: hi. i ask you for query for related tables yesterday. can u help me with it?
[19:05:09] fox_mulder_cp: i need some like Model.joins(:second).where('second.some_id =': Second.find_by(prop: value).id)
[19:07:22] green_hat: has joined #RubyOnRails
[19:09:16] defsdoor: has joined #RubyOnRails
[19:09:39] Rodya_: has joined #RubyOnRails
[19:14:43] ocpysh: has joined #RubyOnRails
[19:15:33] NoGodDamnIdea: has joined #RubyOnRails
[19:26:04] ocpysh: has joined #RubyOnRails
[19:28:23] tbuehlmann: fox_mulder_cp: what's the problem?
[19:29:52] fox_mulder_cp: tbuehlmann: i can't select Model if included(:second) and second.count > 0
[19:30:45] fox_mulder_cp: I need select one model, when joined second.count more, than zero
[19:30:46] aFineDay: has joined #RubyOnRails
[19:31:00] pLaTo0n: has joined #RubyOnRails
[19:40:03] banisterfiend: has joined #RubyOnRails
[19:40:42] envint: has joined #RubyOnRails
[19:45:21] Andr3as: man, it took my all day to figure out how to use jquery-ui-autocomplete with best_in_place and a json source - but i made it! gotta celebrate with a drink..
[19:46:37] onkelhotte: has joined #RubyOnRails
[19:48:48] fox_mulder_cp: Andr3as: autocomplete is a very easy task. really
[19:49:32] fox_mulder_cp: Andr3as: by the way. i know, that life without jquery really present too )))
[19:50:03] cagomez: has joined #RubyOnRails
[19:50:06] tbuehlmann: fox_mulder_cp: I don't understand what the problem is
[19:50:23] Andr3as: issue was best in place with datatables and autocomplete with json on top
[19:50:24] jottr: has joined #RubyOnRails
[19:50:38] Andr3as: so its a bit tricky if you do it the first time
[19:51:17] fox_mulder_cp: tbuehlmann: how i can select one model of second joined model.count > 0 ?
[19:53:46] tbuehlmann: fox_mulder_cp: you're giving me a really hard time
[19:54:02] tbuehlmann: make my life easier: what are the names of your models?
[19:55:00] fox_mulder_cp: tbuehlmann: DomainZone as main, ZonePrice as included. i need select DomainZone if ZonePrice count linked with this DomainZone moore than 0
[19:55:34] tbuehlmann: fox_mulder_cp: what you describe is an inner join
[19:56:46] fox_mulder_cp: my english is easy, so i don't know, ehat are you want said for me (
[19:57:33] tbuehlmann: Project.joins(:tasks) will only return projects with tasks
[19:59:17] fox_mulder_cp: tbuehlmann: i need select Project when tasks.count > 0
[19:59:55] tbuehlmann: that should be Project.joins(:tasks).distinct
[20:00:28] fox_mulder_cp: or Project.select {|p| p.tasks.count > 0 }
[20:00:50] pLaTo0n: has joined #RubyOnRails
[20:01:37] cagomez: has joined #RubyOnRails
[20:03:34] username1: has joined #RubyOnRails
[20:03:46] nertzy: has joined #RubyOnRails
[20:03:52] tbuehlmann: that'd be Project.where('tasks_count > 0')
[20:03:59] tbuehlmann: but again, Project.joins(:tasks).distinct
[20:04:37] patarr1: has joined #RubyOnRails
[20:05:34] fox_mulder_cp: tbuehlmann: and how i can reverse distinct?
[20:06:08] armyriad: has joined #RubyOnRails
[20:06:23] fox_mulder_cp: not sort, reverse operation to distincts
[20:07:47] fox_mulder_cp: distinct.not...
[20:07:57] fox_mulder_cp: i don't know how said this
[20:08:39] fattuna: has joined #RubyOnRails
[20:09:10] pwnd_nsfw: has joined #RubyOnRails
[20:10:17] tbuehlmann: fox_mulder_cp: I don't know what you want
[20:13:52] fox_mulder_cp: tbuehlmann: some like this: DomainZone.select {|z| z.zone_prices.count == 0} but may be we have a optimal variant
[20:14:12] meoblast001: has joined #RubyOnRails
[20:15:24] Andr3as: isnt distinct just filtering duplicative entries?
[20:16:29] sagax: i have error http://susepaste.org/51277963
[20:16:31] patarr: has joined #RubyOnRails
[20:16:51] sagax: with ruby 2.3.1 and rails 5
[20:16:53] tbuehlmann: fox_mulder_cp: Project.joins(:tasks) returns all projects that have tasks. one row for each task, so you have duplicate projects
[20:17:16] tbuehlmann: fox_mulder_cp: so Project.joins(:tasks).distinct returns all projects (no duplicates) that have >= 1 tasks
[20:17:24] sagax: but this http://susepaste.org/51277963 work without error when i change rails version 4.2.8
[20:18:00] sagax: why? not understand
[20:18:08] srinidhi: has joined #RubyOnRails
[20:18:10] jnj: has joined #RubyOnRails
[20:20:33] sagax: what is the difference between integration tests in the rails 4 and the rails 5?
[20:21:25] lxsameer: has joined #RubyOnRails
[20:21:30] Andr3as: have you tried upgrading that gem?
[20:21:42] sagax: remove Gemfile.lock and update
[20:22:24] sagax: reinstall all what possible
[20:22:42] sagax: and try ruby 2.4.0 version with rails 5
[20:23:11] sagax: anyway have error
[20:23:54] Andr3as: hmm, sorry, no idea
[20:32:08] DoubleMalt: has joined #RubyOnRails
[20:34:40] patarr: has joined #RubyOnRails
[20:37:30] rgiscard: has joined #RubyOnRails
[20:40:17] szulak_: has joined #RubyOnRails
[20:43:18] green_hat: has joined #RubyOnRails
[20:46:58] andrewray: has joined #RubyOnRails
[20:47:04] Technodrome: has joined #RubyOnRails
[20:50:22] arBmind: has joined #RubyOnRails
[20:50:49] Parker0: has joined #RubyOnRails
[20:51:01] Parker0: has left #RubyOnRails: ()
[20:51:13] blackmes1: has joined #RubyOnRails
[20:51:43] Parker0: has joined #RubyOnRails
[20:52:39] ocpysh: has joined #RubyOnRails
[20:52:48] andrewray: rubocop question - I'm getting "Warning: unrecognized parameter Style/SpaceAroundBlockParameters:SupportedStyles"
[20:53:20] andrewray: but as far as I can tell, SupportedStyles is allowed inside "Style/SpaceAroundBlockParameters" http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/SpaceAroundBlockParameters because it includes #supported_styles method?
[20:53:44] dagelf: has joined #RubyOnRails
[20:56:51] Parker0: has joined #RubyOnRails
[20:57:08] lightheaded: has joined #RubyOnRails
[20:57:53] andrewray: hmm looks like if you do simply EnforcedStyle you can do SupportedStyle, but if you do EnforcedStyleForMultiLine you need to SupportedStyleForMultiLine
[21:01:29] Parker0: has left #RubyOnRails: ()
[21:01:32] matthewd: has joined #RubyOnRails
[21:04:46] Parker0: has joined #RubyOnRails
[21:05:06] Parker0: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[21:05:24] Parker0: has joined #RubyOnRails
[21:05:50] jenrzzz: has joined #RubyOnRails
[21:05:50] jenrzzz: has joined #RubyOnRails
[21:05:53] rfoust: has joined #RubyOnRails
[21:09:28] waltair: has joined #RubyOnRails
[21:09:54] waltair: has left #RubyOnRails: ()
[21:10:18] patarr: has joined #RubyOnRails
[21:10:34] szulak_: has joined #RubyOnRails
[21:12:10] waltair: has joined #RubyOnRails
[21:12:13] green_hat: has joined #RubyOnRails
[21:14:14] waltair: has joined #RubyOnRails
[21:15:30] netzfisch: has joined #RubyOnRails
[21:15:36] Duckily: has joined #RubyOnRails
[21:15:53] waltair: has left #RubyOnRails: ()
[21:17:05] waltair: has joined #RubyOnRails
[21:17:16] waltair: what application do you all use to connect to the irc channels
[21:19:46] Andr3as: i use quassel .. was using mirc + a bouncer before
[21:19:57] Andr3as: n8 evreyone
[21:21:48] rakm: has joined #RubyOnRails
[21:22:05] waltair: thanks @Andr3as fryguy
[21:32:04] envint: has joined #RubyOnRails
[21:32:13] sdrew: has joined #RubyOnRails
[21:37:01] nOwz: has joined #RubyOnRails
[21:38:33] habitullence_: has joined #RubyOnRails
[21:38:57] waltair: has joined #RubyOnRails
[21:44:16] doodlehaus: has joined #RubyOnRails
[21:50:03] mulander: has joined #RubyOnRails
[21:51:41] mulander: hi all, what is the proper way to assure uniqueness on a :token field with a model using `has_secure_token`? I tried `validates :token, uniqueness: true` but that fails as the token is not yet generated when validations are run. Is the only/proper way a database level constraint?
[21:52:57] xaviergmail_: has joined #RubyOnRails
[21:55:18] defsdoor: has joined #RubyOnRails
[21:58:11] jphase: has joined #RubyOnRails
[22:00:43] username1: has joined #RubyOnRails
[22:03:31] dminuoso: mulander: allow_blank / allow_nil
[22:03:59] dminuoso: mulander: but you should still have a database constraint regardless
[22:11:01] hahuang65: has joined #RubyOnRails
[22:12:00] mulander: dminuoso: so with allow_blank / allow_nil pretty much just guarantees that I didn't hard code a value myself or let the user set one but will not ever prevent the same one being generated?
[22:12:16] hahuang65: has joined #RubyOnRails
[22:15:43] arBmind1: has joined #RubyOnRails
[22:16:38] hahuang65: has joined #RubyOnRails
[22:17:10] djbkd: has joined #RubyOnRails
[22:18:13] ahrs: has joined #RubyOnRails
[22:22:05] workmad3: has joined #RubyOnRails
[22:26:13] doodlehaus: has joined #RubyOnRails
[22:29:00] rfoust: has joined #RubyOnRails
[22:45:48] rakm: what's a good pattern to organize a lib/my_module/ if my_module is going to have a base class and some classes that inherit from it?
[22:46:45] rakm: lib/module/base.rb, lib/module/sub_a.rb, lib/module/sub_b.rb. ?
[22:46:55] rakm: should anything go in lib/ directly?
[22:50:33] fox_mulder_cp: mulander: set before_save :set_up_token method, where your token is generated
[22:50:38] fox_mulder_cp: some like this
[22:50:47] doodlehaus: has joined #RubyOnRails
[22:52:09] doodlehaus: has joined #RubyOnRails
[22:54:39] rubyonrailed: has joined #RubyOnRails
[22:56:52] longtran415: has joined #RubyOnRails
[22:57:30] hahuang65: has joined #RubyOnRails
[22:57:43] lightheaded: has joined #RubyOnRails
[23:00:31] ocpysh: has joined #RubyOnRails
[23:01:23] gambl0re: has joined #RubyOnRails
[23:02:10] srinidhi: has joined #RubyOnRails
[23:05:59] HoierM_: has joined #RubyOnRails
[23:11:39] dminuoso: rakm: it depends. do you ever intend on extracting a gem out of it?
[23:11:43] dminuoso: rakm: do you want it autoloaded?
[23:14:53] dfockler: has joined #RubyOnRails
[23:20:11] jaequery: has joined #RubyOnRails
[23:20:50] seanhandley: has left #RubyOnRails: ()
[23:21:23] yuri: has joined #RubyOnRails
[23:22:52] Arkilus: Hey guys, how do you deal with errors on form that is shown in the view of another model? Like the tweet form on a user profile view.
[23:26:05] mulander: has left #RubyOnRails: ()
[23:26:13] Arkilus: has left #RubyOnRails: ()
[23:26:23] Arkilus: has joined #RubyOnRails
[23:26:37] dminuoso: Arkilus: What do you mean exactly? Can you share a gist?
[23:29:45] pawnbox: has joined #RubyOnRails
[23:29:49] SteenJobs: has joined #RubyOnRails
[23:30:18] Arkilus: Well, let me build one. It is easy to spot on Harlt's tutorial, in the finished state there is a 'Micropost' form in the user profile page. When you submit a invalid micropost, the controller instead of redirecting back to root_path, only renders the 'new' action, but now it is in the 'micropost' path (but still showing the profile page). Now if you click in the pagination it breaks.
[23:30:29] Arkilus: Ok that was long, let me search for a example to show here.
[23:31:05] dminuoso: Arkilus: Are you building a traditional rails app?
[23:31:11] dminuoso: Arkilus: If so, the flash object is what you are asking for.
[23:34:17] quazimodo: has joined #RubyOnRails
[23:34:20] Arkilus: Yes, sticking to REST. I'm using flashes, the problem is if I use 'render' so the errors are shown, my app stays in the controller path to that form. Let's say the profile page is /home, then I submit the form for a new tweet, which will lead to /tweet/new.
[23:35:07] Arkilus: In the 'new' action, if the tweet is saved withtout errors I will just 'redirect_to /home'
[23:35:44] sdrew: has joined #RubyOnRails
[23:36:02] Arkilus: But if it is not valid, then I have to 'render "new"' in order to errors be available in the view. But in this case, I look at the address bar and I'm not on /home anymore, but in /teets/new instead
[23:39:44] Derperperd: has joined #RubyOnRails
[23:39:59] dminuoso: Arkilus: By traditional I meant as opposed to doing an SPA using a modern JS framework.
[23:40:22] dminuoso: I kind of stopped looking at rails having views a few weeks ago. :-)
[23:40:31] blackmes1: has joined #RubyOnRails
[23:40:44] sdrew: has joined #RubyOnRails
[23:40:54] Arkilus: Oh, that must the reason I find so few related questions.
[23:41:12] Arkilus: With ajax I see that would not be a problem
[23:41:29] sdrew: has joined #RubyOnRails
[23:41:34] pwnd_nsfw`: has joined #RubyOnRails
[23:42:19] sdrew: has joined #RubyOnRails
[23:42:33] dminuoso: Arkilus: ajax is so 2002. its all window.fetch now :p
[23:42:55] Darmani: has joined #RubyOnRails
[23:43:04] sdrew: has joined #RubyOnRails
[23:43:19] Arkilus: dminuoso: Haha I thought it was all the same. Came back to web development a few weeks ago, after some years off.
[23:43:36] dminuoso: Arkilus: Hehe. Fetch is a modern retake of XMLHttpRequest indeed.
[23:43:48] dminuoso: With some of the flaws you find in jQuery and friends fixed.
[23:43:54] sdrew: has joined #RubyOnRails
[23:44:08] dminuoso: Like if the server responds with a non 2xx code the promise will not get rejected but fulfilled (this is good by the way!)
[23:44:25] cschneid_: has joined #RubyOnRails
[23:44:41] Arkilus: That is nice, got to check this Fetch
[23:46:33] djbkd: has joined #RubyOnRails
[23:47:27] green_hat: has joined #RubyOnRails
[23:53:41] hahuang65: has joined #RubyOnRails
[23:54:28] hahuang65: has joined #RubyOnRails