Page 1 of 12 | Next »
[00:02:18] Inside: You can't tell what exceptions statically typed languages will throw either, can you?
[00:02:53] Inside: You would need to pre-execute all code branches to every stack depth to determine if there is a throw routine somewhere
[22:46:29] Inside: The solution that I have been kicking around is a database connection cache/proxy application
[22:46:47] Inside: everything talks to that application, then that application is responsible for caching intermediate stuff before pushing it to the DB
[00:30:32] Inside: Radar, on the other hand, is a fantastic ruby author so he may have a good suggestion
[00:46:34] Inside: Here's a test I'm writing right now - how do you check that your strong parameters are correct?
[00:49:08] Inside: renlo: translation is basically "In rails, you have to specify which parameters a controller is allowed to update in a model using a white list"
[01:05:49] Inside: Bleh. 50 lines of code to test 15 lines of controller code to raise code coverage 0.1%
[16:32:33] Inside: Er.. anyway, your webserver assumes that whenever you access a resource, you have an imaginary .html at the end
[16:32:57] Inside: ie: likes/234634 is internally thought of as requesting a view for likes/234624.html
[16:33:30] Inside: rails by default assumes that you want to render a .html document so it looks in app/views/likes/show.html (or whatever your action is)
[22:57:19] Inside: I could've sworn that this code would work just fine: https://gist.github.com/Insood/c7eafc28a600eafbdb5edf162146d56b
[17:50:08] Inside: Any time you see a function with ! at the end, that means "this function probably modifies the data in-place"
[17:51:51] Inside: rails tries to follow the same standard as well, but, for example: Model.delete! doesn't exist since Model.delete already deletes stuff for you -- irreversably
[17:52:17] Inside: and the difference between save and save! is that you can recover from "save" - save! throws an exception though
[18:00:29] Inside: for example you could modify the attributes of your model, then call .save to run the validations
[18:01:15] Inside: which - is fine for stuff that can't be handled nicely (ie: rake tasks, etc) or if you really just need to abort abort abort
[21:19:13] Inside: mlt-: I had misconfigured my database.yml to point to a production database when I ran a test and the fixture loading code wiped out some production data ... without me even knowing :)
[18:51:19] Inside: Design Q: Controllers. Let's say I'm using acts_as_list and a model has a position within its parent's context.
[19:56:37] Inside: ie: let's say you want call back to fire whenever a user has like 500 kits to give them a badge
[19:57:23] Inside: I believe has_and_belongs_to_many just assumes that you have a table and magically creates records in that table
[19:58:25] Inside: with has many_through, the association model gets created and you can add logic later
[21:24:15] Inside: oh wait no, that's because I had multiple rails projects running different versions of ruby
[21:40:37] Inside: I hate asking questions like that, but I think with ruby it's more standard to use the existing environment managers since they're better supported
[21:44:33] Inside: you give it a seed and it'll tell you which tests you need to run in order to reproduce your test failure