Activity Graph

Page 1 of 49 | Next »


[10:23:55] wmoxam: *.net *.split
[10:24:00] wmoxam: has joined #ruby
[10:24:00] wmoxam: has joined #RubyOnRails


[00:55:59] wmoxam: *.net *.split
[01:13:36] wmoxam: has joined #RubyOnRails
[01:13:49] wmoxam: has joined #ruby


[02:05:36] wmoxam: dgs: QueryCache shouldn't touch memcache, config.action_controller.perform_caching is for stuff like fragment caching
[02:07:22] wmoxam: it should be enabled by default
[02:07:57] wmoxam: is this app using multiple dbs?
[02:08:24] wmoxam: could be!
[02:11:24] wmoxam: `ActiveRecord::Base.connection.query_cache_enabled` should tell you if its enabled


[04:20:03] wmoxam: Norrin: it's not required
[04:21:10] wmoxam: It's just needed when you want to reference that association
[04:22:36] wmoxam: think of it as a shortcut to get assocation methods for free
[04:24:08] wmoxam: no, not at all
[04:25:43] wmoxam: well, in an case you need the reference column to get either association
[04:26:36] wmoxam: the reference column itself is created by a migration
[04:26:50] wmoxam: This guide might help https://guides.rubyonrails.org/v5.2/association_basics.html
[04:28:36] wmoxam: no, adding a reference column via a migration makes these assocations possible
[04:29:05] wmoxam: via a db migration
[04:29:38] wmoxam: It's in the document I linked above
[04:29:57] wmoxam: ex: https://guides.rubyonrails.org/v5.2/association_basics.html#the-has-many-association
[04:30:07] wmoxam: "The corresponding migration might look like this:"
[04:32:29] wmoxam: basically the db schema defines what properties each model has, methods such as `has_many` and `belongs_to` inform ActiveRecord about how models are related, and setup up a bunch of methods on a model to interact with them
[04:34:04] wmoxam: associatons imply that the fields to store the associatons exist in the schema
[04:34:28] wmoxam: if they don't exist you'll get an error
[16:25:02] wmoxam: you belong to the thing you reference
[16:25:11] wmoxam: you have many things that reference you
[16:26:08] wmoxam: s what DB indexes are for
[16:27:57] wmoxam: its so you don't "traverse the entire comments db"
[16:28:33] wmoxam: all reference columns should be indexed
[16:29:42] wmoxam: Yes, but only if post_id is not indexed
[16:30:23] wmoxam: https://en.wikipedia.org/wiki/Database_index
[16:31:26] wmoxam: It's specified in the example migrations in the guide, ex: t.belongs_to :author, index: true
[16:32:57] wmoxam: Norrin: why it's done like that is a topic in itself
[16:33:07] wmoxam: see: https://en.wikipedia.org/wiki/Database_normalization


[05:05:21] wmoxam: has joined #ruby
[05:05:21] wmoxam: has joined #RubyOnRails


[02:05:53] wmoxam: has joined #ruby
[02:05:53] wmoxam: has joined #RubyOnRails
[02:18:03] wmoxam: Ping timeout: 248 seconds


[14:09:46] wmoxam: *.net *.split


[17:09:27] wmoxam: Ping timeout: 240 seconds
[17:17:36] wmoxam: has joined #ruby
[17:17:36] wmoxam: has joined #RubyOnRails


[03:36:19] wmoxam: has joined #ruby
[03:36:19] wmoxam: has joined #RubyOnRails


[12:43:34] wmoxam: Ping timeout: 250 seconds


[06:00:18] wmoxam: Ping timeout: 276 seconds
[06:01:49] wmoxam: has joined #RubyOnRails
[06:01:50] wmoxam: has joined #ruby


[01:45:51] wmoxam: has joined #ruby
[01:45:51] wmoxam: has joined #RubyOnRails


[23:00:18] wmoxam: Ping timeout: 265 seconds


[05:57:53] wmoxam: Ping timeout: 248 seconds
[17:39:42] wmoxam: has joined #ruby
[17:39:42] wmoxam: has joined #RubyOnRails


[02:46:51] wmoxam: *.net *.split
[02:47:43] wmoxam: has joined #RubyOnRails
[02:47:50] wmoxam: has joined #ruby


[03:50:23] wmoxam: has joined #ruby
[03:50:23] wmoxam: has joined #RubyOnRails


[07:32:03] wmoxam: Remote host closed the connection


[21:27:39] wmoxam: cjohnson: you could do `r = Hash.new {|hash, key| hash[key] = input["user_" + key] }`
[21:27:42] wmoxam: when you lookup a value, the hash will calculate and store it on the fly
[21:28:00] wmoxam: tbh I think your original way is fine
[21:29:10] wmoxam: fields.map{ |x| [x, input["user_" + x]] }.to_h would work too
[21:39:40] wmoxam: the first one does it on the fly
[21:40:00] wmoxam: so `input` would have to be in scope
[21:40:08] wmoxam: I don't, it's done on the fly :D
[21:40:17] wmoxam: no, not at all
[21:40:43] wmoxam: when you do r['user'], it would be calculated then
[21:40:50] wmoxam: for 'user'
[21:41:06] wmoxam: yes exactly
[21:48:41] wmoxam: cjohnson: see: https://netinlet.com/blog/2014/01/01/fun-with-ruby-hashes/


[20:37:03] wmoxam: has joined #RubyOnRails


[07:28:16] wmoxam: Remote host closed the connection


[18:28:12] wmoxam: Security horror stories?


[19:02:51] wmoxam: leitz: what's that?


[01:13:04] wmoxam: those ppl are wrong 😅
[01:15:32] wmoxam: IMO Ruby has always been, and still is a great glue language
[01:16:12] wmoxam: Elixir, Crystal etc aren't as good as glue
[01:16:49] wmoxam: if anything will replace it maybe it'll be Perl :D
[01:17:52] wmoxam: Papierkorb: that's not what I meant by glue :D
[01:20:22] wmoxam: rubycoder37: I haven't seen much migration away from Ruby/Rails
[01:22:32] wmoxam: ugh, electron
[01:22:45] wmoxam: I've quit using electron app
[01:23:16] wmoxam: Sublime is better :p
[01:26:50] wmoxam: really want to check out Perl 6. Have heard great things
[01:29:16] wmoxam: https://gist.github.com/wmoxam/a3d93a1bcde7cfbdbc64d9584fd1929b


[22:27:42] wmoxam: has left #RubyOnRails: ()


[17:14:43] wmoxam: has joined #RubyonRails-offtopic


[13:29:16] wmoxam: eminencehc: Store the edited config in a DB, then write an async job (cron, resque) to update the file (and run it as root)
[13:32:58] wmoxam: alternatively use configuration management software (Chef, Ansible, etc) and use your rails app to feed it templates & trigger updates
[13:58:50] wmoxam: There's always Webmin :D


[17:26:54] wmoxam: Dbugger: https://github.com/doorkeeper-gem/doorkeeper
[17:29:33] wmoxam: so why not OAuth?
[17:30:15] wmoxam: If you want to access your Instagram data from another app, you authorize the other app with Instagram via OAuth
[17:31:20] wmoxam: You authorize once, then can access the API whenever you need to


[04:48:14] wmoxam: Read error: Connection reset by peer
[17:32:06] wmoxam: has joined #ruby
[17:32:09] wmoxam: has joined #RubyOnRails


[02:47:06] wmoxam: newcoder: ur right, it's not
[02:50:22] wmoxam: it doesn't scales down well
[02:53:46] wmoxam: nofxx: there was no expectation of a real answer ;)
[02:58:10] wmoxam: but for reals, Ruby doesn't scale down well
[02:58:27] wmoxam: not important to most ppl
[03:00:12] wmoxam: but for example back in the day if you wanted to host a webapp on dirt cheap shared hosting, Ruby wasn't a great choice


[00:15:48] wmoxam: ShalokShalom: no
[00:16:13] wmoxam: in a lot of cases it's easy to convert
[00:17:59] wmoxam: cases where I've had difficulty are where hashes are the primary method of passing data around
[00:19:38] wmoxam: ShalokShalom: I have a port of Liquid that mostly works
[00:19:55] wmoxam: https://github.com/wmoxam/liquid-crystal
[00:22:45] wmoxam: I'm not sure what you mean
[00:26:31] wmoxam: ah, Liquid is a templating language used by many CMS's
[00:26:38] wmoxam: originally writting in Ruby



[09:08:58] wmoxam: Remote host closed the connection


[15:39:48] wmoxam: *.net *.split
[15:47:36] wmoxam: has joined #RubyOnRails


[05:01:18] wmoxam: 99 bottles of OOP is fun so far 👌
[05:01:47] wmoxam: dgs: it's large, I wouldn't call it abnormal
[05:02:32] wmoxam: sevenseacat: 20% discount if you get it today
[05:02:46] wmoxam: Warm greetings to you as well EvilEpoch
[05:09:27] wmoxam: sevenseacat: I get ssl ...
[05:10:34] wmoxam: the link in the email took me to https://sandimetz.dpdcart.com/


[22:08:26] wmoxam: desnudopenguino: either work fine for simple cases


[03:04:55] wmoxam: has joined #RubyOnRails
[03:04:55] wmoxam: Changing host


[07:04:45] wmoxam: *.net *.split


[13:55:16] wmoxam: has joined #RubyOnRails
[13:55:16] wmoxam: Changing host


[14:12:16] wmoxam: epochwolf: http://stackoverflow.com/questions/29991869/how-do-you-specify-the-exact-order-of-minitest-tests
[23:13:00] wmoxam: *.net *.split


[15:51:27] wmoxam: has left #RubyOnRails: ()
[18:46:19] wmoxam: has joined #RubyOnRails
[18:48:54] wmoxam: I didn't know that node.js is a framework
[18:49:03] wmoxam: I thought it was a language runtime :p
[18:49:56] wmoxam: the performance graph is exagerated ...


[21:21:48] wmoxam: Darmani: if it's for practice why use a gem?
[21:23:28] wmoxam: Darmani: why not both? :)
[21:23:46] wmoxam: try it one way, then try it another way :D


[14:04:16] wmoxam: Jenzo: depends on a lot of things
[14:05:20] wmoxam: Jenzo I've heard that senior Sharepoint devs get paid even more
[14:06:41] wmoxam: past performance is not an indicator of future
[14:07:13] wmoxam: when I started Cold Fusion and Flash were hot
[14:07:26] wmoxam: Rails was years away
[14:08:27] wmoxam: pontiki: fair
[14:09:05] wmoxam: Agencies are bad for that sort of thing


[20:52:37] wmoxam: tubbo: that's a big "only"


[19:07:03] wmoxam: Darmani: you have some bad nesting in your markup
[19:07:12] wmoxam: <li><h4><%= comment.author.email %> -</li></h4>


[02:33:12] wmoxam: quazimodo: it's because Rails is dead
[02:33:17] wmoxam: HN told me so


[03:58:02] wmoxam: jeromelanteri: this is a better idea ;) http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
[03:58:08] wmoxam: jeromelanteri: http://stackoverflow.com/questions/21983131/rails-4-nested-attributes-and-has-many-through-associaton-in-a-form
[04:13:45] wmoxam: jeromelanteri: the info in the links is sufficent ;) It doesn't matter how the data is posted (via html form or by js), the result is the same :D
[04:21:24] wmoxam: drim: 'folder_nested_id' (provided the class is Folder::Nested)
[04:23:48] wmoxam: jeromelanteri: cool, well good luck 😅


[16:11:20] wmoxam: IMO its best to omit self when you can


[13:11:50] wmoxam: alfie_max15: set :deploy_via, :copy
[13:12:22] wmoxam: http://bu.chsta.be/blog/2013-02-24/capistrano-deployment-strategies-deploy-via-a-copy/


[15:01:11] wmoxam: kailido: you can tunnel the connection through ssh
[15:01:22] wmoxam: then you can use whatever DB frontent you like
[15:01:54] wmoxam: oh, you said VM
[15:02:09] wmoxam: well same deal I guess
[15:03:13] wmoxam: tubbo: sure, but it can be setup as a tunnel so that pgadmin can be used
[15:03:22] wmoxam: kailido: ^^
[15:03:38] wmoxam: something like ssh -L 3306:xxx.xxx.xxx.xxx:3306 username@example.com
[15:51:08] wmoxam: IMO : useless
[15:51:25] wmoxam: er, coffeescript is useless
[15:52:58] wmoxam: adaedra: yeah, that's totally the thing I was saying
[15:53:03] wmoxam: tubbo: probably
[15:53:20] wmoxam: our company is moving away from coffeescript
[15:53:54] wmoxam: our ruby devs somewhat like coffeescript, but any new js focused devs dislike it
[15:55:13] wmoxam: CS did influence ES6, which is a win
[15:55:36] wmoxam: IMO it did it's job but its a dead end
[15:58:03] wmoxam: https://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153/11
[15:59:19] wmoxam: tubbo: :p


[19:15:45] wmoxam: TEST FAILED


[18:14:27] wmoxam: https://medium.com/spritle-software/rails-5-activerecord-suppress-a-step-too-far-d7ec2e4ed027 :(
[18:17:19] wmoxam: tubbo: .supress is such a bad idea
[18:17:33] wmoxam: .suppress even
[18:25:28] wmoxam: jheathco: in what context?
[18:28:58] wmoxam: I'm not sure that Rails.configuration is available in initializers
[18:29:28] wmoxam: The guides refer to both: http://guides.rubyonrails.org/configuring.html
[18:34:59] wmoxam: tubbo: historical reasons
[18:36:00] wmoxam: https://github.com/rails/rails/blob/6f6a589d4b564f5db78735ad0c7225c22ced57ac/railties/lib/rails/core.rb#L1-L20
[18:39:09] wmoxam: tubbo: AFAICT the method name was introduced here: https://github.com/rails/rails/commit/9cfd1d44915f4615bbb760198cd01bf4dfc69f5a
[18:39:17] wmoxam: "Get more tests to pass"
[18:39:32] wmoxam: and that is why it's called 'configuration' folks
[18:40:23] wmoxam: tbh Rails.application.config is the one that is inconsistent :p
[20:36:55] wmoxam: flashpoint9: Fixnum holds Integer values that can be represented in a native machine word
[20:37:12] wmoxam: flashpoint9: larger numbers are Bignums
[20:37:54] wmoxam: flashpoint9: it's the size the machine natively supports
[20:38:13] wmoxam: flashpoint9: so it's different on 32-bit arch vs a 64-bit arch for example
[20:38:28] wmoxam: flashpoint9: yep
[20:38:40] wmoxam: it's really just an implementation detail
[20:42:08] wmoxam: json = current_user.as_json.tap {|json| json[:groups] = current_user.groups.as_json if current_user.role == "admin" }
[20:42:15] wmoxam: s2013: ^^ that should work
[20:47:02] wmoxam: I like STI in limited doses
[20:55:31] wmoxam: Scient: could you alter your design so the base class is abstract?


[03:31:35] wmoxam: Remote host closed the connection
[03:38:51] wmoxam: has joined #RubyOnRails
[21:57:12] wmoxam: Ping timeout: 244 seconds
[21:58:01] wmoxam: has joined #RubyOnRails


[08:12:05] wmoxam: *.net *.split
[08:28:16] wmoxam: has joined #RubyOnRails


[19:48:29] wmoxam: *.net *.split
[20:03:26] wmoxam: has joined #RubyOnRails
[20:04:37] wmoxam: *.net *.split
[21:41:24] wmoxam: has joined #RubyOnRails


[21:06:41] wmoxam: has joined #railsbridge
[21:07:09] wmoxam: has left #railsbridge: ()
[21:07:22] wmoxam: has joined #RubyOnRails


[03:00:39] wmoxam: Remote host closed the connection


[15:08:23] wmoxam: has joined #ruby



[00:34:54] wmoxam: has joined #RubyOnRails
[00:43:10] wmoxam: has joined #RubyonRails-offtopic
[00:59:01] wmoxam: forget arf
[00:59:03] wmoxam: forget !arf
[01:01:02] wmoxam: helpa count
[01:04:41] wmoxam: Radar: Could you please !forget the following tips? !arf & !dumbass
[01:05:06] wmoxam: has left #RubyonRails-offtopic: ()
[01:05:17] wmoxam: has left #RubyOnRails: ()