ryandv

Activity Graph

Page 1 of 1

2019-02-14

[15:56:48] ryandv: has joined #RubyOnRails
[15:57:24] ryandv: Hello all - can `define_model_callbacks` from ActiveModel be used for `after_initialize` in activemodel-5.2.2?
[17:22:51] ryandv: Ping timeout: 246 seconds

2019-01-25

[15:26:42] ryandv: has joined #RubyOnRails
[15:44:13] ryandv: Ping timeout: 245 seconds
[18:45:15] ryandv: has joined #RubyOnRails
[20:46:48] ryandv: Ping timeout: 246 seconds

2019-01-24

[20:55:21] ryandv: has joined #RubyOnRails
[20:56:23] ryandv: hi - is it possible to specify an array as a bind to `exec_query` for use in a `WHERE ... IN` statement? e.g. `ActiveRecord::Base.connection.exec_query('SELECT * FROM foos WHERE id IN ($1)', 'my_query_name', [ [nil, [1,2,3,4]] ])`
[20:56:42] ryandv: I explicitly do not want to use ApplicationRecords and instead want raw SQL
[23:02:27] ryandv: Ping timeout: 240 seconds

2019-01-17

[16:17:51] ryandv: has joined #RubyOnRails
[16:20:19] ryandv: What is the most robust solution for constructing Array instances from a PostgreSQL query using an array aggregation? e.g. `ActiveRecord::Base.connection.execute('SELECT ARRAY_AGG(id) FROM foos')`
[19:15:02] ryandv: Ping timeout: 250 seconds

2018-12-13

[21:05:55] ryandv: has joined #ruby
[21:06:04] ryandv: hello - does there exist a parsing library for ruby with native extensions?
[21:09:10] ryandv: havenwood: I'm looking for a fast Ruby parser that can accept source text and output an AST
[21:10:09] ryandv: havenwood: interesting, I'll check those out. thanks!
[21:22:07] ryandv: Ping timeout: 240 seconds

2018-11-14

[19:23:13] ryandv: has joined #RubyOnRails
[19:24:29] ryandv: Hi all - I'm reading through the Rails 5 source and am curious about the class attribute `attributes_to_define_after_schema_loads` - how is it used? From what I can tell, a cursory glance over the source suggests that it is unused
[19:24:45] ryandv: Is this something that is configurable by the user? I somehow doubt this as there is an internal annotation on the attribute
[19:29:38] ryandv: nevermind, I am mistaken
[19:33:00] ryandv: it appears to contain all those activerecord attributes defined in an `attribute` class macro call
[19:33:38] ryandv: which I guess is distinguished from those attributes coming straight from the model schema
[22:14:12] ryandv: Ping timeout: 252 seconds

2018-07-30

[19:18:24] ryandv: has joined #RubyOnRails
[19:20:18] ryandv: so I'm noticing that there is such a thing as the `@association_cache` in `ActiveRecord::Associations`. under what circumstances is this cache expired? I am experiencing issues after upgrading to Rails 5 from 4.2 where a transaction is rolled back, but instances of ActiveRecord still have their `@association_cache` pointing to stale objects
[19:20:45] ryandv: I suppose that one solution would be to just reload all records in the event of a rollback, but I'd like to understand more
[19:23:02] ryandv: in particular, I don't think we've encountered stale reads when navigating an association in 4.2, so I'm curious if anyone has any ideas on what change in rails 5 would cause this difference in behaviour
[19:34:25] ryandv: nzst: seems quite relevant. thanks, i'll take a closer look at that
[20:45:35] ryandv: Ping timeout: 240 seconds

2018-06-18

[17:18:53] ryandv: has joined #RubyOnRails
[17:19:06] ryandv: hello - is there any documentation regarding ActiveRecord `self.abstract_class`?
[17:19:14] ryandv: wondering exactly what this flag is for
[17:19:36] ryandv: in Rails 5.0.7 in particular
[17:25:17] ryandv: Disconnected by services
[17:25:31] ryandv: has joined #RubyOnRails
[17:30:21] ryandv: Disconnected by services
[17:30:40] ryandv: has joined #RubyOnRails
[17:53:10] ryandv: Ping timeout: 264 seconds

2018-05-02

[18:32:13] ryandv: has joined #RubyOnRails
[18:33:24] ryandv: hey, is it possible to execute raw SQL with old-school colon binds, if I don't have access to a particular inheritor of `ActiveRecord::Base`?
[18:33:47] ryandv: by colon binds I mean something like `SELECT COUNT(id) FROM foobars WHERE description LIKE ':query'`
[18:34:35] ryandv: I know about exec_query but I think the bind syntax is different
[18:36:35] ryandv: cagomez: how do you mean? ultimately you will have to ask the DB how many rows your query results in
[18:39:37] ryandv: cagomez: I think size is intelligent enough to know when to execute a SQL query vs just counting the in-memory collection
[18:40:27] ryandv: cagomez: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/relation.rb#L243
[18:42:16] ryandv: you can of course explicitly invoke `.count` or `.length` if you know you want to execute a SQL COUNT query or coerce the Relation to an Array and then call length from Enumerable
[19:27:12] ryandv: Read error: Connection reset by peer
[21:04:45] ryandv: has joined #RubyOnRails
[22:06:51] ryandv: Ping timeout: 240 seconds

2018-04-25

[15:18:52] ryandv: has joined #RubyOnRails
[19:28:57] ryandv: Ping timeout: 240 seconds

2018-04-16

[20:19:27] ryandv: has joined #RubyOnRails
[22:01:51] ryandv: Ping timeout: 276 seconds

2018-03-16

[00:00:36] ryandv: has joined #ruby
[00:05:04] ryandv: Ping timeout: 260 seconds
[02:55:07] ryandv: has joined #ruby
[02:59:45] ryandv: Ping timeout: 248 seconds
[03:45:24] ryandv: has joined #ruby
[03:50:31] ryandv: Ping timeout: 246 seconds

2018-03-15

[14:10:17] ryandv: has joined #ruby
[23:58:25] ryandv: Ping timeout: 248 seconds

2018-03-14

[00:01:28] ryandv: Ping timeout: 246 seconds
[13:54:06] ryandv: has joined #ruby
[13:58:25] ryandv: Ping timeout: 248 seconds
[14:03:44] ryandv: has joined #ruby
[15:06:24] ryandv: Ping timeout: 260 seconds
[15:49:05] ryandv: has joined #ruby
[20:19:07] ryandv: Ping timeout: 246 seconds
[20:22:38] ryandv: has joined #ruby
[20:31:11] ryandv: Ping timeout: 256 seconds
[21:05:44] ryandv: has joined #ruby
[22:49:33] ryandv: Ping timeout: 264 seconds

2018-03-13

[00:03:31] ryandv: has joined #ruby
[00:07:53] ryandv: Ping timeout: 240 seconds
[00:18:03] ryandv: has joined #ruby
[01:02:39] ryandv: Ping timeout: 260 seconds
[02:17:45] ryandv: has joined #ruby
[02:43:58] ryandv: Ping timeout: 246 seconds
[14:10:08] ryandv: has joined #ruby
[14:14:49] ryandv: Ping timeout: 260 seconds
[14:17:58] ryandv: has joined #ruby
[16:15:36] ryandv: Ping timeout: 256 seconds
[17:29:15] ryandv: has joined #ruby
[19:11:29] ryandv: Ping timeout: 248 seconds
[19:13:25] ryandv: has joined #ruby
[19:24:47] ryandv: Ping timeout: 245 seconds
[19:51:50] ryandv: has joined #ruby
[20:01:19] ryandv: Ping timeout: 260 seconds
[20:36:23] ryandv: has joined #ruby
[22:00:58] ryandv: Ping timeout: 264 seconds
[22:03:47] ryandv: has joined #ruby
[22:09:22] ryandv: Ping timeout: 264 seconds
[23:41:10] ryandv: has joined #ruby

2018-03-12

[13:29:26] ryandv: has joined #ruby
[13:34:34] ryandv: Ping timeout: 264 seconds
[13:56:36] ryandv: has joined #ruby
[15:06:29] ryandv: Ping timeout: 260 seconds
[15:07:21] ryandv: has joined #ruby
[15:11:27] ryandv: Ping timeout: 240 seconds
[15:17:25] ryandv: has joined #ruby
[22:04:46] ryandv: Ping timeout: 256 seconds

2018-03-09

[19:35:58] ryandv: has joined #ruby
[21:57:53] ryandv: Ping timeout: 248 seconds
[22:25:08] ryandv: has joined #ruby
[22:44:17] ryandv: Ping timeout: 256 seconds
[22:45:38] ryandv: has joined #ruby
[22:50:10] ryandv: Ping timeout: 264 seconds

2018-02-10

[01:04:45] ryandv: has joined #ruby
[01:09:12] ryandv: Ping timeout: 256 seconds

2018-02-09

[22:34:04] ryandv: has joined #ruby
[22:34:16] ryandv: Why does precision need to be specified for a Float but not a String in `BigDecimal::new`?
[22:34:52] ryandv: is it because we want to omit possible imprecisions from the IEEE 754 representation of Floats?
[22:34:58] ryandv: whereas Strings are "exact" in some sense?
[22:35:50] ryandv: apeiros: I see, thanks!
[23:04:49] ryandv: Ping timeout: 265 seconds
[23:14:25] ryandv: has joined #ruby
[23:19:15] ryandv: Ping timeout: 260 seconds

2017-08-24

[07:59:45] ryandv: has joined #ruby
[08:04:22] ryandv: Ping timeout: 260 seconds
[13:54:03] ryandv: has joined #ruby
[13:58:19] ryandv: Ping timeout: 240 seconds

2017-08-17

[00:53:31] ryandv: has joined #ruby
[00:59:43] ryandv: Ping timeout: 248 seconds

2017-08-16

[17:07:14] ryandv: has joined #RubyOnRails
[17:08:04] ryandv: Does capybara attempt to start a new HTTP server every time a new example is run?
[17:08:42] ryandv: if so, how can I configure it to only start one server for the duration of the entire test suite?
[17:26:19] ryandv: has joined #ruby
[17:26:27] ryandv: does capybara attempt to start a new HTTP server for every example that is run?
[20:05:11] ryandv: Ping timeout: 246 seconds
[20:33:26] ryandv: has joined #ruby
[20:38:27] ryandv: Ping timeout: 240 seconds
[20:51:41] ryandv: has joined #ruby
[20:55:58] ryandv: Ping timeout: 246 seconds
[21:00:23] ryandv: has joined #ruby
[22:19:14] ryandv: Ping timeout: 246 seconds
[22:36:56] ryandv: has joined #ruby
[22:41:37] ryandv: Ping timeout: 248 seconds