« Back to channel list

#RubyOnRails - 28 March 2017

« Back 1 day Forward 1 day »
[00:01:09] xnxq: has joined #RubyOnRails
[00:02:08] blackmesa: has joined #RubyOnRails
[00:03:27] zeddan: has joined #RubyOnRails
[00:09:30] sunya7a: I'm getting a UnknownPrimaryKey error when attempting to update a join table. migration and models are in here: https://gist.github.com/anonymous/5ec0962aac9c7e20a77df7ea6f460433
[00:10:25] sunya7a: earlier I was using paranoia gem and placed acts_as_paranoid on the join table. after a discussion I realized I didn't need it and removed it and changed the migration to rmeove the deleted_at column, but now I get this error. Could someone explain why?
[00:11:26] sunya7a: acts_as_paranoid in the model for the join table*
[00:12:19] djbkd: has joined #RubyOnRails
[00:13:55] rakm: has joined #RubyOnRails
[00:20:33] uxp: has joined #RubyOnRails
[00:21:03] whytaunt: has joined #RubyOnRails
[00:22:02] whytaunt: has joined #RubyOnRails
[00:28:53] sypheren: has joined #RubyOnRails
[00:33:20] am55: has joined #RubyOnRails
[00:39:12] xnxq: has joined #RubyOnRails
[00:39:49] Yzguy: has joined #RubyOnRails
[00:40:17] Yzguy: Quick question:
[00:40:36] Yzguy: I've seen people use like text_field, and then I've seen people use text_field_tag.
[00:42:50] Yzguy: oh i see the _tag ones are for things that aren't apart of a model?
[00:44:15] brent__: has joined #RubyOnRails
[00:45:50] Technodrome: has joined #RubyOnRails
[00:52:49] centrx: has joined #RubyOnRails
[00:54:59] hays_: has joined #RubyOnRails
[00:57:04] naprimer_2: has joined #RubyOnRails
[00:57:55] quazimodo: has joined #RubyOnRails
[01:00:46] GodFather: has joined #RubyOnRails
[01:01:26] superlou: has joined #RubyOnRails
[01:03:03] xnxq: has joined #RubyOnRails
[01:04:38] agent_white: has joined #RubyOnRails
[01:04:51] daydream: has joined #RubyOnRails
[01:06:25] rubyonrails374: has joined #RubyOnRails
[01:06:43] pwnd_nsfw: has joined #RubyOnRails
[01:08:15] rubyonrails374: Hi folks, Im somewhat of a beginner. I wrote an app, queries for reports are taking too long. I've noticed a particular query will take a lot longer when run as part of a process than when run individually. Also, within a process, the first several queries run fast, then its slows down. Any thoughts on how I can troubleshoot this?
[01:09:14] Rodya_: has joined #RubyOnRails
[01:09:35] daydream: has left #RubyOnRails: ()
[01:10:56] davedo321: has joined #RubyOnRails
[01:11:09] roamingdog: has joined #RubyOnRails
[01:11:40] gusrub: has joined #RubyOnRails
[01:14:34] harryc: has joined #RubyOnRails
[01:16:10] zero1one0: has joined #RubyOnRails
[01:19:59] bawsky: has joined #RubyOnRails
[01:21:25] Rodya__: has joined #RubyOnRails
[01:24:03] patarr1: has joined #RubyOnRails
[01:24:31] harrycee: has joined #RubyOnRails
[01:24:40] nickjj_: has joined #RubyOnRails
[01:27:07] wsmoak: has joined #RubyOnRails
[01:27:18] ecook: has joined #RubyOnRails
[01:27:22] Lloyd: has joined #RubyOnRails
[01:29:28] Yzguy: has joined #RubyOnRails
[01:29:38] jsilver: has joined #RubyOnRails
[01:30:14] jsilver: say I have an array of hashes, with id keys in it, and I have another string "id, id, id, id". how do I sort the array of hashes by that list of ids?
[01:31:14] erlend: has joined #RubyOnRails
[01:31:16] DarkBushido: has joined #RubyOnRails
[01:31:16] DarkBushido: has joined #RubyOnRails
[01:31:39] xibalba: has joined #RubyOnRails
[01:32:37] segy: has joined #RubyOnRails
[01:32:38] leeky: has joined #RubyOnRails
[01:32:59] leslie: has joined #RubyOnRails
[01:32:59] leslie: has joined #RubyOnRails
[01:33:09] lele: has joined #RubyOnRails
[01:33:59] roamingdog: has joined #RubyOnRails
[01:35:09] buckrockwell: has joined #RubyOnRails
[01:36:11] GodFather: has joined #RubyOnRails
[01:38:59] daydream: has joined #RubyOnRails
[01:42:33] jeyraof^mbpr: has joined #RubyOnRails
[01:43:26] harryc: has left #RubyOnRails: ()
[01:43:39] ekinmur: has joined #RubyOnRails
[01:54:37] hahuang61: has joined #RubyOnRails
[02:02:36] rubyonrails374: @jsilver do array_of_hashes.sort{|a,b| your_string.index(a.keys.first) <=> your_string.index(b.keys.first)}
[02:02:51] Radar: rubyonrails374: they're gone.
[02:03:01] Radar: and in other news, they're also banned from this channel for being a long term troll
[02:03:28] Pumukel: has joined #RubyOnRails
[02:03:31] rubyonrails374: Ah! ok. Thanks for letting me know
[02:03:45] rubyonrails374: Is <Radar> a real person or a bot?
[02:03:55] Radar: Unknown at this stage.
[02:04:15] Radar: HELPA HAS SPOKEN
[02:04:29] Radar: HELPA HAS SPOKEN AGAIN
[02:05:23] libastral: has joined #RubyOnRails
[02:05:34] rubyonrails374: Do either of you have any thoughts on my question above about slow queries?
[02:05:58] Radar: rubyonrails374: Can you run it locally with production data and inspect the SQL queries which are generated? Perhaps one of those is slow?
[02:06:57] rubyonrails374: Yes, Im running it locally. DB is in AWS
[02:07:12] rubyonrails374: Event Load (106.3ms) SELECT "events".* FROM "events" WHERE "events"."product_id" = $1 AND "events"."type" = $2 ORDER BY "events"."effective_date" DESC LIMIT $3 [["product_id", 124], ["type", "ManualChange"], ["LIMIT", 1]]
[02:07:19] Radar: Seems long.
[02:07:21] rubyonrails374: Event Load (15.2ms) SELECT "events".* FROM "events" WHERE "events"."product_id" = $1 AND "events"."type" = $2 ORDER BY "events"."effective_date" DESC LIMIT $3 [["product_id", 124], ["type", "ManualChange"], ["LIMIT", 1]]
[02:07:29] Radar: Seems not as long.
[02:07:43] Radar: Is there an index on product_id + type?
[02:07:49] rubyonrails374: I can't figure out why there is such a big difference with the same exact querie
[02:07:52] Radar: DB is PostgreSQL from the looks of things.
[02:08:19] brendan6: has joined #RubyOnRails
[02:08:22] rubyonrails374: Long example is when I run as part of a long process that does a bunch of things many times
[02:08:34] Radar: Can you show me the index?
[02:08:59] Radar: Also: show me the output from EXPLAIN ANALYZE SELECT "events".* FROM "events" WHERE "events"."product_id" = 124 AND "events"."type" = 'ManualChange' ORDER BY "events"."effective_date" DESC LIMIT 1
[02:09:23] rubyonrails374: t.index ["product_id"], name: "index_events_on_product_id", using: :btree
[02:09:43] Radar: Yes, that's on product_id. But you're doing a query on both product_id and type. So there'll need to be an index on both.
[02:09:48] hahuang61: Radar: you really keep busy between here and #elixir-lang huh? When do you have time to actually do anything else? :p
[02:09:57] Radar: t.index ["product_id", "type"]
[02:10:06] Radar: hahuang61: I don't speak as much in #elixir-lang as I do here :)
[02:10:19] Yzguy: has joined #RubyOnRails
[02:10:22] matthewd: "need" is a bit strong
[02:11:09] Radar: matthewd: I'm making a big assumption that there's lots of events in the table and so the reason for these queries being slow is because the index isn't present.
[02:11:24] rubyonrails374: Radar, yes you are right about the type index. I'll add, but in both cases above, there is no index for this
[02:11:37] Radar: rubyonrails374: Output of the EXPLAIN ANALYZE please.
[02:12:18] rubyonrails374: What is EXPLAIN ANALYZE? Im not familiar
[02:12:22] Radar: [13:08:58] <Radar> Also: show me the output from EXPLAIN ANALYZE SELECT "events".* FROM "events" WHERE "events"."product_id" = 124 AND "events"."type" = 'ManualChange' ORDER BY "events"."effective_date" DESC LIMIT 1
[02:12:36] Radar: Run this query on your database through a psql prompt (rails dbconsole _should_ bring one up)
[02:15:45] Radar: thank you
[02:15:49] rubyonrails374: not sure what Im doing
[02:16:00] Radar: 1. rails dbconsole
[02:16:01] Radar: 2. EXPLAIN ANALYZE SELECT "events".* FROM "events" WHERE "events"."product_id" = 124 AND "events"."type" = 'ManualChange' ORDER BY "events"."effective_date" DESC LIMIT 1
[02:16:06] Radar: 3. Copy the output into gist.github.com
[02:16:09] Radar: 4. Post the link here.
[02:16:24] roamingdog: there's your answer, he is a robot :)
[02:16:58] roamingdog: to efficient for wetware
[02:18:33] rubyonrails374: Im getting not output
[02:19:38] Radar: rubyonrails374: I missed a semi-colon at the end.
[02:19:44] Radar: EXPLAIN ANALYZE SELECT "events".* FROM "events" WHERE "events"."product_id" = 124 AND "events"."type" = 'ManualChange' ORDER BY "events"."effective_date" DESC LIMIT 1;
[02:21:50] rubyonrails374: https://gist.github.com/gs2589/a969b4ab7335c41f03dd2bfa64951d39
[02:23:05] Radar: Ok, so what happens if you add an index which is for both product_id and type? i.e. index [:product_id, :type] ?
[02:23:08] Radar: Does that speed up the queries any?
[02:24:05] rubyonrails374: btw, there are 17175 events in the table
[02:24:52] matthewd: Hmm... that doesn't seem like enough to slow it down :/
[02:26:25] matthewd: Might be worth trying to do the explain in-line, in the place where it gets slow
[02:26:56] jeyraof^mbpr: has joined #RubyOnRails
[02:27:36] MrJoshua: has joined #RubyOnRails
[02:31:05] rubyonrails374: Ok, so I just added the index
[02:31:06] rubyonrails374: Event Load (32.4ms) SELECT "events".* FROM "events" WHERE "events"."product_id" = $1 AND "events"."type" = $2 ORDER BY "events"."effective_date" DESC LIMIT $3 [["product_id", 124], ["type", "ManualChange"], ["LIMIT", 1]]
[02:31:17] fschuindt: has joined #RubyOnRails
[02:31:33] rubyonrails374: Running it by itself
[02:32:02] fschuindt: There's any option to pass to friendly_id to not generate any route to a slug? I can't find it.
[02:32:40] matthewd: Rails.logger.info ActiveRecord::Base.connection.exec_query("EXPLAIN ANALYZE ..etc..").map(&:values).join("\n") # I think?
[02:33:01] rubyonrails374: I think that the slowness is related to the fact that I am using an AWS db, connected to my dev environment
[02:33:12] matthewd: I don't think the built-in explain method supports analyze
[02:33:29] Radar: rubyonrails374: yes, that could be it. The `EXPLAIN ANALYZE` will point to slowness in the DB itself, not latency.
[02:33:35] Radar: I think AR would report latency in its figure.
[02:33:52] rubyonrails374: Do the times printed by AR include latency?
[02:34:21] rubyonrails374: Yea- so I think that is the cause
[02:34:36] rubyonrails374: What are some strategies to improve latency?
[02:34:41] Radar: move closer
[02:35:03] Technodrome: has joined #RubyOnRails
[02:35:10] hahuang61: this is the optimal solution.
[02:35:41] buckrockwell: has joined #RubyOnRails
[02:35:44] matthewd: I don't see how latency would create the predictable difference you're describing, though
[02:35:55] Radar: latency should remain the same across all queries.
[02:36:17] Radar: i.e. if I ping GitHub my latency is on average 230ms.
[02:36:40] Radar: So if I made a call to their API I could expect it to take 230ms minimum.
[02:37:40] rubyonrails374: Yea, I also notice that within a process, where I run a bunch of DIFFERENT queries, the query times increase as more of the queries are run. However if I do "10000.times do 'query' end ", the times stay consistently around 20 ms
[02:38:13] helpa: ¯\_(ツ)_/¯ Sorry, Radar is not able to help you any further as they do not know.
[02:38:20] Radar: Hard to see without actually being there.
[02:38:26] Radar: (i.e. moving closer)
[02:38:44] matthewd: rubyonrails374: Try adding the log call I showed above
[02:38:47] s2013: has joined #RubyOnRails
[02:39:25] matthewd: rubyonrails374: Also, try arranging for the [identical] query to occur a couple of times in a row, each time it currently happens once
[02:42:09] Guest96_: has joined #RubyOnRails
[02:46:30] rubyonrails374: Thanks for your help.
[02:46:36] rubyonrails374: Ill try these things out
[02:51:58] dopie: has joined #RubyOnRails
[02:52:07] marcdel: has joined #RubyOnRails
[02:55:49] Jameser: has joined #RubyOnRails
[02:56:57] irishfromua: has joined #RubyOnRails
[03:07:42] irishfromua: has joined #RubyOnRails
[03:08:30] rakm: has joined #RubyOnRails
[03:11:18] Radar: matthewd: Fixed up the formatting of the rules Gist and learned something about GFM in the process: https://github.com/github/cmark/issues/16
[03:12:44] matthewd: I'm surprised more weren't caught by that change
[03:13:11] Radar: Maybe everyone else knows to indent correct ;)
[03:13:14] Radar: correctly*
[03:14:50] Aeyris: After writing in Inkdrop for the past year or so I've become intimately acquainted with Markdown.
[03:15:08] Aeyris: Four space indenting everywhere solves most problems.
[03:15:15] Aeyris: And double lines almost everywhere.
[03:22:02] Warlock198x: has joined #RubyOnRails
[03:22:55] fschuindt: has joined #RubyOnRails
[03:31:24] davedo321: has joined #RubyOnRails
[03:37:54] hahuang61: has joined #RubyOnRails
[03:47:38] choke: has joined #RubyOnRails
[03:48:09] IRCFrEAK: has joined #RubyOnRails
[03:48:35] IRCFrEAK: has left #RubyOnRails: ()
[03:48:47] Jasaka: has joined #RubyOnRails
[03:49:26] nickjj_: has joined #RubyOnRails
[03:50:39] Warlock198x: has joined #RubyOnRails
[03:51:13] knight33: has joined #RubyOnRails
[03:52:09] Shidash: has left #RubyOnRails: ()
[03:54:03] jusa: has joined #RubyOnRails
[04:02:13] xnxq: has joined #RubyOnRails
[04:04:10] djbkd: has joined #RubyOnRails
[04:05:49] choke: has joined #RubyOnRails
[04:11:26] Rodya_: has joined #RubyOnRails
[04:19:08] icharlie: has joined #RubyOnRails
[04:20:59] srinidhi: has joined #RubyOnRails
[04:21:37] Jameser: has joined #RubyOnRails
[04:28:36] brendan6: has joined #RubyOnRails
[04:43:44] shinnya: has joined #RubyOnRails
[04:45:33] Pumukel: has joined #RubyOnRails
[04:47:42] _Sypheren: has joined #RubyOnRails
[04:49:47] pulkit4tech: has joined #RubyOnRails
[05:11:58] Rodya_: has joined #RubyOnRails
[05:15:03] jenrzzz: has joined #RubyOnRails
[05:18:06] username1: has joined #RubyOnRails
[05:19:36] zeddan: has joined #RubyOnRails
[05:31:02] Qchmqs: has joined #RubyOnRails
[05:38:44] hahuang61: has joined #RubyOnRails
[05:40:27] jenrzzz: has joined #RubyOnRails
[05:40:28] jenrzzz: has joined #RubyOnRails
[05:44:50] willardg: has joined #RubyOnRails
[05:45:17] pankaj_: has joined #RubyOnRails
[05:48:32] igniting: has joined #RubyOnRails
[05:48:37] drale2k: has joined #RubyOnRails
[06:04:35] byteflame: has joined #RubyOnRails
[06:08:44] willardg: I have this exact same issue except when action_mailer.perform_deliveries = false I get a 302 but no message sent, when it's set to true I get a 500 error.
[06:08:51] willardg: http://stackoverflow.com/questions/26294739/ruby-on-rails-mailer-not-sending-email-in-development-mode
[06:09:48] drale2k: has joined #RubyOnRails
[06:12:28] willardg: Does anyone have any experience with anything like this? I keep thinking there must be something set to turn off sending emails in development, but I can't find anything.
[06:13:19] Rodya_: has joined #RubyOnRails
[06:13:29] defsdoor: has joined #RubyOnRails
[06:15:31] cam27_: has joined #RubyOnRails
[06:16:37] WinterBluFox: has joined #RubyOnRails
[06:17:51] Pankaj2: has joined #RubyOnRails
[06:18:26] Andr3as: willardg: http://stackoverflow.com/a/4611837/6844761
[06:18:48] Andr3as: it might help to config the log_level to a bit of a more verbose level..
[06:19:03] Andr3as: might be a authentication issue with your mail server...
[06:19:14] pLaTo0n: has joined #RubyOnRails
[06:19:47] willardg: Thanks, I'll look into that.
[06:23:39] jenrzzz: has joined #RubyOnRails
[06:23:40] jenrzzz: has joined #RubyOnRails
[06:24:04] xibalba: has joined #RubyOnRails
[06:24:31] Cohedrin: has joined #RubyOnRails
[06:30:52] lubekpl: has joined #RubyOnRails
[06:31:25] willardg: When I'm getting the 500 error I'm getting "EOFError - end of file reached:"
[06:31:58] willardg: again only when perform_deliveries is true
[06:32:37] Andr3as: http://stackoverflow.com/questions/36551205/rails-4-eoferror-end-of-file-reached-following-any-email-in-development-only
[06:37:02] darutoko: has joined #RubyOnRails
[06:37:40] green_hat: has joined #RubyOnRails
[06:38:35] buckrockwell: has joined #RubyOnRails
[06:39:46] hahuang61: has joined #RubyOnRails
[06:40:16] jusa: has joined #RubyOnRails
[06:41:21] patarr: has joined #RubyOnRails
[06:42:09] AzaToth: has joined #RubyOnRails
[06:42:48] mark_66: has joined #RubyOnRails
[06:47:45] darutoko-: has joined #RubyOnRails
[06:50:01] Dfoolz: has joined #RubyOnRails
[06:52:25] zero1one0: has joined #RubyOnRails
[06:52:54] matthewd: willardg: If you're only planning to provide one line of the error per hour, you're unlikely to get a speedy resolution
[06:54:28] Andr3as: matthewd: ;) - could you maybe take a look at this? http://bit.ly/2ntKv6u
[06:54:59] Andr3as: i came up with a query like this: Action.where(actionable_id: @action_fields, actionable_type: 'ActionField').or(Action.where(actionable_id: @domain, actionable_type: 'Domain'))
[06:55:05] Andr3as: is this the best way to do it?
[06:55:09] irishfromua: has joined #RubyOnRails
[06:55:32] Andr3as: @actionfields is all the actionfields of that particular domain
[06:56:04] zero1one0: has joined #RubyOnRails
[06:56:47] Qchmqs: you're doing two queries at the same time
[06:56:50] matthewd: Action.where(actionable: [@domain, *@action_fields])
[06:57:16] matthewd: (assuming they're a single AR model and a collection/relation/array of AR instances, respectively)
[06:57:43] Andr3as: matthewd: and rails figures out this polymorphic thing by its own?
[06:58:37] Andr3as: man this is slick
[06:58:41] matthewd: Your version will certainly work.. just feels like you're fussing with lower level details than you should need to
[06:58:42] Andr3as: thank you so much!
[06:59:05] Andr3as: i was googling the hell out of it, yesterday.. couldnt come up with anything usefull
[07:03:13] Andr3as: matthewd: what does the asterisk stand for? or where could i read something about it?
[07:03:32] Andr3as: i still fail to find something on google
[07:03:43] matthewd: It's an array splat
[07:04:14] matthewd: a = [1, 2]; b = [0, *a]; b == [0, 1, 2]
[07:04:56] Andr3as: i see, thank you.. !
[07:05:02] matthewd: tbh, it might work without it -- maybe even better, if it's a Relation. I just went with the version I knew would work.
[07:05:37] Andr3as: undefined method `base_class' for ActionField::ActiveRecord_Associations_CollectionProxy:Class
[07:07:50] fmartingr: has joined #RubyOnRails
[07:08:54] sypheren: has joined #RubyOnRails
[07:12:06] matthewd: Ah okay.. pity.
[07:13:31] arBmind: has joined #RubyOnRails
[07:13:49] Rodya_: has joined #RubyOnRails
[07:17:59] brendan6: has joined #RubyOnRails
[07:20:02] zeddan: has joined #RubyOnRails
[07:21:11] spicerack: has joined #RubyOnRails
[07:23:30] vasilakisFiL: has joined #RubyOnRails
[07:23:33] jenrzzz: has joined #RubyOnRails
[07:23:45] vasilakisFiL: does anyone know how I cam make Rails NOT to include helpers on views ?
[07:23:46] pulkit4tech: has joined #RubyOnRails
[07:24:21] Andr3as: vasilakisfil: http://stackoverflow.com/a/1756444/6844761
[07:26:20] Sylario: has joined #RubyOnRails
[07:31:09] antgel: has joined #RubyOnRails
[07:31:36] artto: has joined #RubyOnRails
[07:34:39] matthewd: vasilakisfil: Helpers exist to be included in views; if you don't want that, you probably don't want to define them as helpers.
[07:35:19] byteflame: has joined #RubyOnRails
[07:35:58] Andr3as: matthew, you have another minute? https://gist.github.com/awunder/4c709e8f9a9437744ebe7e49297d5d76
[07:36:34] Andr3as: i thought i'd roll "my own" (read shamelessly taken from railscast) nested form technique
[07:37:03] Andr3as: it went great until i decided to show not only this objects actions but also the actions of its "children actionfields"
[07:37:52] Andr3as: now, it complains that there is no action with an id of 10 for that particular domain, which is correct as this is the action from a "child actionfield"
[07:38:20] Andr3as: is there a way to somehow tell him its gonna be ok, its the action from where else..?
[07:39:20] aganov: has joined #RubyOnRails
[07:42:04] matthewd: Don't know much about nested attributes, sorry.. but it seems to be objecting to what you're setting in achievements_attributes. So I guess there's something in there that shouldn't be?
[07:43:14] Andr3as: hmm.. it all went fine when i was showing the direct children
[07:43:20] Andr3as: so, the domains actions
[07:43:55] Andr3as: now, with the actions from the domain's actionfields, the error came up
[07:44:32] Andr3as: same thing applies for achievements..
[07:47:04] xibalba: has joined #RubyOnRails
[07:47:05] Andr3as: found soething http://stackoverflow.com/a/23952559/6844761
[07:47:22] Andr3as: i gotta explicitly assign the domain id to all my actions.. hmpf
[07:47:27] Andr3as: i wanted to avoid that
[07:49:54] r3vDev: has joined #RubyOnRails
[07:50:13] keerthana: has joined #RubyOnRails
[07:53:31] willardg: Andr3as, are you trying to only allow a selection of attributes in the achievements_attributes object to be accessible through domain? I have never run into any issues just setting it like this.
[07:53:32] willardg: https://gist.github.com/anonymous/2fe27465ca57a51360c987b0c44fba5d
[07:54:29] Andr3as: willardg: no, every attribute would be fine
[07:54:52] Andr3as: but he complains abt the action which is no direct child but the child of a domain's chicld
[07:55:24] Andr3as: for the records: they all are loaded into the same table in the view.. if that somehow complicates things..
[07:57:16] Andr3as: looking like this https://www.screencast.com/t/ioPbhw7Seb5m
[07:58:40] snickers: has joined #RubyOnRails
[07:58:45] Andr3as: willardg: i've changed the strong_parameters to your suggestion and it works!!
[07:59:05] Andr3as: i thought i have to explicitely allow each of 'em..(?)
[07:59:24] willardg: Nope, and one of the nice benefits is it remembers the association
[07:59:29] artto: has joined #RubyOnRails
[07:59:52] Andr3as: thanks a lot! - also matthewd, thanks for looking into this..
[08:00:11] Andr3as: willardg: which is exactly what i'd been after ;)
[08:00:12] willardg: You might also be able to use something like this in your form view
[08:00:13] willardg: <%= f.fields_for :achievements do |ff| %>
[08:00:35] Andr3as: that didnt work as it only included the direct children (achievements/actions)
[08:00:42] Andr3as: but not those from the actionfields
[08:00:46] Andr3as: i had this before...
[08:02:58] tvw: has joined #RubyOnRails
[08:03:38] Andr3as: willardg: strange issue
[08:03:53] willardg: Andr3as What's that?
[08:04:01] Andr3as: when creating a new entry, it doesnt save and comes up with
[08:04:02] Andr3as: Unpermitted parameters: action_fields_attributes, achievements_attributes, actions_attributes
[08:04:25] Andr3as: however, they are permitted
[08:04:42] willardg: Let me look at your gist again
[08:05:01] Andr3as: lemme update it with the current permitted ones
[08:05:46] Andr3as: done, pls refresh
[08:09:25] User458764: has joined #RubyOnRails
[08:10:27] willardg: pretty sure the accepts_nested_attributes_for in domain.rb should be singular
[08:11:10] Andr3as: well, it worked until i included the children's children
[08:11:35] mikecmpbll: has joined #RubyOnRails
[08:12:03] Andr3as: and making it singular, it comes up with "No association found for name `action_field'."
[08:12:25] Andr3as: and has_many gotsta be plural
[08:13:01] czerasz: has joined #RubyOnRails
[08:13:40] artto: has joined #RubyOnRails
[08:13:55] Technodrome: has joined #RubyOnRails
[08:14:04] willardg: I'll take another look at it in the morning if you haven't gotten it by then. 1am is a bit late for me. best of luck
[08:14:05] Andr3as: looks like you gotta whitelist explicitly... http://stackoverflow.com/a/17812424/6844761
[08:14:18] Andr3as: sure, thank you, willardg
[08:14:22] Andr3as: good night :)
[08:14:27] gloscombe: has joined #RubyOnRails
[08:14:33] Andr3as: its 10:14am here.. so, i am still fresh ;)
[08:15:20] Androsfat: has joined #RubyOnRails
[08:15:42] willardg: Andr3as I'd be happy to hear how it comes out if you get it before I'm back
[08:16:04] Rodya_: has joined #RubyOnRails
[08:17:34] artto: has joined #RubyOnRails
[08:17:53] jsrn_: has joined #RubyOnRails
[08:18:30] keerthana: has joined #RubyOnRails
[08:22:22] Androsfat: has left #RubyOnRails: ("Leaving")
[08:24:19] bronson_: has joined #RubyOnRails
[08:24:23] dionysus69: has joined #RubyOnRails
[08:28:48] brendan6: has joined #RubyOnRails
[08:29:01] conta: has joined #RubyOnRails
[08:33:26] linnal: has joined #RubyOnRails
[08:40:34] hahuang61: has joined #RubyOnRails
[08:41:02] b0mbnet: has joined #RubyOnRails
[08:42:17] patarr: has joined #RubyOnRails
[08:45:30] banisterfiend: has joined #RubyOnRails
[08:51:36] pwnd_nsfw`: has joined #RubyOnRails
[08:57:51] linnal: has joined #RubyOnRails
[08:58:44] doublemalt_: has joined #RubyOnRails
[09:04:06] workmad3: has joined #RubyOnRails
[09:04:40] arBmind: has joined #RubyOnRails
[09:06:55] blackmesa: has joined #RubyOnRails
[09:07:10] rgr: has joined #RubyOnRails
[09:09:34] fxa: has joined #RubyOnRails
[09:09:55] jokke: anyone use sentry in their rails apps for frontend error tracking?
[09:09:56] marr: has joined #RubyOnRails
[09:10:25] jokke: if so, do you know how to take care of the missing source maps problem in production?
[09:10:48] jokke: errors aren't very helpful if they point to minified javascript... :/
[09:16:24] drale2k: has joined #RubyOnRails
[09:16:38] Rodya_: has joined #RubyOnRails
[09:18:34] lxsameer: has joined #RubyOnRails
[09:20:40] srinidhi: has joined #RubyOnRails
[09:21:20] keerthana: has joined #RubyOnRails
[09:22:55] brendan6: has joined #RubyOnRails
[09:23:00] zeddan: has joined #RubyOnRails
[09:32:26] jenrzzz: has joined #RubyOnRails
[09:32:26] jenrzzz: has joined #RubyOnRails
[09:35:18] matthewd: jokke: sprockets master allegedly generates sourcemaps
[09:35:41] jusa: has joined #RubyOnRails
[09:42:01] snickers: has joined #RubyOnRails
[09:42:21] fxa90id: has joined #RubyOnRails
[09:43:55] rgr_: has joined #RubyOnRails
[09:44:43] jokke: matthewd: hmm yeah. it's a legacy project though.. rails 4
[09:44:58] jokke: i doubt i could just update sprockets to git master
[09:45:12] handicraftsman: has joined #RubyOnRails
[09:45:45] matthewd: They're versioned separately, so there's a reasonable chance
[09:46:03] jokke: i'll give it a shot
[09:46:13] artto: has joined #RubyOnRails
[09:46:31] matthewd: Newer sprockets does have some performance issues, depending on how you use it.. but yeah, at least worth a try & comparison
[09:47:59] zpe: has joined #RubyOnRails
[09:48:40] workmad3: looking at constraints, it seems that rails 4 needs sprockets-rails ~> 2.0, sprockets-rails 2.8 can go up to sprockets 3.x
[09:49:12] workmad3: so not sure you'd be able to grab master (which is currently on 4.0 beta releases) without issues
[09:49:45] workmad3: err, sprocket-rails 2.3 even
[09:50:07] workmad3: (mixed up a sprocket-rails version and a sprockets version there :) )
[09:50:19] marahin: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[09:51:13] matthewd: sprockets-rails 3.2 claims compatibility with actionpack 4.0, so if we believe that, you could make it work
[09:51:15] jusa: has joined #RubyOnRails
[09:52:01] matthewd: .. the ease of doing so depends on whether you're on 4.2, or an earlier 4.x series
[09:53:08] matthewd: You should *really* be on the latest patch release of whatever series you're on (so 4.2.8, in that case)
[09:53:22] workmad3: oh, 4.2 drops the sprocket-rails constraints, missed that :)
[09:53:33] jokke: you're right
[09:54:15] matthewd: workmad3: And prior to that, it would just be a matter of dropping the rails gem, in favour of directly listing the subordinate ones
[09:54:36] workmad3: matthewd: bleh, you just reminded me that I've got to update a nasty monolith to rails 4.2 in the next week or so :(
[09:57:10] jokke: can you explain this behavior? Time.use_zone('UTC') { Time.parse('2017-03-28 11:55') }.zone #=> 'CEST'
[09:58:05] blackmesa: has joined #RubyOnRails
[09:59:50] jokke: or do you know of a way to parse a time in a specific zone?
[10:00:42] jokke: unfortunately i can't use +0200 or something like that since that will break when DST is over
[10:00:45] aajjbb: has joined #RubyOnRails
[10:01:05] ravster: has joined #RubyOnRails
[10:01:06] jokke: (it just broke because i used +0100 and we now have frickin' DST
[10:01:30] workmad3: jokke: `Time.zone.parse`
[10:01:32] matthewd: jokke: I just found the answer in the first Google hit for 'rails parse in time zone'
[10:01:33] workmad3: (inside the block)
[10:01:55] elaptics: has joined #RubyOnRails
[10:01:58] jokke: thank you
[10:02:53] ferr1: has joined #RubyOnRails
[10:04:30] matthewd: workmad3: As long as it's already on 4.0/4.1, I don't think those transitions were terribly involved
[10:05:16] matthewd: There's always Stuff, of course.. but nothing like the bigger ones
[10:05:55] workmad3: matthewd: yeah, it shouldn't be too large... and there's been attempts before on this codebase too (they got rolled back due to PG memory issues, but they reared their head a while ago on 4.1 too and are mostly tackled now)
[10:07:58] KorriX: has joined #RubyOnRails
[10:11:09] Ergo: has joined #RubyOnRails
[10:11:10] mikecmpbll: has joined #RubyOnRails
[10:15:03] tvw: has joined #RubyOnRails
[10:17:02] hexkey[m]: has joined #RubyOnRails
[10:17:28] Rodya_: has joined #RubyOnRails
[10:20:09] eugr: has joined #RubyOnRails
[10:20:47] AimlessRAven: has joined #RubyOnRails
[10:21:26] eugr: I am escaping user input and then running twitter-text's auto_link_urls on it, but unfortunately if a URL contains a & character, or any special character like ' (which turns into &apos;), it becomes double escaped and the URL breaks. What can I do to fix this?
[10:21:46] r3vDev: has joined #RubyOnRails
[10:21:53] eugr: using HTMLEntities.new.encode on the user input
[10:22:02] AimlessRAven: hi all, i have ransack search input and find posts by title_cont: params[:term] for example. In localhost it doesent event matter what letter case i used. Evryone workds good, but in production ransack make differences between test and Test if post title is Test ransack expect Test and cannot find result with test
[10:25:17] srinidhi: has joined #RubyOnRails
[10:28:48] hahuang61: has joined #RubyOnRails
[10:36:19] jusa: has joined #RubyOnRails
[10:36:36] Fernando-Basso: has joined #RubyOnRails
[10:38:45] Fernando-Basso: has joined #RubyOnRails
[10:39:31] itsgokul: has joined #RubyOnRails
[10:40:12] buckrockwell: has joined #RubyOnRails
[10:43:12] patarr: has joined #RubyOnRails
[10:52:11] artto_: has joined #RubyOnRails
[10:56:31] artto: has joined #RubyOnRails
[11:05:05] pickle_: has joined #RubyOnRails
[11:08:43] username1: has joined #RubyOnRails
[11:08:59] zeddan: has joined #RubyOnRails
[11:13:16] artto: has joined #RubyOnRails
[11:14:39] |RicharD|: has joined #RubyOnRails
[11:18:07] Rodya_: has joined #RubyOnRails
[11:18:47] dionysus69: has joined #RubyOnRails
[11:34:05] jenrzzz: has joined #RubyOnRails
[11:34:20] artto: has joined #RubyOnRails
[11:37:56] artto: has joined #RubyOnRails
[11:40:48] jarr0dsz: has joined #RubyOnRails
[11:40:59] jarr0dsz: hello everyone, is there a way to output every view that is rendered?
[11:41:19] jarr0dsz: for debugging, in the ouput, in a before render action or somehow? i try to figure hit out but not really getting anywhere
[11:41:25] User458764: has joined #RubyOnRails
[11:41:39] jarr0dsz: i would want to output the name of every view so i can more faster find which one ( have complicated shared partial structure )
[11:42:29] adlerdias__: has joined #RubyOnRails
[11:43:17] bawsky: has joined #RubyOnRails
[11:43:41] blackmesa: has joined #RubyOnRails
[11:48:40] zacts: has joined #RubyOnRails
[11:50:04] pickle_: a view is usually rendered upon calling a controller, right?
[11:50:12] pickle_: a controller#method
[11:50:26] pickle_: how can you just output views without calling the methods?
[11:50:27] jarr0dsz: i now have something like https://gist.github.com/jordanlance/bdd70e1ed3dbbd1429bb494e1115366b which is the official render
[11:50:41] jarr0dsz: i want to output the name of the partial inside this rendering process not sure how
[11:50:49] jarr0dsz: it does view.send(method_name, locals, buffer, &block)
[11:50:55] jarr0dsz: to send the view to the browser/output
[11:51:41] WinterFox[m]: has joined #RubyOnRails
[11:51:41] mirkobenedetti[m: has joined #RubyOnRails
[11:51:42] igunublue[m]: has joined #RubyOnRails
[11:51:43] jarr0dsz: now how would i add the name to the partial to the output is that possible? must be doable im have terrible time searching each correct partial each time sick of it
[11:51:46] braidn[m]: has joined #RubyOnRails
[11:51:46] thulsa_legume[m]: has joined #RubyOnRails
[11:51:47] velu_aon[m]: has joined #RubyOnRails
[11:51:48] lukas_[m]: has joined #RubyOnRails
[11:51:52] vonagam[m]: has joined #RubyOnRails
[11:51:58] pickle_: i don't know
[11:54:02] mikecmpbll: has joined #RubyOnRails
[11:54:27] kristofferR: has joined #RubyOnRails
[11:57:25] artto: has joined #RubyOnRails
[11:58:17] nettoweb: has joined #RubyOnRails
[12:03:17] Jameser: has joined #RubyOnRails
[12:09:29] HoierM: has joined #RubyOnRails
[12:11:45] Sidoniuns: has joined #RubyOnRails
[12:12:37] Or1on: has joined #RubyOnRails
[12:14:56] Andr3as: has joined #RubyOnRails
[12:25:28] buckrockwell: has joined #RubyOnRails
[12:26:26] buckrockwell: has joined #RubyOnRails
[12:29:41] hahuang61: has joined #RubyOnRails
[12:34:37] zeddan: has joined #RubyOnRails
[12:35:47] jenrzzz: has joined #RubyOnRails
[12:35:49] iwada: has joined #RubyOnRails
[12:36:32] knight33: has joined #RubyOnRails
[12:39:24] jusa: has joined #RubyOnRails
[12:41:59] pickle_: has joined #RubyOnRails
[12:43:41] brent__: has joined #RubyOnRails
[12:44:06] patarr: has joined #RubyOnRails
[12:49:47] rogue_koder: has joined #RubyOnRails
[12:52:05] mkozjak: has joined #RubyOnRails
[12:52:45] artto: has joined #RubyOnRails
[12:53:11] mkozjak: post auth_refresh_url, body: { refresh_token: token } gives "DEPRECATION WARNING: Using positional arguments in integration tests has been deprecated". what's the proper way to insert body in a post request on built-in minitest integration test?
[12:54:55] xpl0iter: has joined #RubyOnRails
[12:55:34] pickle__: has joined #RubyOnRails
[12:56:05] srinidhi: has joined #RubyOnRails
[13:00:38] ramortegui: has joined #RubyOnRails
[13:01:59] GodFather: has joined #RubyOnRails
[13:02:21] mkozjak: ok, 'env' is the key for body :)
[13:02:34] artto: has joined #RubyOnRails
[13:05:50] pickle_: has joined #RubyOnRails
[13:07:36] spicerack: has joined #RubyOnRails
[13:10:47] cam27: has joined #RubyOnRails
[13:13:36] dionysus69: has joined #RubyOnRails
[13:14:31] rikkipitt: has joined #RubyOnRails
[13:14:38] srinidhi: has joined #RubyOnRails
[13:17:20] rikkipitt: hey guys, what's the best way of refactoring away clunky percentage calculations? i.e. data from different sources that can't just be added as a method to a model...
[13:17:24] rikkipitt: hope that makes sense
[13:19:55] Rodya_: has joined #RubyOnRails
[13:21:21] srinidhi: has joined #RubyOnRails
[13:22:27] davedo321: has joined #RubyOnRails
[13:22:42] agent_white: has joined #RubyOnRails
[13:25:12] Faradome: has joined #RubyOnRails
[13:27:36] Pumukel: has joined #RubyOnRails
[13:28:09] Pumukel: has joined #RubyOnRails
[13:28:22] kernelPaniq: has joined #RubyOnRails
[13:28:48] artto: has joined #RubyOnRails
[13:29:09] ekinmur: has joined #RubyOnRails
[13:31:11] buckrockwell: has joined #RubyOnRails
[13:31:18] agent_white: Mornin' folks
[13:32:26] srinidhi: has joined #RubyOnRails
[13:34:24] DLSteve: has joined #RubyOnRails
[13:37:25] centrx: has joined #RubyOnRails
[13:37:26] centrx: has joined #RubyOnRails
[13:42:59] shinnya: has joined #RubyOnRails
[13:45:46] s2013: has joined #RubyOnRails
[13:50:02] pLaTo0n: has joined #RubyOnRails
[13:50:51] brendan6: has joined #RubyOnRails
[13:53:20] solars: has joined #RubyOnRails
[13:53:46] solars: hi, does anyone know how to get the actual instance, when using rspecs any instance of?
[13:54:24] ldnunes: has joined #RubyOnRails
[13:56:46] brendan6: has joined #RubyOnRails
[13:57:26] brendan6: has joined #RubyOnRails
[14:00:16] zeddan: has joined #RubyOnRails
[14:00:38] r3zn0v: has joined #RubyOnRails
[14:00:49] buckrockwell: has joined #RubyOnRails
[14:01:26] buckrockwell: has joined #RubyOnRails
[14:04:07] xpl0iter: has joined #RubyOnRails
[14:05:21] Pumukel: has joined #RubyOnRails
[14:05:59] xpl0iter_: has joined #RubyOnRails
[14:06:00] pLaTo0n: has joined #RubyOnRails
[14:06:45] platoon23: has joined #RubyOnRails
[14:07:26] Rodya_: has joined #RubyOnRails
[14:07:28] mustmodify: has joined #RubyOnRails
[14:07:45] mustmodify: I'd appreciate feedback on this, and also retweets. https://twitter.com/mustmodify/status/846724894083702784
[14:08:49] patarr: has joined #RubyOnRails
[14:09:08] tercenya: has joined #RubyOnRails
[14:09:44] centrx: mustmodify: The link doesn't work
[14:09:51] centrx: mustmodify: Also you spelled your name wrong
[14:10:03] mustmodify: that's surprising.
[14:10:52] centrx: Should be Jonathan right?
[14:11:13] mustmodify: My mom did that to mess with people's heads, I guess.
[14:11:24] centrx: yeah your mom's cool
[14:11:25] mustmodify: seems like twitter is not responding...
[14:11:33] mustmodify: so that's ...
[14:11:47] mustmodify: Maybe my posting a link provided so much traffic they got swamped.
[14:12:10] centrx: you slashdotted twitter
[14:14:17] xpl0iter: has joined #RubyOnRails
[14:14:34] mustmodify: ok! try again.
[14:15:10] centrx: Do I have to?
[14:15:25] mustmodify: No, I'm not your mom.
[14:15:53] centrx: Still doesn't work. You need to talk to Trump, Master Twitterrer
[14:16:37] mustmodify: Hunh. Works for me.
[14:16:52] mustmodify: Does the link you see end with 784? Just trying to figure out what might be wrong.
[14:16:57] mustmodify: What happens when you click on it?
[14:17:01] pwnd_nsfw`: When you installed the incorrecet version of ruby on your pi, so now you have to wait for ruby binary and nokogiri to install. Just gonna leave it and come back tomorrow lol
[14:18:08] srinidhi: has joined #RubyOnRails
[14:19:01] Robin: has joined #RubyOnRails
[14:19:38] centrx: mustmodify: The Twitter link works. The link in the twittering does not
[14:22:13] Robin: Hello, sorry to bother. I cannot seem to find an example of how to use a regex in ruby. I know regexes just not how to execute them. Something like preg_match (like in php)? Thanks :D
[14:22:59] matthewd: Robin: "foo" =~ /oo/, or Regexp#match
[14:23:12] Robin: thanks, I will look that up!! Appreciated :D
[14:23:25] mustmodify: centrx: Oh.... do you have FA Pro? What error do you get?
[14:23:59] centrx: mustmodify: So you have to be subscribed to it for the link to work?
[14:24:03] centrx: mustmodify: Page not found
[14:25:15] envint: has joined #RubyOnRails
[14:25:36] ldnunes: has joined #RubyOnRails
[14:26:17] chouhoulis: has joined #RubyOnRails
[14:27:28] ekinmur_: has joined #RubyOnRails
[14:28:26] Faradome_: has joined #RubyOnRails
[14:30:09] User458764: has joined #RubyOnRails
[14:30:43] hahuang61: has joined #RubyOnRails
[14:31:51] linnal: has joined #RubyOnRails
[14:34:16] igniting: has joined #RubyOnRails
[14:36:35] jenrzzz: has joined #RubyOnRails
[14:36:35] jenrzzz: has joined #RubyOnRails
[14:36:48] snickers: has joined #RubyOnRails
[14:37:04] daydream: has joined #RubyOnRails
[14:39:43] artto_: has joined #RubyOnRails
[14:40:11] truenito: has joined #RubyOnRails
[14:40:23] blackmesa: has joined #RubyOnRails
[14:41:09] cek: has left #RubyOnRails: ()
[14:42:14] daydream: has joined #RubyOnRails
[14:42:31] zeddan: has joined #RubyOnRails
[14:48:37] zpe: has joined #RubyOnRails
[14:49:10] |RicharD|: has joined #RubyOnRails
[14:49:20] DaveTaboola: has joined #RubyOnRails
[14:50:06] mustmodify: Ah! Try this.
[14:50:16] mustmodify: @centrx: https://github.com/FortAwesome/Font-Awesome/issues/10854
[14:56:07] brendan^^: has joined #RubyOnRails
[15:00:29] pulkit4tech: has joined #RubyOnRails
[15:01:32] mustmodify: updated tweet linking to public repo: https://twitter.com/mustmodify/status/846738273238175746
[15:01:45] mustmodify: has left #RubyOnRails: ()
[15:02:14] ekinmur: has joined #RubyOnRails
[15:02:21] User458764: has joined #RubyOnRails
[15:04:37] choke: has joined #RubyOnRails
[15:04:44] Guest96: has joined #RubyOnRails
[15:05:56] xpl0iter_: has joined #RubyOnRails
[15:06:57] xpl0iter_: has joined #RubyOnRails
[15:16:23] jusa: has joined #RubyOnRails
[15:18:31] artto: has joined #RubyOnRails
[15:21:43] Fernando-Basso: has joined #RubyOnRails
[15:21:52] tenderlove: has joined #RubyOnRails
[15:24:14] blackmesa: has joined #RubyOnRails
[15:24:33] patarr1: has joined #RubyOnRails
[15:25:38] Fernando-Basso: has joined #RubyOnRails
[15:28:16] brendan6: has joined #RubyOnRails
[15:29:08] artto: has joined #RubyOnRails
[15:29:30] envint: has joined #RubyOnRails
[15:30:45] envint: has joined #RubyOnRails
[15:31:47] Andr3as: a couple hours later, another try.. if someone has some experience with 2-level-nested-forms... http://stackoverflow.com/questions/43065782/rails-nested-form-2-levels-in-one-table
[15:33:08] Yzguy: has joined #RubyOnRails
[15:33:22] pLaTo0n: has joined #RubyOnRails
[15:34:43] brendan6: has joined #RubyOnRails
[15:35:19] brendan6: has joined #RubyOnRails
[15:37:26] brent__: has joined #RubyOnRails
[15:37:38] jenrzzz: has joined #RubyOnRails
[15:37:38] jenrzzz: has joined #RubyOnRails
[15:37:42] daydream: has joined #RubyOnRails
[15:37:54] brendan6: has joined #RubyOnRails
[15:39:39] ResidentBiscuit: has joined #RubyOnRails
[15:41:00] brendan6: has joined #RubyOnRails
[15:41:33] brent__: has joined #RubyOnRails
[15:44:58] cagomez: has joined #RubyOnRails
[15:45:28] cagomez_: has joined #RubyOnRails
[15:49:47] User458764: has joined #RubyOnRails
[15:50:30] brendan6: has joined #RubyOnRails
[15:50:34] knight33: has joined #RubyOnRails
[15:52:06] brendan6: has joined #RubyOnRails
[15:56:54] brendan6: has joined #RubyOnRails
[15:57:14] Pumukel: has joined #RubyOnRails
[16:01:46] juggler: has joined #RubyOnRails
[16:05:23] username1: has joined #RubyOnRails
[16:06:40] xnxq: has joined #RubyOnRails
[16:08:10] Technodrome: has joined #RubyOnRails
[16:09:21] buckrockwell: has joined #RubyOnRails
[16:13:07] brendan^^: has joined #RubyOnRails
[16:15:03] xnxq: has joined #RubyOnRails
[16:17:07] brendan6: has joined #RubyOnRails
[16:17:29] cam27: has left #RubyOnRails: ()
[16:21:14] [Butch]: has joined #RubyOnRails
[16:22:33] bawsky: has joined #RubyOnRails
[16:23:21] gusrub: has joined #RubyOnRails
[16:24:01] xnxq: has joined #RubyOnRails
[16:25:00] buckrockwell: has joined #RubyOnRails
[16:27:05] xnxq: has joined #RubyOnRails
[16:27:41] KnownSyntax: has joined #RubyOnRails
[16:28:19] Rodya_: has joined #RubyOnRails
[16:29:00] Rodya__: has joined #RubyOnRails
[16:29:23] kristofferR: has joined #RubyOnRails
[16:29:36] JDeen: Hi guys... i would like your assistance on a schema i am writing... I have 3 classes. Address, Person, Organization... I was thinking to make Person belongs_to addrss and Organization belongs to address, but isn't the proper way to do is polymorphic associations?
[16:30:50] baweaver: jdeen: you're overcomplicating it
[16:31:30] baweaver: Person has_one Address and Organization has_one Address
[16:31:32] czerasz: has joined #RubyOnRails
[16:31:55] baweaver: (we won't mention that a person could have multiple addresses or an Organization multiple branches)
[16:34:33] envint: has joined #RubyOnRails
[16:38:08] jenrzzz: has joined #RubyOnRails
[16:43:30] doublemalt_: has joined #RubyOnRails
[16:47:44] Pumukel: has joined #RubyOnRails
[16:51:13] Pumukel: has joined #RubyOnRails
[16:54:01] xixi_: has joined #RubyOnRails
[16:56:58] Spami: has joined #RubyOnRails
[17:01:24] dminuoso: Mmm, is there a way to extract a users abilities from cancancan?
[17:01:32] hahuang61: has joined #RubyOnRails
[17:03:05] dminuoso: Ohh, Ability has a #as_json method.
[17:03:06] dminuoso: Nevermind. :)
[17:04:16] dminuoso: SystemStackError: stack level too deep
[17:04:18] dminuoso: I guess not..
[17:04:19] dminuoso: ACTION sighs
[17:04:47] daydream: has joined #RubyOnRails
[17:06:01] dengar007: has joined #RubyOnRails
[17:06:58] Clair89: has joined #RubyOnRails
[17:07:07] Technodrome: has joined #RubyOnRails
[17:07:08] Clair89: Hello hello, are there any people around with experience in Select2?
[17:08:37] User458764: has joined #RubyOnRails
[17:12:54] ejnahc: has joined #RubyOnRails
[17:14:35] hahuang65: has joined #RubyOnRails
[17:19:06] Andr3as: i've tried it but didnt really like it.. however, i did not really digg into it
[17:19:55] Andr3as: i went with vanilla jquery-ui autocomplete... at a text field
[17:20:17] Clair89: Thing is, I’m using Select2 with multiple set to true. This works perfectly, saves all the data in de DB etc. But now if I go to the edit view, the input fields shows empty. How can I fill this with the data in my DB?
[17:20:19] sunya7a: Hi. In my rails 5 app I'm attempting to restore a destroyed profile using recursive: true using paranoia gem. Here is my setup: https://gist.github.com/anonymous/fb677f31c4de618fa1bef2ce942af830. When restoring the profile, none of the associations are restored in the join table (which were correctly marked by active: NULL). Is there a mistake in my setup or is this a bug in the gem? I checked the issue tracker but don't see this common setup m
[17:20:50] gusrub: has joined #RubyOnRails
[17:21:02] defsdoor: has joined #RubyOnRails
[17:21:14] sunya7a: matthewd: I thought about what you asked yesterday, and I believe this is the behavior I'm looking for. Only now the restore doesn't work for me. sorry for the wall of text
[17:22:21] Andr3as: Clair89: no idea.. looks like someone had a similar issue and no one showed up... http://stackoverflow.com/questions/34187345/select2-automatically-adding-blank-value
[17:22:49] MittelDank: has joined #RubyOnRails
[17:23:28] Clair89: Yea, I found that post as well. Thanks for your help tho ^^
[17:25:07] Ebok: has joined #RubyOnRails
[17:25:30] Andr3as: Clair89: maybe this helps... http://stackoverflow.com/questions/8929230/why-is-the-first-element-always-blank-in-my-rails-multi-select-using-an-embedde
[17:26:05] cagomez: has joined #RubyOnRails
[17:26:51] nahtnam: has joined #RubyOnRails
[17:27:05] Cache_Money: has joined #RubyOnRails
[17:27:43] Clair89: I'm really thinking about how I should Google this issue, something like Rails Select2 initialize data from database or something
[17:28:25] Andr3as: if i understood that correctly its that rails kind of "inserts" a blank value and thatswhy you always see "nothing"
[17:28:57] gusrub: has joined #RubyOnRails
[17:30:15] pulkit4tech: has joined #RubyOnRails
[17:31:47] Clair89: http://stackoverflow.com/questions/16010455/load-values-in-select2-multiselect
[17:32:17] Clair89: This prefills the select2, but not in the field itself. It prefills them in the OPTIONS to select
[17:37:51] cnk: has joined #RubyOnRails
[17:38:56] gusrub: has joined #RubyOnRails
[17:42:19] jenrzzz: has joined #RubyOnRails
[17:42:19] jenrzzz: has joined #RubyOnRails
[17:43:05] ResidentBiscuit: I have an engine that is 100% read only. It provides a single route that just shows a list of things. When you click on a thing, you're redirected back to whatever route you've configured. If there's only one thing, it's supposed to just immediately redirect to that route. After working on this for a few days, I'm getting the feeling that this shou
[17:43:06] ResidentBiscuit: ldn't be an engine. I think it should just be a gem. There's absolutely zero logic in this engine. It was my boss' idea (who doesn't write rails code). Am I right in thinking that something like this does not deserve to be an engine?
[17:44:12] daydream: has joined #RubyOnRails
[17:48:05] adavia: has joined #RubyOnRails
[17:51:40] DrYockel: has joined #RubyOnRails
[17:53:23] Rodya_: has joined #RubyOnRails
[17:55:00] patarr1: Anyone here use delayed_job? Is there any way to get the exception thrown from a job when the Failed lifecycle callback is called?
[17:55:22] patarr1: Most of the lifecycle handlers just give job and worker. Not very useful when you have error and failure lifecycle callbacks....
[17:58:34] keerthana: has joined #RubyOnRails
[18:01:08] brendan-: has joined #RubyOnRails
[18:01:40] rakm: has joined #RubyOnRails
[18:01:40] chrisml: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[18:02:05] artto: has joined #RubyOnRails
[18:04:28] pLaTo0n: has joined #RubyOnRails
[18:08:16] ldnunes: has joined #RubyOnRails
[18:11:42] xnxq: has joined #RubyOnRails
[18:14:42] Faradome: has joined #RubyOnRails
[18:16:26] knight33: has joined #RubyOnRails
[18:18:44] tercenya: has joined #RubyOnRails
[18:20:16] brent__: has joined #RubyOnRails
[18:22:09] daydream: has joined #RubyOnRails
[18:27:41] cnk: has joined #RubyOnRails
[18:28:07] jenrzzz: has joined #RubyOnRails
[18:28:07] jenrzzz: has joined #RubyOnRails
[18:30:49] elaptics_: has joined #RubyOnRails
[18:31:21] brendan6: has joined #RubyOnRails
[18:32:58] Faradome_: has joined #RubyOnRails
[18:34:06] centrx: has joined #RubyOnRails
[18:34:38] meoblast001: has joined #RubyOnRails
[18:35:32] Technodrome: has joined #RubyOnRails
[18:36:43] Clair89: Any people around with experience in Select2? (repost)
[18:42:55] Fernando-Basso: has joined #RubyOnRails
[18:43:24] centrx: Clair89: Is it good
[18:43:51] sunya7a: I've submitted a bug report for the Paranoia gem: https://github.com/rubysherpas/paranoia/issues/394 . If anyone here could offer some insight to the issue it would be much appreciated. It might be as simple as an error in my setup or misunderstanding in how the gem works. shout out to radar who i believe is a contributor (beg)
[18:45:41] Faradome: has joined #RubyOnRails
[18:47:56] pLaTo0n: has joined #RubyOnRails
[18:53:28] Faradome_: has joined #RubyOnRails
[18:54:14] blackmesa: has joined #RubyOnRails
[18:54:55] gusrub: has joined #RubyOnRails
[19:00:04] drale2k: has joined #RubyOnRails
[19:03:39] renegadeandy: has joined #RubyOnRails
[19:03:58] chouhoul_: has joined #RubyOnRails
[19:04:10] brendan6: has joined #RubyOnRails
[19:04:56] futilegames: has joined #RubyOnRails
[19:05:02] SteenJobs: has joined #RubyOnRails
[19:05:06] chouhoul_: has joined #RubyOnRails
[19:05:13] futilegames: has left #RubyOnRails: ()
[19:05:30] renegadeandy: hey everyone. I am following the devise_rails starter application in the users controller it has ‘redirect_to :back, :alert => "Access denied.”’ - and when I hit this condition, i get an exception stating undefined method `back_url' for #<UsersController. This is straight out of the sample and has not been modified: https://github.com/RailsApps/rails-devise Am I being stupid or is this not working?
[19:08:23] [Butch]: has joined #RubyOnRails
[19:08:25] Duckily: has joined #RubyOnRails
[19:08:32] Duckily: I read something from DHH about having no more than 13 files in a folder one time and I can't find it, any ideas?
[19:09:32] naztharune: has joined #RubyOnRails
[19:10:54] wkoszek: has joined #RubyOnRails
[19:11:05] sloenrique: has joined #RubyOnRails
[19:11:17] xnxq: has joined #RubyOnRails
[19:12:17] brendan6: has joined #RubyOnRails
[19:15:55] brendan6: has joined #RubyOnRails
[19:19:00] umdstu: has joined #RubyOnRails
[19:19:38] umdstu: i some global variables declared in an initializer class. they seem to be accessible no problem from controllers, but my custom classes can't see them
[19:23:59] wkoszek: has joined #RubyOnRails
[19:24:40] centrx: umdstu: global variables?
[19:24:40] tvw: has joined #RubyOnRails
[19:26:31] [Butch]: has joined #RubyOnRails
[19:30:57] hakash: has joined #RubyOnRails
[19:31:19] cagomez: has joined #RubyOnRails
[19:32:16] envint: has joined #RubyOnRails
[19:32:41] zero1one0: has joined #RubyOnRails
[19:33:49] sunya7a: renegadeandy: can you try redirect_back instead of redirect_to :back
[19:34:01] SteenJobs_: has joined #RubyOnRails
[19:34:28] zero1one0: has joined #RubyOnRails
[19:35:25] sunya7a: renegadeandy: http://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_back
[19:36:27] daydream: has joined #RubyOnRails
[19:37:13] ahrs: has joined #RubyOnRails
[19:38:37] pLaTo0n: has joined #RubyOnRails
[19:39:40] amperry: Does the `after_update` callback need its own call to `self.save`? If not, I don't understand why a change in my model isn't being saved after I call one: https://gist.github.com/amp108/e053017805a4116c5d2103603c492e59
[19:39:41] brendan6: has joined #RubyOnRails
[19:40:38] Rodya_: has joined #RubyOnRails
[19:43:06] jenrzzz: has joined #RubyOnRails
[19:43:07] jenrzzz: has joined #RubyOnRails
[19:45:34] cagomez: has joined #RubyOnRails
[19:46:24] buckrockwell: has joined #RubyOnRails
[19:47:37] Yzguy: has joined #RubyOnRails
[19:50:10] amperry: hrm... thought `after_save` might be the way to go, but nope, same problem.
[19:50:46] chouhoulis: has joined #RubyOnRails
[19:56:06] dionysus69: can users upload files and images through same paperclip model?
[19:56:23] dionysus69: P.S. I am not planning to style image
[19:56:35] vasilakisFiL: has joined #RubyOnRails
[19:59:05] renegadeandy: would people recommend bootstrap 4 yet?
[19:59:09] renegadeandy: Or stick to bootstrap 3?
[19:59:52] rakm: amperry what verison of rails are you on
[20:00:10] rakm: dionysus69 yeah you can
[20:00:14] amperry: rakm: 4.2.5.1
[20:00:57] ahrs: has joined #RubyOnRails
[20:04:02] BrucePerens: has joined #RubyOnRails
[20:04:27] tercenya: has joined #RubyOnRails
[20:06:37] BrucePerens: https://github.com/BrucePerens/i18n-edit
[20:07:27] BrucePerens: Oops, sorry, wrong paste.
[20:07:32] Clair89: I’m using Select2 with multiple set to true. This works perfectly, saves all the data in de DB etc. But now if I go to the edit view, the input fields shows empty. How can I fill this with the data in my DB?
[20:08:30] ionte: has joined #RubyOnRails
[20:08:36] rakm: amperry i don't think after_update is a thing? also, i think you probably want before_save or before_validation if you are not going to save
[20:09:07] tercenya: has joined #RubyOnRails
[20:09:14] rakm: if i had to guess, after_update (if it is a thing) runs after the thing is already saved, so you would have to call .save again. but you don't want to do that because that will be an infinite loop
[20:09:41] amperry: rakm: I definitely need to save. afer_update runs before something is saved, so you can call the attr_changed? method still
[20:10:10] Clair89: Any advice on my question?
[20:10:26] xnxq: has joined #RubyOnRails
[20:10:36] rakm: sorry Clair89, not familiar with Select2
[20:11:01] amperry: but after_update is a thing: http://guides.rubyonrails.org/active_record_callbacks.html#available-callbacks <-- see 3.2
[20:11:04] rakm: amperry right, you need to save. but if i had to guess after_update is called after the reocrd is already saved. so you will need to call .save again
[20:11:52] rakm: hmm ok. then try checking .valid? to where you set the debugger,s o you can see if the transation is being rolled back maybe
[20:12:28] amperry: I'll give that a try.
[20:12:41] bheesham: has joined #RubyOnRails
[20:14:18] amperry: rakm: self.valid? is true at that point
[20:16:54] ResidentBiscuit: has joined #RubyOnRails
[20:19:14] amperry: rakm: changing after_update to before_save worked, but I'm really curious about what after_update is for, then. It's listed in that guides.rubonrails.org link, but it doesn't give any specifics. Ah well.
[20:20:27] BrucePerens: Could I please have some testers for my super-easy internationalization locale editor? It's at https://github.com/BrucePerens/i18n-edit . - Bruce
[20:22:42] brent__: has joined #RubyOnRails
[20:23:36] Duckily: has joined #RubyOnRails
[20:24:40] gusrub: has joined #RubyOnRails
[20:25:00] gusrub: has joined #RubyOnRails
[20:26:46] amperry: BrucePerens: I'll give it a quick look, but is there anything you need tested in particular?
[20:27:42] brent__: has joined #RubyOnRails
[20:28:01] BrucePerens: It's a locale editor. So, please follow the instructions and attempt to edit any locale in your Rails project. Also try to edit a tooltip, if you have them.
[20:28:33] pabloh: has joined #RubyOnRails
[20:29:40] Spami: has joined #RubyOnRails
[20:29:40] Spami: has joined #RubyOnRails
[20:31:19] workmad3: has joined #RubyOnRails
[20:32:38] renegadeandy: Do people advise using SimpleForm , or not?
[20:33:57] srinidhi: has joined #RubyOnRails
[20:35:24] daydream: has joined #RubyOnRails
[20:36:09] xnxq: has joined #RubyOnRails
[20:37:37] Technodrome: has joined #RubyOnRails
[20:39:46] cagomez: I have a model with attributes like 'enable_foo1', 'enable_foo2', etc. that are either True or False. What's the best way to return a list of attributes that are true? There are only a few
[20:40:39] akshat: has joined #RubyOnRails
[20:42:48] renegadeandy: make a method like ‘enabled’ and just do your code in there?
[20:43:26] akshat_: has joined #RubyOnRails
[20:43:45] Clair89: I’m using Select2 with multiple set to true. This works perfectly, saves all the data in de DB etc. But now if I go to the edit view, the input fields shows empty. How can I fill this with the data in my DB?
[20:44:17] cagomez: renegadeandy: so if access the model attributes, would I be making a database call for each one?
[20:44:39] cagomez: say I have attrs = [:foo1, :foo2, :foo3] and map over them
[20:45:13] renegadeandy: emm im not sure how it works, i think it may collect more than each in one call, if it knows you will be accessing more than just 1
[20:45:17] renegadeandy: yu could also just do a where clause
[20:46:07] Rodya_: has joined #RubyOnRails
[20:46:17] renegadeandy: model.where(lalal:true) kinda thing
[20:46:19] BrucePerens: Clair89, I don't use JQuery.
[20:46:24] ldnunes: has joined #RubyOnRails
[20:46:48] cagomez: ah ok, I'll look into where() :)
[20:46:48] Rodya__: has joined #RubyOnRails
[20:47:48] Clair89: BrucePerens; oke, thanks ;)
[20:48:16] MrPunkin: has joined #RubyOnRails
[20:50:20] cagomez: If I generated a migration to add a column to a model on my local db, then connect to another db (without running the migration), would that cause an undefined method error?
[20:51:22] Duckily: has joined #RubyOnRails
[20:52:09] MrPunkin: has left #RubyOnRails: ()
[20:52:59] username1: has joined #RubyOnRails
[20:56:43] blackmesa: has joined #RubyOnRails
[20:59:39] NoGodDamnIdea: has joined #RubyOnRails
[20:59:39] NoGodDamnIdea: has joined #RubyOnRails
[21:03:43] amperry: has left #RubyOnRails: ("ERC (IRC client for Emacs 24.5.1)")
[21:04:18] cnk: cagomez: probably not
[21:05:25] cnk: or it at least it isn't the having but not running a migration wouldn't - though not having a column but having an attribute might
[21:07:31] FLeiXiuS: has joined #RubyOnRails
[21:07:55] FLeiXiuS: Why is it that gem install sqlite3 works, but bundle install --local fails. Using the exact same gem file.
[21:08:18] FLeiXiuS: Driving me crazy
[21:08:39] FLeiXiuS: I blame windows ruby.
[21:09:33] byteflam1: has joined #RubyOnRails
[21:10:22] jusa: has joined #RubyOnRails
[21:11:46] BrucePerens: FLeiXiuS: file permissions?
[21:12:30] FLeiXiuS: BrucePerens, I thing its mswin vs mwing
[21:12:43] FLeiXiuS: Just gotta do the debugging
[21:21:00] DoctorMonocular: is there way to access other elements from a reject block?
[21:21:13] DoctorMonocular: like say I wanted to compare the current element with the next element?
[21:22:41] GodFather_: has joined #RubyOnRails
[21:24:59] bga57: has joined #RubyOnRails
[21:25:19] ndr0s: has joined #RubyOnRails
[21:28:00] ndr0s: has left #RubyOnRails: ("Bye...")
[21:29:22] quazimodo: has joined #RubyOnRails
[21:32:13] gusrub: has joined #RubyOnRails
[21:33:54] envint: has joined #RubyOnRails
[21:34:08] czerasz: has joined #RubyOnRails
[21:35:23] mikecmpbll: has joined #RubyOnRails
[21:38:14] jarr0dsz: has joined #RubyOnRails
[21:42:26] Jasaka: has joined #RubyOnRails
[21:46:39] Jasaka|NA: has joined #RubyOnRails
[21:47:31] Rodya_: has joined #RubyOnRails
[21:48:44] arBmind: has joined #RubyOnRails
[21:54:15] dionysus69: has joined #RubyOnRails
[21:54:52] Jasaka|NA: has joined #RubyOnRails
[22:01:11] yichiku: has joined #RubyOnRails
[22:01:51] jhass: DoctorMonocular: do you really need to peek or is looking behind also okay?
[22:02:46] Technodrome: has joined #RubyOnRails
[22:02:55] yichiku: i wanna put fields_for in devise/registrations/new.html.erb but then how would i build_for in the new action cause the controllers in the gem is there a way within the app
[22:03:01] jhass: or in other words what's the condition you want to reject upon exactly
[22:04:35] brendan6: has joined #RubyOnRails
[22:04:54] cagomez: has joined #RubyOnRails
[22:05:01] DoctorMonocular: jhass: yeah I guess looking back is fine
[22:05:31] DoctorMonocular: I'm looking at clear ways to implement .uniq basically, other than using uniq, for funsies
[22:05:36] DoctorMonocular: I have the intersect self metho
[22:05:42] DoctorMonocular: I have the hash keys thing
[22:05:50] jhass: .each_with_object([]) {|x, filtered| filtered << x unless filtered.last == x }
[22:06:00] DoctorMonocular: but I want a looping variant that doesn't make me want to kill myself
[22:06:20] jhass: well, include? x for uniq
[22:06:32] jhass: and maybe use a set
[22:06:33] DoctorMonocular: jhass: oh in a new array?
[22:06:53] DoctorMonocular: jhass: also, each_with_object, is that secretly just reduce, or?
[22:07:16] jhass: no, its the thing reduce is abused for way too often
[22:08:59] brendan^^: has joined #RubyOnRails
[22:10:52] brendan6: has joined #RubyOnRails
[22:11:03] Jayson_Virissimo: has joined #RubyOnRails
[22:11:53] jhass: basically all .reduce(INITIAL) {|accum, value| accum.op(value); accum } usages are misuages of reduce and should use each_with_object instead
[22:13:23] Radar: sunya7a: FYI: I no longer maintain / contribute to the paranoia
[22:13:26] Radar: paranoia gem*
[22:13:30] Radar: GOOD MORNING
[22:13:41] brendan6: has joined #RubyOnRails
[22:19:07] Jasaka|NA: has joined #RubyOnRails
[22:19:48] brendan6: has joined #RubyOnRails
[22:20:23] cagomez: has joined #RubyOnRails
[22:21:15] cagomez: I have attributes that are true or false in my model. what's the cleanest way to return a list of symbols of a finite set of attributes (a static list) that are true?
[22:22:09] jhass: THAT_LIST.select {|attribute| self[attribute] }
[22:23:04] brendan6: has joined #RubyOnRails
[22:25:27] cagomez: thanks jhass
[22:28:30] Jayson_Virissimo: model.attributes.keys
[22:28:56] Jasaka: has joined #RubyOnRails
[22:29:26] jhass: would require a == true in the above and still might hurt you down the road when you add something to the model that shouldn't appear in that list
[22:29:55] Jayson_Virissimo: Ah, that are true, nvm.
[22:31:34] FLeiXiuS: has joined #RubyOnRails
[22:32:56] Kilo`byte: i have written a custom validation. Where'd i put that
[22:36:21] Jayson_Virissimo: I usually drop those in the model as private.
[22:37:10] Jayson_Virissimo: Then call validate :custom_validation_method_name somewhere near to top in class scope.
[22:37:21] Jayson_Virissimo: Assuming you are talking about model validation.
[22:39:18] akshat: has joined #RubyOnRails
[22:39:58] br0d1n: has joined #RubyOnRails
[22:43:43] spicerack: has joined #RubyOnRails
[22:46:10] Synthead: has joined #RubyOnRails
[22:47:29] davedo321: has joined #RubyOnRails
[22:49:19] patarr: has joined #RubyOnRails
[22:49:34] chouhoul_: has joined #RubyOnRails
[22:50:02] Jasaka: has joined #RubyOnRails
[22:53:17] cpruitt: has joined #RubyOnRails
[22:55:39] zero1one0: has joined #RubyOnRails
[22:58:19] Gaelan: has joined #RubyOnRails
[22:59:16] hahuang65: has joined #RubyOnRails
[22:59:23] cagomez: has joined #RubyOnRails
[23:00:38] Gaelan: Anyone know of a good way to call Cocoa from Ruby?
[23:00:44] Gaelan: RubyMotion is probably not an option, this is an OSS project and there shouldn’t be a $200 fee to contribute
[23:04:05] jerme_: has joined #RubyOnRails
[23:11:13] jusa: has joined #RubyOnRails
[23:14:34] quazimodo: has joined #RubyOnRails
[23:15:58] zero1one0: has joined #RubyOnRails
[23:18:52] Destru: has joined #RubyOnRails
[23:22:02] brendan6: has joined #RubyOnRails
[23:30:01] patarr: has joined #RubyOnRails
[23:30:25] superlou: has joined #RubyOnRails
[23:34:35] choke: has joined #RubyOnRails
[23:49:37] WinterBluFox: has joined #RubyOnRails
[23:50:39] patarr: has joined #RubyOnRails
[23:55:16] Gaelan: has joined #RubyOnRails
[23:57:29] Robtop__: has joined #RubyOnRails