« Back to channel list

#RubyOnRails - 10 January 2018

« Back 1 day Forward 1 day »
[00:00:20] hahuang65: has joined #RubyOnRails
[00:22:05] quazimodo: has left #RubyOnRails: ()
[00:25:14] morfin: i used delegate yesterday
[00:25:49] morfin: because title is in related model and sluggable-rails use title_changed? method
[00:33:59] uks: has joined #RubyOnRails
[00:35:36] mikecmpbll: has joined #RubyOnRails
[00:37:09] Jameser: has joined #RubyOnRails
[00:37:58] alfiemax: has joined #RubyOnRails
[00:40:06] endemic: has joined #RubyOnRails
[00:41:20] fl4sh_: has joined #RubyOnRails
[00:41:44] S007: has joined #RubyOnRails
[00:42:57] sci_phi: has joined #RubyOnRails
[00:46:43] _ritchie_: has joined #RubyOnRails
[00:54:53] alfiemax: has joined #RubyOnRails
[00:56:02] S007: has joined #RubyOnRails
[00:59:36] bronson: has joined #RubyOnRails
[01:03:51] l_tonz: has joined #RubyOnRails
[01:09:19] orbyt_: has joined #RubyOnRails
[01:11:32] ResidentBiscuit: has joined #RubyOnRails
[01:13:38] l_tonz: has joined #RubyOnRails
[01:44:43] MrCrackPotBuilde: has joined #RubyOnRails
[01:44:55] hahuang65: has joined #RubyOnRails
[01:47:24] alfiemax: has joined #RubyOnRails
[02:03:30] jnollette: has joined #RubyOnRails
[02:10:00] steveh7: has joined #RubyOnRails
[02:11:33] FCser: has joined #RubyOnRails
[02:21:47] l_tonz: has joined #RubyOnRails
[02:29:09] jready: has joined #RubyOnRails
[02:36:32] jnollette: has joined #RubyOnRails
[02:37:23] alfiemax: has joined #RubyOnRails
[02:59:26] l_tonz: has joined #RubyOnRails
[03:00:56] bronson: has joined #RubyOnRails
[03:05:27] alfiemax: has joined #RubyOnRails
[03:07:43] safetypin: has joined #RubyOnRails
[03:10:53] l_tonz: has joined #RubyOnRails
[03:15:51] JusticeFries: has joined #RubyOnRails
[03:38:04] darkhanb: has joined #RubyOnRails
[03:40:18] hahuang65: has joined #RubyOnRails
[03:40:26] loglaunch: has joined #RubyOnRails
[03:47:39] zwliew: has joined #RubyOnRails
[03:50:57] Saukk: has joined #RubyOnRails
[04:11:44] chridal: has joined #RubyOnRails
[04:11:45] alfiemax: has joined #RubyOnRails
[04:14:46] elcontrastador: has joined #RubyOnRails
[04:30:45] JusticeFries: has joined #RubyOnRails
[04:37:58] KeyJoo: has joined #RubyOnRails
[04:39:23] tanuki: has joined #RubyOnRails
[04:46:02] l_tonz: has joined #RubyOnRails
[04:50:23] kies: has joined #RubyOnRails
[04:57:04] kapil___: has joined #RubyOnRails
[04:58:50] mikecmpbll: has joined #RubyOnRails
[05:01:43] bronson: has joined #RubyOnRails
[05:20:31] KeyJoo: has joined #RubyOnRails
[05:41:22] hahuang65: has joined #RubyOnRails
[05:53:24] dionysus69: has joined #RubyOnRails
[05:59:05] l_tonz: has joined #RubyOnRails
[06:05:38] za1b1tsu: has joined #RubyOnRails
[06:05:54] za1b1tsu: It seems I cannot do this validates :score, presence: true, :score_between_min_max, if: :subject_is_rateable? ?
[06:06:44] za1b1tsu: have presense true and a method. I have to include a custom presence true in my method?
[06:16:33] ur5us: has joined #RubyOnRails
[06:24:10] aiguuu: has joined #RubyOnRails
[06:38:24] apeiros: has joined #RubyOnRails
[06:47:38] vichib: has joined #RubyOnRails
[06:50:07] darkhanb: has joined #RubyOnRails
[07:02:35] bronson: has joined #RubyOnRails
[07:04:55] dionysus69: has joined #RubyOnRails
[07:07:12] darkhanb: has joined #RubyOnRails
[07:07:17] Puffball: has joined #RubyOnRails
[07:14:16] one_zero: has joined #RubyOnRails
[07:26:29] _ritchie_: has joined #RubyOnRails
[07:31:44] roshanavand: has joined #RubyOnRails
[07:33:11] zwliew: has joined #RubyOnRails
[07:33:17] srinidhi: has joined #RubyOnRails
[07:40:18] AzaToth: has joined #RubyOnRails
[07:42:14] hahuang65: has joined #RubyOnRails
[07:44:40] arBmind: has joined #RubyOnRails
[07:45:05] conta: has joined #RubyOnRails
[07:47:34] Jameser: has joined #RubyOnRails
[08:18:56] one_zero: has joined #RubyOnRails
[08:30:03] Jameser: has joined #RubyOnRails
[08:38:59] l_tonz: has joined #RubyOnRails
[08:41:54] marr: has joined #RubyOnRails
[08:45:31] conta: is there a guide of how to upgrade to rails 5.2 beta?
[08:57:19] dionysus69: what's the best practice to initialize an object so it is accessible throughout the project fcm = FCM.new(...)
[08:59:29] dionysus69: is @@ class variable good way to initialize this kind of service? I am asking this because I have only seen non-instance initializations in the initializer dir
[09:01:33] dminuoso: dionysus69: class variables are almost never a good way to do anything.
[09:01:44] dionysus69: ye that's what I heard :D
[09:02:00] dionysus69: what about declaring a class in app/services
[09:02:14] dionysus69: and class << self init object here end
[09:02:19] dionysus69: what about this?
[09:02:40] dminuoso: dionysus69: Personally I recommend against a singleton pattern, because it's frequently wrong and usually leads to bad design.
[09:03:05] dionysus69: you mean the method missing pattern right?
[09:03:29] dionysus69: def method_missing(name, *args)
[09:03:29] dionysus69: service_method_name.send name, *args
[09:03:48] bronson: has joined #RubyOnRails
[09:04:03] dionysus69: if yes, ok then, then what pattern do you recommend :D
[09:06:09] dminuoso: Passing things.
[09:06:18] dminuoso: If something needs some "fcm", then give it said fcm.
[09:08:28] dionysus69: pass as a method argument?
[09:09:17] dionysus69: cause fcm is like a service that you call methods on
[09:09:52] dionysus69: so things become weird if I make it in a "functional way"
[09:15:56] mikecmpbll: has joined #RubyOnRails
[09:16:33] dminuoso: dionysus69: Where do you need that fcm?
[09:16:49] dionysus69: in a rake task and in controllers too
[09:16:59] dionysus69: sending notifications to mobile users xD
[09:20:01] defsdoor: has joined #RubyOnRails
[09:28:53] iamarun: has joined #RubyOnRails
[09:29:56] dviola: has joined #RubyOnRails
[09:31:35] l_tonz: has joined #RubyOnRails
[09:43:01] srinidhi: has joined #RubyOnRails
[09:43:18] hahuang65: has joined #RubyOnRails
[09:46:59] jnollette: has joined #RubyOnRails
[09:48:00] iamarun: has joined #RubyOnRails
[09:48:10] DaniG2k: has joined #RubyOnRails
[09:48:41] DaniG2k: hello all, I'm trying to make an activerecord call that goes through different models and I'm wondering what the best way to do this would be
[09:49:26] _ritchie_: has joined #RubyOnRails
[09:49:26] DaniG2k: I have a Location, which has many Products through HandlingEvents. I also have a Customer who has many Products. I am trying to get a list of Locations per Customer
[09:50:04] DaniG2k: I basically need to go Customer -> Products (each)-> HandlingEvent -> Locations
[09:50:27] DaniG2k: how would I do this?
[09:55:40] DaniG2k: ah got it, nevermind :) thanks anyways
[10:05:28] arBmind: has joined #RubyOnRails
[10:05:40] Cavallari: has joined #RubyOnRails
[10:14:40] iamarun: has joined #RubyOnRails
[10:24:29] jottr_: has joined #RubyOnRails
[10:25:45] alfiemax: has joined #RubyOnRails
[10:28:04] ldnunes: has joined #RubyOnRails
[10:29:11] Tempesta: has joined #RubyOnRails
[10:32:11] DrYockel: has joined #RubyOnRails
[10:39:12] l_tonz: has joined #RubyOnRails
[10:43:57] alfiemax: has joined #RubyOnRails
[10:50:01] iamarun: has joined #RubyOnRails
[10:55:38] roshanavand: has left #RubyOnRails: ()
[11:04:11] morfin60: has joined #RubyOnRails
[11:04:50] morfin60: how do i redirect user to same route with different language if there is no support for such language?
[11:04:53] bronson: has joined #RubyOnRails
[11:07:39] morfin60: as example my locales contain only [:en,:ru] if i use URL like /de/products it should redirect me to /en/products, i know i can check I18n.locale_available?((params[:locale]) so i know when i should redirect but how do i perform redirect itself to same route with different :locale parameter?
[11:15:12] l_tonz: has joined #RubyOnRails
[11:19:36] jottr_: has joined #RubyOnRails
[11:20:56] ivanskie: has joined #RubyOnRails
[11:21:23] ivanskie: man im single handedly helping a client with an app.
[11:21:33] ivanskie: 80% of the app is about tags.
[11:21:38] ivanskie: tags tags tags tags
[11:21:49] ivanskie: i'm about to hang myself with tags
[11:23:18] ivanskie: i'm certain my approach to implementation is inefficient and stupid. yet i don't have anyone to bounce ideas with. so frustrating. and then there's a deadline.
[11:25:57] srinidhi: has joined #RubyOnRails
[11:26:46] ams__: has joined #RubyOnRails
[11:27:16] ivanskie: essentially, i have objects with options/tags. tags are always the same they are never custom, removed, or added. but some objects have some selection of tags, and some are not selected. I would have just made a column and name it tags, and just pass a string of binary into it, but then remembering and making sure everything knows which binary digit is which tag is a nightmare. so then i thought i'd just use acts_as_taggable
[11:27:16] ivanskie: or whatever the latest replacement is. but thinking about it is giving me a headache. so i'm left with just creating a column for each option/tag. but im not sure if its the right approach. gah
[11:27:24] ivanskie: again. about to hang myself with tags.
[11:27:49] ivanskie: insert oprah's 'everyone gets tags' meme here.
[11:36:23] l_tonz: has joined #RubyOnRails
[11:38:34] Jameser: has joined #RubyOnRails
[11:42:50] fschuindt: has joined #RubyOnRails
[11:44:06] hahuang65: has joined #RubyOnRails
[11:47:22] roshanavand: has joined #RubyOnRails
[11:49:18] l_tonz: has joined #RubyOnRails
[12:18:59] KeyJoo: has joined #RubyOnRails
[12:21:59] Jameser: has joined #RubyOnRails
[12:24:14] jottr: has joined #RubyOnRails
[12:25:01] apparition: has joined #RubyOnRails
[12:26:15] morfin60: any idea about redirects? i forgot one tiny detail - i use default locale :en so /en/products is same as /products and i want to redirect /de/products/ => /products
[12:34:12] zwliew: has joined #RubyOnRails
[12:42:42] _ritchie_: has joined #RubyOnRails
[12:43:27] za1b1tsu: has joined #RubyOnRails
[12:52:18] l_tonz: has joined #RubyOnRails
[12:58:02] dcope: has joined #RubyOnRails
[13:00:53] ahrs: has joined #RubyOnRails
[13:05:37] bronson: has joined #RubyOnRails
[13:24:39] srinidhi: has joined #RubyOnRails
[13:25:27] srinidhi: has joined #RubyOnRails
[13:29:42] apeiros: has joined #RubyOnRails
[13:30:05] l_tonz: has joined #RubyOnRails
[13:39:11] morfin60: i tried different ways but then i break 404 for /asffedgre/gnfefewage url
[13:43:02] tcopeland: has joined #RubyOnRails
[13:44:58] hahuang65: has joined #RubyOnRails
[13:55:09] vichib: has joined #RubyOnRails
[13:57:22] l_tonz: has joined #RubyOnRails
[14:02:12] za1b1tsu: has joined #RubyOnRails
[14:05:42] kapil___: has joined #RubyOnRails
[14:06:53] noob_on_rails: has joined #RubyOnRails
[14:08:08] noob_on_rails: hello :) , im trying to understand concerns , i found an example that implements a concern for tagging , and makes models taggable. But isn't that like making a polymorphic association ?
[14:08:50] noob_on_rails: or can you include the polymorphic association inside the concern plus some shared method ?
[14:09:22] noob_on_rails: https://gist.github.com/anonymous/0fdfa9bac3cb254701cf4b1120f4c8a0 here's the example
[14:11:35] dminuoso: noob_on_rails: A concern is just a fancy word for "module"
[14:11:44] noob_on_rails: dminuoso: true yea
[14:12:00] dminuoso: (With some sugar to hide how ruby actually works)
[14:12:07] noob_on_rails: but reading this example , got me thinking about a polymorphic assoc
[14:12:57] dminuoso: 15:09 noob_on_rails | [14:08:50] or can you include the polymorphic association inside the concern plus some shared method ?
[14:12:59] dminuoso: Absolutely.
[14:13:11] noob_on_rails: hmm that makes sense
[14:13:25] dminuoso: noob_on_rails: `included` is just a hook that is called at the callsite of the "include" that uses it
[14:13:32] dminuoso: Everything else is just a module.
[14:13:37] dminuoso: You could write it by hand using self.included
[14:13:46] dminuoso: noob_on_rails: Think of it as a regular module. :-)
[14:14:14] noob_on_rails: it's a bit confusing if you think of the convention
[14:14:28] noob_on_rails: a polymorphic association for an image would be imageable
[14:14:42] dminuoso: noob_on_rails: The core issue is that Ruby has no first-class support for implicits or typeclasses.
[14:15:04] dminuoso: noob_on_rails: So modules basically not only accomplish code sharing, but they can also be used to do implicits.
[14:15:21] dminuoso: noob_on_rails: Enumerable and Comparable are excellent examples of this.
[14:15:42] dminuoso: Which are more than just "modules". They are kind of "interfaces", much like your Taggable.
[14:15:50] dminuoso: Or "protocols" as Elixir would call it.
[14:16:20] noob_on_rails: hmm interface is a bit confusing as it's implemented , or am i missing something ?
[14:16:27] noob_on_rails: but i get your point
[14:16:30] desperek: has joined #RubyOnRails
[14:17:56] noob_on_rails: 16:14:42] <dminuoso> noob_on_rails: The core issue is that Ruby has no first-class support for implicits or typeclasses.
[14:18:00] dminuoso: noob_on_rails: Well Java calls it interfaces.
[14:18:37] noob_on_rails: by that you mean that in some cases it will implicitly convert something to something else ?
[14:20:04] dminuoso: noob_on_rails: Well imagine there was a module called `Printable` which would require you to implement some `to_string` method, and give you `to_s` and `inspect` for free.
[14:20:43] dminuoso: noob_on_rails: Anyway. My point is just that `Taggable` is fairly similar to `Comparable` or `Enumerable` - it looks fine.
[14:21:35] jottr: has joined #RubyOnRails
[14:21:50] dminuoso: noob_on_rails: Comparable assumes some #<=> exists, Enumerable assumes some #each exists, and Taggable assumes that.. two columns in the database exist.
[14:22:04] dminuoso: (And that you're inside something that behaves like ActiveRecord)
[14:23:07] noob_on_rails: dminuoso: Well imagine there was a module called `Printable` which would require you to implement some `to_string`
[14:23:16] noob_on_rails: but , Printable module
[14:23:41] noob_on_rails: i mean , does the module require you to implement something?
[14:24:07] noob_on_rails: https://richonrails.com/articles/rails-4-code-concerns-in-active-record-models <- this guy here , implements everything in the concern
[14:24:12] noob_on_rails: and just include Authentication
[14:24:38] noob_on_rails: i do understand a big part of what you say though
[14:24:49] dminuoso: noob_on_rails: Strictly speaking yes.
[14:25:06] dminuoso: noob_on_rails: Ruby just sucks here and offers no tools to actually enforce this as most other languages would.
[14:25:31] dminuoso: noob_on_rails: I wrote some code to do this kind of checking though.
[14:26:09] dminuoso: noob_on_rails: https://gist.github.com/dminuoso/35bcb3efac3526e8e8d48149cafc6707
[14:27:26] dminuoso: noob_on_rails: Reload to see how its used.
[14:27:50] noob_on_rails: damn i have to do some reading :D
[14:28:02] noob_on_rails: advanced stuff :D
[14:28:17] noob_on_rails: actually ill come in 20 mins and give it a look
[14:28:22] noob_on_rails: let me end something
[14:28:26] dminuoso: noob_on_rails: So in a way if you look at const.rb
[14:28:28] noob_on_rails: thanks for all this man
[14:28:48] dminuoso: noob_on_rails: Then the definition of `Const` is basically a proof, and `Const.implements Functor` then verifies that proof.
[14:29:04] noob_on_rails: hmm it's a cool idea
[14:29:20] dminuoso: noob_on_rails: Honestly its sad that I have to resort to this in the first place.
[14:29:51] dminuoso: noob_on_rails: But it requires a functioning type system of some sort. :)
[14:30:01] l_tonz: has joined #RubyOnRails
[14:30:24] noob_on_rails: ok , give me some time ill be back to read this better
[14:30:35] noob_on_rails: i have to fly atm brb , thanks tons!:D
[14:38:02] morfin60: i just let scope get all locales and if locale is not avaliable remove it from request.path and redirect
[14:39:14] morfin60: because route without locale at all assumes I18n.default_locale
[14:45:17] dblessing: has joined #RubyOnRails
[14:52:56] xhoy: HI!, is there a way to not commit an object update if and not trow an error. So basicly just ignore the save
[14:53:47] fschuindt: if and not?
[14:53:58] fschuindt: xhoy: what do you mean?
[14:54:04] xhoy: i can do a before_save
[14:54:20] xhoy: but i can trow an error, but not just 'ignore' the save
[14:54:55] xhoy: (and let the process continue without saving the object)
[14:55:51] fschuindt: do you want to suppress a error and keep responding the user without saving?
[14:56:08] xhoy: or not even trow an error at all and just skip to the "true' ;0
[14:56:27] xhoy: i have a statical model with a value for every day of the year
[14:56:34] xhoy: but its often 0
[14:57:07] xhoy: and i generate the data on tens of places is now i do if nonzero? skip this part but i mean a callback should do that!
[14:58:46] fschuindt: xhoy: sorry, I'm still confused, can you show me a gist example or something?
[15:00:32] xhoy: before_save { value.nonzero? ? keepgoing_with_save : do_not_trow_an_error_but_also_dont_save_the_record_to_the_db}
[15:00:36] xhoy: something like that :)
[15:01:01] xhoy: i could overwrite the update class ofcz!
[15:01:34] xhoy: and the find_or_create_by, and the, save, and the....
[15:06:03] kies: has joined #RubyOnRails
[15:06:49] bronson: has joined #RubyOnRails
[15:08:13] safetypin: has joined #RubyOnRails
[15:12:20] l_tonz: has joined #RubyOnRails
[15:18:31] workmad3: xhoy: return true to continue, return false to abort
[15:20:24] workmad3: xhoy: oh, if you're on rails 5, you'll want to read this instead: https://blog.bigbinary.com/2016/02/13/rails-5-does-not-halt-callback-chain-when-false-is-returned.html
[15:21:37] yehowyada: has joined #RubyOnRails
[15:34:01] roshanavand: has joined #RubyOnRails
[15:41:45] Puffball: has joined #RubyOnRails
[15:51:16] roshanavand: has left #RubyOnRails: ()
[15:59:34] jhill_: has joined #RubyOnRails
[16:02:47] l_tonz: has joined #RubyOnRails
[16:04:04] ule: Whats your trick to deploy Rails applications from scratch faster?
[16:07:09] dionysus69: has joined #RubyOnRails
[16:09:31] _ritchie_: has joined #RubyOnRails
[16:18:04] vichib: has joined #RubyOnRails
[16:18:47] vichib: has joined #RubyOnRails
[16:19:53] apeiros: has joined #RubyOnRails
[16:27:30] vichib: has joined #RubyOnRails
[16:29:39] vichib: has joined #RubyOnRails
[16:33:49] SteenJobs: has joined #RubyOnRails
[16:37:18] Axsuul: has joined #RubyOnRails
[16:42:33] uksio: has joined #RubyOnRails
[16:46:10] [Butch]: has joined #RubyOnRails
[16:48:41] l_tonz: has joined #RubyOnRails
[16:53:17] dblessing: has joined #RubyOnRails
[16:56:16] l_tonz: has joined #RubyOnRails
[17:02:13] troys: has joined #RubyOnRails
[17:03:34] _ritchie_: has joined #RubyOnRails
[17:04:36] one_zero: has joined #RubyOnRails
[17:05:27] l_tonz: has joined #RubyOnRails
[17:07:51] bronson: has joined #RubyOnRails
[17:07:54] conceivably: has joined #RubyOnRails
[17:17:22] JusticeFries: has joined #RubyOnRails
[17:24:13] Saukk: has joined #RubyOnRails
[17:25:42] lacour: has joined #RubyOnRails
[17:28:29] darkhanb: has joined #RubyOnRails
[17:30:05] SteenJobs: has joined #RubyOnRails
[17:33:06] morfin: hm i remember before_action was before_filter earlier)
[17:33:21] morfin: and return false interrupt chain
[17:37:54] orbyt_: has joined #RubyOnRails
[17:39:04] lcarlson: has joined #RubyOnRails
[17:45:13] NoGodDamnIdea: has joined #RubyOnRails
[17:46:03] jottr: has joined #RubyOnRails
[17:47:06] hahuang65: has joined #RubyOnRails
[17:52:15] za1b1tsu: How would you design this more rubyesque or efficiently https://gist.github.com/bbtdev/f406b22b69fa0661903508db44f90e44 ?
[17:52:46] JusticeFries: has joined #RubyOnRails
[17:53:16] apeiros: has joined #RubyOnRails
[17:54:49] Cache_Money: has joined #RubyOnRails
[17:56:56] [Butch]: has joined #RubyOnRails
[17:57:52] crova: has joined #RubyOnRails
[17:58:37] crova: Hello folks, how is it going? What would be the best option to display each domain in a separate way for the following object: https://gist.github.com/crova/5a1543340866c78572aee6f626acd602 ? Cheers
[18:02:18] l_tonz: has joined #RubyOnRails
[18:03:34] darkhanb_: has joined #RubyOnRails
[18:12:30] mtkd: has joined #RubyOnRails
[18:12:31] jackhum: has joined #RubyOnRails
[18:13:27] jackhum: has joined #RubyOnRails
[18:14:37] jackhum: has joined #RubyOnRails
[18:15:29] jackhum: has joined #RubyOnRails
[18:17:05] l_tonz: has joined #RubyOnRails
[18:17:08] jackhum: has joined #RubyOnRails
[18:17:32] darkhanb: has joined #RubyOnRails
[18:17:43] arup_r: has joined #RubyOnRails
[18:18:36] jackhum: has joined #RubyOnRails
[18:19:03] dblessing: has joined #RubyOnRails
[18:19:51] jackhum: has joined #RubyOnRails
[18:20:15] jackhum: has joined #RubyOnRails
[18:24:56] tcopeland: za1b1tsu: I added a suggestion at https://gist.github.com/bbtdev/f406b22b69fa0661903508db44f90e44
[18:27:45] srinidhi: has joined #RubyOnRails
[18:35:44] dionysus69: has joined #RubyOnRails
[18:39:40] l_tonz: has joined #RubyOnRails
[18:49:20] darkhanb_: has joined #RubyOnRails
[18:51:22] za1b1tsu: tcopeland: thank you, does it work for nil && nil, though?
[18:51:57] za1b1tsu: initially I made like you said, but nil && nil wasn't working
[18:52:06] za1b1tsu: maybe I had a type somewhere...
[18:59:47] tcopeland: ah I see you want false in that case, so perhaps: !!(min && max)
[19:02:35] Dimik: has joined #RubyOnRails
[19:03:08] orbyt_: has joined #RubyOnRails
[19:08:37] bronson: has joined #RubyOnRails
[19:12:07] za1b1tsu: tcopeland: tried that as well, rubocop doesn't like it :)
[19:12:17] za1b1tsu: but I can in this situation it is okay?
[19:14:51] tcopeland: I guess depends on how much you want to keep rubocop happy… your original code was fine too, really, just a matter of how much you want to boil it down
[19:15:51] l_tonz: has joined #RubyOnRails
[19:17:16] jobewan: has joined #RubyOnRails
[19:17:25] jottr: has joined #RubyOnRails
[19:26:32] kies: has joined #RubyOnRails
[19:32:06] Dimik: has joined #RubyOnRails
[19:32:23] dviola: has joined #RubyOnRails
[19:44:38] brent__: has joined #RubyOnRails
[19:45:58] brent__: `= Rails.application.assets_manifest.find_sources("mailer/cureus_template.css").first.to_param`
[19:46:08] za1b1tsu: tcopeland: Thank you
[19:46:08] brent__: I have that line inside a layout, which works local, yet break on production
[19:46:28] dionysus69: has joined #RubyOnRails
[19:47:16] daed: has joined #RubyOnRails
[19:55:50] orbyt_: has joined #RubyOnRails
[19:58:05] l_tonz: has joined #RubyOnRails
[19:59:04] arBmind: has joined #RubyOnRails
[20:15:21] xco: has joined #RubyOnRails
[20:17:09] xco: hi, i’m playing with image_tag, how can i experiment with this in the my terminal and be able to actually do something like image_tag("icon”)? i mean i need to directly access the #image_tag method in the console. i tried installing ationview as a gem and requiring it in the console, that does’t work
[20:17:42] mtkd: has joined #RubyOnRails
[20:24:04] sameerynho: has joined #RubyOnRails
[20:28:21] brent__: xco: helper.image_tag
[20:29:08] xco: brent__: you import that? :/
[20:29:12] xco: you mean*
[20:29:26] brent__: in my rails console
[20:29:57] brent__: i was just able to run helper.image_tag(string)
[20:30:45] brent__: and it returned the <img> tag in string format
[20:32:07] xco: right! let me try that. thanks
[20:33:22] dgsan: has joined #RubyOnRails
[20:40:38] et09: has joined #RubyOnRails
[20:41:06] et09: what possibilities are left if i'm getting a bunch of InvalidAuthenticityToken errors, but for each of them, there's a X-Csrf-Token
[20:41:18] et09: and a _csrf_token in the session
[20:41:37] et09: X-CSRF-TOKEN in the request headers **
[20:47:42] mikecmpbll: has joined #RubyOnRails
[20:47:59] brent__: whats the code thats making the request?
[20:49:15] orbyt_: has joined #RubyOnRails
[21:00:16] xco: has joined #RubyOnRails
[21:06:03] et09: it's all over the place. JS code
[21:06:10] et09: but they're all sending that header
[21:06:33] et09: my theory is someone reset a session in another window, and then it's sending the old csrf token or something? the session store is in a cookie
[21:10:23] bronson: has joined #RubyOnRails
[21:12:22] l_tonz: has joined #RubyOnRails
[21:16:56] NoGodDamnIdea: has joined #RubyOnRails
[21:17:40] weathermaker: has joined #RubyOnRails
[21:20:21] Andr3as: hello everyone.. i am getting a "SyntaxError: Unexpected token ," when opening up a page but dont know where the error is... is there a way to kinda verbuse the output and see where it crashs?
[21:20:31] Andr3as: *verbose, even
[21:27:30] weathermaker: has joined #RubyOnRails
[21:37:15] roshanavand: has joined #RubyOnRails
[21:48:58] brent__: Andr3as: local or production?
[21:49:14] Andr3as: hey brent__: dev env
[21:49:24] Andr3as: found this https://stackoverflow.com/questions/19325039/how-to-debug-a-rails-asset-precompile-which-is-unbearably-slow
[21:49:35] brent__: you should be able to see the stack trace in the server, no?
[21:50:23] gambl0re: has joined #RubyOnRails
[21:51:11] Andr3as: it just shows https://gist.github.com/awunder/73b43234dc071643dfbbd473f87ff481
[21:51:49] brent__: app/views/layouts/application.html.erb:9
[21:51:59] Andr3as: however, i was abt to call it... will digg deeper tomorrow, its almost 11pm
[21:52:11] Andr3as: yeah, that line imports all the JS
[21:52:19] brent__: can you copy that area of the file?
[21:52:22] Andr3as: its calling application.js
[21:52:25] brent__: a few lines aroudn it and put it in the gist
[21:53:26] Andr3as: <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
[21:53:35] Andr3as: execjs throws that error
[21:53:54] Andr3as: g2g, unfortunately.. thanks for your help, though
[21:59:37] marr: has joined #RubyOnRails
[22:03:49] weaksauce: has joined #RubyOnRails
[22:05:21] alfiemax: has joined #RubyOnRails
[22:14:05] SteenJobs: has joined #RubyOnRails
[22:15:13] _ritchie_: has joined #RubyOnRails
[22:22:31] mtkd: has joined #RubyOnRails
[22:25:32] Radar: GOOD MORNING
[22:31:57] tectonic: has joined #RubyOnRails
[22:38:58] mikecmpbll: has joined #RubyOnRails
[22:41:37] alfiemax: has joined #RubyOnRails
[22:46:15] srruby: has joined #RubyOnRails
[22:46:34] srruby: Do I need to use passenger in production? I'm using nginx
[22:50:18] havenwood: srruby: You don't need to, as there are many other options, but it's a fine choice.
[22:50:55] havenwood: srruby: Passenger uniquely allows you to use an Nginx module directly instead of reverse proxying to your Ruby webserver, if that's what you'd like to do.
[22:51:05] havenwood: srruby: The Rails default is Puma.
[22:51:23] havenwood: srruby: With Puma you'd reverse proxy to the port or socket Puma is running on.
[22:51:31] srruby: havenwood: Thanks
[22:51:35] havenwood: (From Nginx.)
[23:05:14] l_tonz: has joined #RubyOnRails
[23:11:17] dviola: has joined #RubyOnRails
[23:11:54] bronson: has joined #RubyOnRails
[23:12:25] l_tonz: has joined #RubyOnRails
[23:16:44] orbyt_: has joined #RubyOnRails
[23:31:25] blindMoe: has joined #RubyOnRails
[23:32:50] blindMoe: with jsonapi-resources, I have a simple has_many through relation that I want to be able to update (employee has many locations through employee_locations ) but when I send the relationship data with an employee create or update I get a 'employee-locations - is invalid' 500 error returned from jsonapi-resource. Anyone ran into this situation before when updating many to many types of relationship
[23:45:26] alfiemax: has joined #RubyOnRails
[23:53:37] conceivably: has joined #RubyOnRails
[23:54:59] Scient: has joined #RubyOnRails
[23:55:35] tcopeland: has joined #RubyOnRails