mmun

Activity Graph

Page 1 of 1

2018-05-30

[00:04:50] mmun: Ping timeout: 265 seconds

2018-05-29

[02:47:07] mmun: *.net *.split
[02:47:46] mmun: has joined #RubyOnRails

2018-05-19

[15:33:50] mmun: Remote host closed the connection
[15:36:14] mmun: has joined #RubyOnRails

2018-05-06

[10:32:16] mmun: has joined #RubyOnRails

2018-04-25

[12:25:51] mmun: *.net *.split
[12:27:34] mmun: has joined #RubyOnRails
[15:01:22] mmun: *.net *.split
[15:03:04] mmun: has joined #RubyOnRails

2018-04-10

[14:02:52] mmun: has joined #RubyOnRails

2018-03-10

[22:44:28] mmun: Ping timeout: 240 seconds
[22:44:40] mmun: has joined #RubyOnRails

2018-03-02

[04:10:49] mmun: Ping timeout: 256 seconds
[04:15:06] mmun: has joined #RubyOnRails

2018-02-25

[09:34:49] mmun: *.net *.split
[09:36:32] mmun: has joined #RubyOnRails

2018-02-09

[20:49:16] mmun: has joined #RubyOnRails

2018-02-08

[19:24:47] mmun: Read error: Connection reset by peer
[19:27:36] mmun: has joined #RubyOnRails

2018-01-20

[22:05:49] mmun: *.net *.split
[22:06:32] mmun: has joined #RubyOnRails

2018-01-06

[02:26:49] mmun: *.net *.split

2017-12-27

[19:13:26] mmun: Ping timeout: 252 seconds
[19:55:25] mmun: has joined #RubyOnRails

2017-11-08

[09:43:28] mmun: *.net *.split
[09:49:07] mmun: has joined #RubyOnRails

2017-11-06

[13:23:02] mmun: Ping timeout: 255 seconds
[13:24:08] mmun: has joined #RubyOnRails

2017-10-16

[06:26:50] mmun: has joined #RubyOnRails

2017-07-18

[02:13:56] mmun: *.net *.split

2017-07-16

[03:58:48] mmun: Ping timeout: 240 seconds
[22:16:25] mmun: has joined #RubyOnRails

2017-06-20

[00:17:38] mmun: *.net *.split
[00:22:41] mmun: has joined #RubyOnRails

2017-05-31

[09:01:05] mmun: *.net *.split

2017-05-27

[22:54:59] mmun: Ping timeout: 245 seconds
[22:55:21] mmun: has joined #RubyOnRails

2017-05-11

[10:42:48] mmun: has joined #RubyOnRails

2017-04-17

[17:35:09] mmun: has joined #RubyOnRails
[17:36:53] mmun: how could you dynamically set the cookie expiration time? (e.g. regular users last a month, admin users are session). using devise/warden if that matters.

2015-06-17

[20:16:55] mmun: Ping timeout: 255 seconds

2015-03-14

[16:36:03] mmun: hello. I'm trying to locally precompile assets (in rails 4.1.0) and its asking me to configure the production database & secret_key. is that expected?

2015-02-07

[00:05:02] mmun: hello. is there a common pattern for accepting a model or its primary id?
[00:07:32] mmun: model_or_id.is_a?(ActiveRecord::Base) ? model_or_id : MyModel.find(model_or_id)
[00:09:46] mmun: waseem_ I'm just writing a lib function that can accept either a model or its ID
[00:09:49] mmun: nothing fancy.
[00:10:11] mmun: not unlike link_to
[00:10:35] mmun: the code ^^^ is sufficient for my purposes :)
[00:11:57] mmun: waseem_: thank you

2015-01-13

[21:19:40] mmun: hi friends! are .js.erb files precompiled or do they re-run on each request?

2014-11-12

[20:42:34] mmun: howdy. Can I bypass the mass assignment check in Model.find_or_create_by(query, &block)? In my cass, query is a hash manually built up in the lines before.

2014-06-03

[17:07:20] mmun: with STI, if the type field for a record is nil is the base model used?

2014-03-07

[00:46:11] mmun: when are warden/devise strategies run? I can't quite figure it out

2014-02-28

[21:32:48] mmun: I have a controller X that responds in JSON. Is it possible to have another controller Y that gets its data from controller X but renders an HTML view?
[21:33:19] mmun: use case: controller Y is just meant to be temporary while we transition to a full javascript frontend

2014-02-07

[14:11:12] mmun: is it possible to reference the result of particular line (they're numbered) in irb?

2014-02-02

[05:44:31] mmun: <3 hstore

2014-01-25

[00:04:09] mmun: :) yeah needs to pick up only when all comments have the property
[01:30:04] mmun: is it possible return a count of the number of groups instead of the entire hash?
[01:30:47] mmun: shinobi_one: yeah, in an activerecord expressions
[01:30:50] mmun: eg. posts.joins(:comments).group('posts.id').having('<some complex query>')
[01:31:14] mmun: count doesn't work, it will count each individual group
[01:33:20] mmun: :D yeah, i'm using .length instead of .count
[01:33:26] mmun: feels a bit dirty though

2014-01-24

[23:58:13] mmun: if I have two models post and comment with post has_many comments, how can I get all posts that satisfy "all my comments were created_at < 1.month.ago"
[23:59:18] mmun: oh... maybe the easiest way is to check if the negation of the statement has count == 0

2014-01-06

[05:38:26] mmun: MyModel.find_each is failing because there isn't a primary ID (its a join table). any tips?

2014-01-03

[19:07:24] mmun: I have a post model has a new comment_count property, and I want to do a one time migration to initialize it. Post.joins(:comments).update_all(:comment_count => 'not sure what to put here')
[19:08:21] mmun: jxf: to get the count of comments that belong to the post and put it into the comment_count column
[19:13:19] mmun: jxf: thanks
[19:16:17] mmun: jxf: would I not need to use includes instead of joins in that case?

2014-01-02

[20:12:30] mmun: any advice for passing serializer options into a has_many relationship inside of a serializer with active model serializers?
[20:15:32] mmun: RubyPanther: I'm building a JSON API, not much choice but to serialize!
[20:20:23] mmun: tubbo: sec, I'll provide a gist
[20:22:43] mmun: tubbo: https://gist.github.com/mmun/3646b88d4cb2f13a256b
[20:23:50] mmun: basically I'd like to propagate the use_shallow_version option in ```render @post, use_shallow_version: true``` to the comment serializer as well
[20:24:10] mmun: basically yes
[20:24:15] mmun: (or other options)
[20:26:38] mmun: tubbo: no, brb i'll do my homework
[20:27:22] mmun: if that's the case than I can namespace the options options: {post: ..., comment: ...}, that would be good enough...
[20:27:56] mmun: I'm using 0.8 though, maybe they've rearranged this behaviour in the last 8 months
[20:38:47] mmun: tubbo: it works like you suspected
[21:02:20] mmun: tubbo: it seems weird to have to specify all the options on the controller. I would expect to just set an option for the root serializer, and have that serializer add options to its child serializers. know what i mean?
[21:02:57] mmun: fortunately it mostly works for my user case
[21:08:05] mmun: i appreciate the help tubbo
[21:09:54] mmun: there's already an issue addressing my concern

2013-12-12

[23:02:49] mmun: I have timestamps set up in the usual way (t.timestamp in the migration). is it possible to override the updated_at attribute when saving a record?