EasyCo

Activity Graph

Page 1 of 3 | Next »

2016-07-17

[00:34:02] EasyCo: Quit: Connection closed for inactivity

2016-07-15

[05:31:42] EasyCo: has joined #RubyOnRails
[05:31:55] EasyCo: has joined #ruby
[05:33:04] EasyCo: Hi team, is there a method kind of like all? where I can iterate through an array of objects and check that an attribute value is the same across all objects?
[05:34:55] EasyCo: Radar, more along the lines of: [obj, obj, obj].each { |previous_object, current_object| previous_object.amount == curent_object.amount }
[05:38:02] EasyCo: Cheers Radar, that'll definitely work. So I guess there's no all? meets inject(start_value).

2016-07-08

[03:53:57] EasyCo: Quit: Connection closed for inactivity

2016-07-07

[04:57:18] EasyCo: has joined #RubyOnRails
[05:29:17] EasyCo: Hey team, I'm looking at the most efficient way to join tables via polymorphic association. I'd really appreciate your input: https://gist.github.com/trev/09fa7be23421065a349275280cd2794a
[05:30:13] EasyCo: I see what you did there :)
[05:31:13] EasyCo: @Radar yeah, I've noticed that. Haha.
[05:34:48] EasyCo: I've just been basically stacking JOINS for every profileable type

2016-07-06

[00:43:56] EasyCo: Quit: Connection closed for inactivity

2016-07-04

[21:30:44] EasyCo: has joined #RubyOnRails
[21:31:29] EasyCo: Hey team, can you interpolate ENV variables into a locale yml or does it need to be passed variable?

2016-07-01

[07:59:29] EasyCo: has joined #RubyOnRails
[10:23:53] EasyCo: Quit: Connection closed for inactivity

2016-06-30

[02:58:51] EasyCo: has joined #RubyOnRails
[03:04:00] EasyCo: Hi team, quick question if you'll please. I have the following inflection: inflect.acronym 'ID'. The interesting thing is that it breaks previous migrations such as AddOwnerIdToVersions. Giving me a NameError: uninitialized constant. I'm not sure why this would matter for migrations.
[03:04:52] EasyCo: The obvious solution would be to just rename the migration class AddOwnerIDtoVersions but I fail to see why inflections would be important for the migration class name.
[03:53:59] EasyCo: l4v2: You may want to be slightly more specific with your question.
[08:03:53] EasyCo: Quit: Connection closed for inactivity

2016-05-31

[00:38:16] EasyCo: has joined #RubyOnRails
[12:43:38] EasyCo: Quit: Connection closed for inactivity

2016-05-30

[12:53:37] EasyCo: Quit: Connection closed for inactivity

2016-05-29

[22:20:05] EasyCo: has joined #RubyOnRails

2016-05-05

[10:03:27] EasyCo: Quit: Connection closed for inactivity

2016-05-02

[20:29:04] EasyCo: Ping timeout: 268 seconds

2016-04-26

[01:56:38] EasyCo: has joined #RubyOnRails

2016-04-24

[00:03:22] EasyCo: Quit: Connection closed for inactivity

2016-04-21

[17:19:14] EasyCo: *.net *.split
[17:21:02] EasyCo: has joined #RubyOnRails

2016-04-19

[05:13:19] EasyCo: Quit: Connection closed for inactivity
[23:41:40] EasyCo: has joined #RubyOnRails

2016-04-18

[11:10:48] EasyCo: Ping timeout: 276 seconds
[11:18:41] EasyCo: has joined #RubyOnRails
[12:53:19] EasyCo: Quit: Connection closed for inactivity
[22:15:35] EasyCo: has joined #RubyOnRails

2016-04-17

[22:49:50] EasyCo: has joined #RubyOnRails

2016-04-15

[13:03:17] EasyCo: Quit: Connection closed for inactivity

2016-04-14

[09:27:46] EasyCo: Ping timeout: 244 seconds

2016-04-13

[03:44:38] EasyCo: has joined #RubyOnRails
[04:03:03] EasyCo: Can anybody tell me if the rails subdomain constraints just checks the outer most subdomain? So for instance, given the following URL: api.sandbox.unicorns.com, will the subdomain 'api' match this?
[04:05:12] EasyCo: I would but not on a machine where I can at the moment
[04:12:13] EasyCo: Oh well, guess I'll check when I get home whether just subdomain: 'api' is sufficient or if I'll need to get regex'ing.
[04:30:55] EasyCo: For anybody that cares, when you pass a string to `constraints subdomain:` Rails will try and match the string against all subdomains up to the root domain. So if you have a URL such as api.sandbox.unicorns.com and you want to match api as the subdomain you have to break out the regex a'la /^api(\.|$)/
[04:33:52] EasyCo: n_e_o: Information sharing from my question before you joined.
[04:41:20] EasyCo: Radar: Yep that's right... and if you use a string ('api') for the subdomain constraint it matches against the subdomains (api.sandbox) with the equivalent of /^api$/ instead of /^api(\.|$)/. I just wasn't sure which one was the default and still can't find exactly where that's handled in the codebase. This is just what I've discovered through testing.
[04:54:22] EasyCo: Ahh, that's an interesting way to do it! I like. I just used regex: contraints subdomain: /^api(\.|$)/ do ...
[09:47:53] EasyCo: *.net *.split

2016-01-28

[08:40:04] EasyCo: has joined #RubyOnRails
[08:40:04] EasyCo: has joined #ruby
[08:43:03] EasyCo: Hey guys, I'm trying to use Refinements but the redefined setter method "number" never gets called in the refinement. Am I missing something? https://gist.github.com/trev/b5529ef5fc716c3f89f9
[08:44:47] EasyCo: Nevermind my question. It's a scoping issue.
[11:00:34] EasyCo: Quit: Connection closed for inactivity

2016-01-25

[00:00:33] EasyCo: Quit: Connection closed for inactivity

2016-01-22

[20:22:16] EasyCo: has joined #ruby
[20:22:17] EasyCo: has joined #RubyOnRails

2015-12-08

[00:17:56] EasyCo: has joined #RubyOnRails
[00:17:56] EasyCo: has joined #ruby
[00:21:15] EasyCo: Hey team, I inherited a Rails app that uses the same layouts/application.html.haml but has a user nav and an admin nav depending on what page is being viewed. Typically I'd just use template inheritance and chuck that admin_nav in views/admin/_admin_nav.html.haml but in this project, all the controllers in controllers/admin/ inherit from
[00:21:16] EasyCo: ApplicationController instead of a base AdminController. it does however use Concerns and includes AdminController in all the admin controllers. Can I achieve template inheritance without restructuring to the above?
[00:29:25] EasyCo: Radar: That's a bit harsh. It's just a side project. Thanks anyways.
[00:30:37] EasyCo: Time for a holiday mate. Wow.
[00:33:00] EasyCo: I'll gladly share the code.
[00:41:19] EasyCo: Here's the abbreviated code to accompany my above question: https://gist.github.com/trev/f62fd35f553ddc7c1bfc
[06:20:23] EasyCo: Quit: Connection closed for inactivity

2015-11-23

[10:54:47] EasyCo: Quit: Connection closed for inactivity

2015-11-17

[22:02:38] EasyCo: Hey team, what's the go with 'require'ing files at the bottom. Exhibit A: https://github.com/apotonick/cells/blob/master/lib/cell.rb

2015-11-14

[22:58:40] EasyCo: has joined #ruby
[22:58:41] EasyCo: has joined #RubyOnRails
[23:00:49] EasyCo: Hey team, what're your preferences for namespacing? Nested classes (class Car; class Chassis; end; end;, or simply class Car::Chassis? Don't worry about modules.
[23:01:50] EasyCo: Ox0dea: I worry about them all the time, but given those two scenarios. Which do you typically choose?

2015-11-06

[04:00:35] EasyCo: Hey team, how do you guys typically test main/run type method? For instance, imagine a class method called .run. In that method we initialize a few other classes then we return a result in the form of a string.
[04:02:05] EasyCo: Would you actually test what's happening inside that method or would you just black-box it and test the result of calling that method?
[04:03:40] EasyCo: Ox0dea: What do you mean by make pure?
[04:06:00] EasyCo: Right, that's still all pretty vague to me, haha.
[12:14:41] EasyCo: Quit: Connection closed for inactivity

2015-11-05

[23:41:00] EasyCo: Ping timeout: 264 seconds
[23:42:36] EasyCo: has joined #RubyOnRails
[23:42:36] EasyCo: has joined #ruby

2015-11-04

[02:26:36] EasyCo: Functional <3
[02:30:54] EasyCo: What weaksauce said.
[02:31:09] EasyCo: Also worth checking: https://github.com/tcrayford/Values
[02:34:20] EasyCo: It's such a simple concept. It's beauty is in its simplicity.
[02:36:22] EasyCo: Read only memory?
[02:36:40] EasyCo: Risk of mutiny?
[02:37:17] EasyCo: Damn, that's less exciting than risk of mutiny.

2015-10-31

[16:40:06] EasyCo: Ping timeout: 240 seconds
[16:44:41] EasyCo: has joined #RubyOnRails
[16:44:41] EasyCo: has joined #ruby

2015-10-30

[06:02:05] EasyCo: has joined #ruby
[06:02:11] EasyCo: has joined #RubyOnRails

2015-10-15

[10:54:33] EasyCo: Quit: Connection closed for inactivity

2015-10-14

[02:13:25] EasyCo: has joined #ruby
[02:13:31] EasyCo: has joined #RubyOnRails
[21:56:57] EasyCo: Given this line: ` _, @type, @amount, _, @ref = string.split(',')` - Is the _ just used as a dummy or is something else happening there?
[21:58:41] EasyCo: drbrain: Yep, so it's just used so the other variables can be assigned to the correct information.
[22:01:56] EasyCo: toretore: It wont warn you in what context?
[22:05:27] EasyCo: Gotcha, thanks toretore & drbrain. I'd never heard that vars prefixed with _ were special like that (https://bugs.ruby-lang.org/issues/6693)

2015-10-13

[12:04:33] EasyCo: Quit: Connection closed for inactivity

2015-10-12

[03:54:39] EasyCo: Is there a method to list all classes that inherit from a class?
[03:58:09] EasyCo: I ended up using: ObjectSpace.each_object(Class).select { |klass| klass < self }
[21:29:32] EasyCo: Is there any difference between explicitly defining symbol as method params vs not? i.e: def my_method(:param1, :param2) VS def my_method(param1, param2)
[21:31:33] EasyCo: jhass, shevy: Gahhh, thanks. I completely misread this code snippet. My bad. Thanks.
[21:34:22] EasyCo: Actually what I saw was a class definition like: class MyClass < SomeClass.new(:param1, :param2)
[21:34:36] EasyCo: I've never seen that before, what's the intent there?

2015-10-09

[01:40:35] EasyCo: has joined #ruby
[01:40:41] EasyCo: has joined #RubyOnRails
[01:41:45] EasyCo: Anybody here use CodeClimate and added a repo and had it continuously show: "Generating code quality metrics" in the project dashboard?
[02:02:40] EasyCo: Everytime I think Ruby, I think http://mislav.uniqpath.com/poignant-guide/
[02:02:44] EasyCo: and I like that

2015-10-08

[04:30:23] EasyCo: Hey team, say you were adding a method to the BigDecimal class in a PORO. How would you go about adding it in? Would you just create a file like big_decimal_addons.rb and require it where it's needed? Or perhaps just have an helpers.rb file and chuck it in there... I just can't decide one what looks less ugly.
[12:04:31] EasyCo: Quit: Connection closed for inactivity

2015-10-07

[04:19:27] EasyCo: has joined #ruby
[04:19:33] EasyCo: has joined #RubyOnRails
[19:27:00] EasyCo: Ping timeout: 240 seconds
[19:28:05] EasyCo: has joined #ruby
[19:28:11] EasyCo: has joined #RubyOnRails

2015-10-01

[03:51:44] EasyCo: has joined #ruby
[03:51:50] EasyCo: has joined #RubyOnRails
[13:17:59] EasyCo: Quit: Connection closed for inactivity

2015-09-27

[09:17:57] EasyCo: Quit: Connection closed for inactivity

2015-09-24

[00:02:50] EasyCo: beauby: Yah, pretty much what I was thinking. Thanks for validating my thoughts :)

2015-09-23

[23:10:12] EasyCo: has joined #ruby
[23:10:18] EasyCo: has joined #RubyOnRails
[23:54:20] EasyCo: one of them?
[23:54:20] EasyCo: Hey team, given the scenario where you have the following: Vehicle::Car.new(some_attrs). But you also have a wrapper/factory method which is part of the advertised public API: Vehicle.car(some_attrs). The latter does nothing special, it just proxies the values to Vehicle::Car.new(). Would you write test coverages for both ways of instantiating a car or just

2015-09-20

[03:11:22] EasyCo: Quit: Connection closed for inactivity

2015-09-18

[00:57:28] EasyCo: has joined #ruby
[00:57:34] EasyCo: has joined #RubyOnRails
[00:58:58] EasyCo: Hey guys, can somebody shed some light on why they'd be using Thread.current here: https://github.com/rilian/devise-doorkeeper-cancan-api-example/blob/master/app/controllers/api/base_controller.rb
[01:04:33] EasyCo: Figured as much but I just don't understand what case/scenario it protects against

2015-09-16

[12:46:33] EasyCo: Read error: Connection reset by peer
[12:47:18] EasyCo: has joined #ruby
[12:47:23] EasyCo: has joined #RubyOnRails
[13:51:21] EasyCo: Quit: Connection closed for inactivity

2015-09-15

[13:51:20] EasyCo: Quit: Connection closed for inactivity
[22:07:27] EasyCo: has joined #ruby
[22:07:33] EasyCo: has joined #RubyOnRails

2015-09-11

[02:20:06] EasyCo: has joined #ruby
[02:20:12] EasyCo: has joined #RubyOnRails

2015-09-10

[13:11:19] EasyCo: Quit: Connection closed for inactivity

2015-09-09

[00:48:26] EasyCo: Read error: Connection reset by peer
[00:51:28] EasyCo: has joined #ruby
[00:51:34] EasyCo: has joined #RubyOnRails
[13:31:18] EasyCo: Quit: Connection closed for inactivity
[22:59:51] EasyCo: has joined #ruby
[22:59:57] EasyCo: has joined #RubyOnRails

2015-09-08

[05:36:16] EasyCo: has joined #ruby
[05:36:22] EasyCo: has joined #RubyOnRails

2015-07-22

[02:13:52] EasyCo: has joined #ruby
[02:13:57] EasyCo: has joined #RubyOnRails
[08:34:55] EasyCo: Quit: Connection closed for inactivity

2015-07-21

[09:14:54] EasyCo: Quit: Connection closed for inactivity

2015-07-20

[03:27:09] EasyCo: has joined #ruby
[03:27:15] EasyCo: has joined #RubyOnRails
[05:36:49] EasyCo: Ping timeout: 246 seconds
[05:55:35] EasyCo: has joined #ruby
[05:55:41] EasyCo: has joined #RubyOnRails
[13:44:54] EasyCo: Quit: Connection closed for inactivity

2015-07-02

[05:11:15] EasyCo: has joined #RubyOnRails
[05:11:15] EasyCo: has joined #ruby
[14:54:48] EasyCo: Quit: Connection closed for inactivity

2015-07-01

[04:23:43] EasyCo: has joined #RubyOnRails
[04:23:43] EasyCo: has joined #ruby
[06:54:47] EasyCo: Quit: Connection closed for inactivity

2015-06-29

[11:24:45] EasyCo: Quit: Connection closed for inactivity

2015-06-28

[22:36:28] EasyCo: has joined #RubyOnRails
[22:36:28] EasyCo: has joined #ruby

2015-06-24

[01:17:31] EasyCo: has joined #ruby
[01:17:36] EasyCo: has joined #RubyOnRails
[03:16:47] EasyCo: Hey team, I'm parsing an ugly date like so:
[03:16:56] EasyCo: >> Date.parse("08.08.15").strftime("%d/%m/%y")
[03:17:13] EasyCo: >> require 'Date'; Date.parse("08.08.15").strftime("%d/%m/%y")
[03:17:47] EasyCo: Hah, yah, exactly, thanks.
[03:17:59] EasyCo: Anyways, the date is actually 08/08/2015
[03:18:45] EasyCo: Anyway around that issue other then manually parsing the date using regex?
[03:21:41] EasyCo: Ox0dea: Thanks, I did not know that. I just noticed that the data I'm parsing has no standard date input so it's all over the shop... So strptime wont work, cool nonetheless. Cheers.
[03:29:56] EasyCo: Ox0dea: Yep, ~50 Google spreadsheets averaging a few thousand rows each with no normalized data to be parsed and exported into a specific system format. Fun Fun.
[03:32:46] EasyCo: Ox0dea: Nah, jus rolled my own
[03:38:20] EasyCo: Ox0dea: Yep, 166 lines of gorgeous regex and loops!
[08:34:44] EasyCo: Quit: Connection closed for inactivity

2015-06-19

[14:24:41] EasyCo: Quit: Connection closed for inactivity

2015-06-16

[00:44:16] EasyCo: has joined #ruby
[00:44:21] EasyCo: has joined #RubyOnRails
[00:46:32] EasyCo: Hey guys, is there a built-in method that will loop through an array and allow you to pass it a block with a conditional statement? If it's false, it'll stop and return false but if it iterates through all the elements successfully it'll return true.
[00:50:27] EasyCo: Ox0dea: all? !!! Thanks, I just couldn't remember or find it for the life of me. Cheers.
[22:30:24] EasyCo: Say you're using a gem, and you initialise the gem's class with arguments. How would you expect those arguments to be validated? On instantiation and throw and exception? On instantiation and return nil but have an #errors method (a-la Rails)? Manually run a #valid? method on instance after and get a list of #errors.
[22:41:55] EasyCo: havenwood: Unfortunately in this instance duck typing wouldn't work because the gem takes information and outputs a parsed plain text file. So the user could really give it whatever value they want as long as it's a string within a certain max length. I'm just undecided of the best way to deal with that validation.

2015-06-11

[03:28:43] EasyCo: has joined #RubyOnRails
[03:28:43] EasyCo: has joined #ruby
[10:30:50] EasyCo: If I'm working on a gem and want to require it for testing purposes without actually building and installing the gem, what are my options?
[10:38:15] EasyCo: Yah, exactly, bundler keeps fucking with my juju
[10:40:04] EasyCo: pry -I ./lib -rgemname
[10:40:09] EasyCo: Beautiful, thanks zenspider
[10:40:35] EasyCo: Good to go to bed on a small win.
[14:24:39] EasyCo: Quit: Connection closed for inactivity

2015-05-26

[15:14:55] EasyCo: Quit: Connection closed for inactivity

2015-05-25

[01:44:49] EasyCo: has joined #RubyOnRails
[01:44:49] EasyCo: has joined #ruby

2015-05-02

[07:17:03] EasyCo: Hey guys, I don't use helpers in my app as I use presenters/decorators but I now need to do perform some logic in my flash partial. However since the flash isn't part of the object I'm displaying I can't decorate it. Any suggestions or is a helper the only way to go here?

2015-02-26

[01:20:01] EasyCo: Hey guys, need some API design advice. Preamble: A `user` has_many `clients`. A user needs to be authenticated to use the API. Would you prefer the end-point: GET /clients or GET /users/myusername/clients to retrieve a list of your clients?
[01:20:43] EasyCo: The latter is "more" RESTful I suppose but both are can work due to the authentication mechanism.
[01:22:02] EasyCo: rhizome: Exactly right.
[01:23:29] EasyCo: /users/myusername/clients
[01:23:35] EasyCo: /users/myusername/clients seems more explicit though
[01:24:07] EasyCo: There's no doubt about what it's going to do whereas just /clients can mean many things...
[01:24:14] EasyCo: jerry_tao: Yah it seems to come down to taste
[01:25:14] EasyCo: Radar: Good point.
[01:27:40] EasyCo: I think I'm going to implement both because we will have users that can access different users' clients. If authenticated as standard user: /clients returns authenticated users clients, if authenticated as a super user: /users/username/clients will return the specified users' clients.
[01:27:47] EasyCo: I like that :)
[01:29:26] EasyCo: Thanks for being a good sounding board guys! Needed to hash that one out and my dog was of little help.
[01:33:53] EasyCo: sevenseacat: I feel your pain. Mine doesn't even acknowledge the problems he's presented with: https://www.dropbox.com/s/nnwqqwl92e2nglh/IMG_0386.JPG?dl=0
[01:35:28] EasyCo: He'd take offence to that :)

2015-02-17

[00:01:12] EasyCo: basichash: not an easy question to answer but I'm assuming you're using standard Rails views and not some frontend JS framework like Ember. If those assumptions are right I'd keep it as the same app.
[00:03:00] EasyCo: You need to edit your /etc/hosts file
[00:05:14] EasyCo: basichash: Pretty good discussion here about separating repos: http://discuss.emberjs.com/t/new-app-w-rails-same-repo-or-separate/5744
[00:05:53] EasyCo: Pretty cool. Didn't know about lvh.me.
[00:06:07] EasyCo: Not that adding a record to /etc/hosts is much work...
[00:07:55] EasyCo: basichash: I'm assuming it has a wildcard domain like *.lvh.me that points to 127.0.0.1. So api.lvh.me:3000 will be your rack server.
[00:11:36] EasyCo: basichash: https://reinteractive.net/posts/199-developing-and-testing-rails-applications-with-subdomains
[00:11:54] EasyCo: Radar: How's that comign along anyways?
[00:12:45] EasyCo: I tip my hat to you, fucking hate writing...
[00:14:06] EasyCo: Radar: No better way to really solidify your understanding and knowledge I'm assuming
[00:15:28] EasyCo: Glad to hear, I read up on the previous issues with getting the book completed. Hard work indeeed.
[00:16:50] EasyCo: Haha, I can imagine.
[00:17:44] EasyCo: Is Yehuda still contributing to the book?
[03:38:26] EasyCo: Radar: Come up for a holiday in Byron Bay :)
[03:38:34] EasyCo: That if you like the sun and surf

2015-02-16

[22:16:26] EasyCo: Anybody know why Rails uses assert_not instead of refute?
[22:19:19] EasyCo: I'm looking at both method signatures and they look pretty similar... Just wondering if I'm missing something or it's just a semantic preference...
[22:53:16] EasyCo: I sometimes see assert_not_include method in tests. Where does that method come from?
[22:55:19] EasyCo: pipework: Was hoping having to not cloning a repo to find out :)
[22:56:34] EasyCo: Sure, congratulations.
[22:57:02] EasyCo: Always take the path of least resistance first. Ask on IRC.
[22:57:30] EasyCo: I have, that was number one :)
[22:57:33] EasyCo: Anyways, I just foudn it
[23:11:27] EasyCo: Actually, by default, from within rails, assert_not_include isn't available. assert_not_include(s) however seems to simply be an alias of refute_includes. Just can't find where that alias is defined.
[23:16:47] EasyCo: smathy: Thanks heaps! I was combing through minitest, should of known it would be in AS.
[23:18:00] EasyCo: Yep, sweet. Is ag like Ack?
[23:18:44] EasyCo: Ahhhhh: https://github.com/rails/rails/search?utf8=%E2%9C%93&q=assert_not_includes
[23:19:08] EasyCo: It's cause I was searching assert_not_include and assuming it would still return assert_not_includes instances...
[23:19:47] EasyCo: Anyway, thanks for your help, much obliged!
[23:23:05] EasyCo: ApiController
[23:25:57] EasyCo: By updating your inflections
[23:26:08] EasyCo: config/initializers/inflections.rb
[23:57:05] EasyCo: basichash: Awesomely
[23:57:50] EasyCo: Have a look at https://github.com/rails-api/rails-api if you're using it only as an api and want to reduce the footprint and get a bit of sugar sugar