ReinH

Activity Graph

Page 1 of 1

2018-08-02

[11:04:54] ReinH: Remote host closed the connection

2018-07-20

[00:07:16] ReinH: *.net *.split
[00:15:34] ReinH: has joined #ruby

2018-07-19

[05:29:11] ReinH: Ping timeout: 276 seconds
[05:30:20] ReinH: has joined #ruby

2018-07-18

[05:16:29] ReinH: *.net *.split
[05:35:18] ReinH: has joined #ruby
[05:35:19] ReinH: has joined #RubyOnRails

2018-07-09

[20:10:36] ReinH: has joined #RubyOnRails
[20:10:46] ReinH: Radar: hi

2018-06-20

[03:49:38] ReinH: Ping timeout: 260 seconds
[06:22:58] ReinH: has joined #ruby

2018-05-29

[02:47:13] ReinH: *.net *.split
[02:48:10] ReinH: has joined #ruby

2018-04-25

[11:40:55] ReinH: has joined #ruby
[12:25:54] ReinH: *.net *.split
[12:27:06] ReinH: has joined #ruby
[15:01:25] ReinH: *.net *.split
[15:03:28] ReinH: has joined #ruby

2018-04-17

[04:03:09] ReinH: Ping timeout: 256 seconds

2018-03-21

[16:19:24] ReinH: has joined #ruby

2018-03-05

[11:23:24] ReinH: Quit: Connection closed for inactivity

2018-03-02

[04:11:15] ReinH: Read error: Connection reset by peer

2018-02-28

[23:16:52] ReinH: Ping timeout: 260 seconds
[23:18:20] ReinH: has joined #ruby
[23:24:13] ReinH: Ping timeout: 240 seconds
[23:25:20] ReinH: has joined #ruby

2018-01-22

[15:43:15] ReinH: Ping timeout: 260 seconds
[15:44:08] ReinH: has joined #ruby

2017-12-27

[19:12:53] ReinH: Ping timeout: 252 seconds
[20:05:37] ReinH: has joined #ruby

2017-12-19

[02:15:54] ReinH: @mikhael_k33hl Have you tried googling for your error message?

2017-12-01

[02:28:57] ReinH: has joined #ruby

2017-11-08

[09:43:29] ReinH: *.net *.split
[09:49:05] ReinH: has joined #ruby

2017-11-05

[20:11:51] ReinH: *.net *.split
[21:51:26] ReinH: has joined #ruby

2017-08-14

[23:51:33] ReinH: *.net *.split
[23:54:36] ReinH: has joined #ruby

2017-07-20

[00:04:37] ReinH: I think you want rbenv-exec.
[00:05:45] ReinH: Radar: you're still here eh

2017-07-18

[01:08:58] ReinH: has joined #ruby
[01:09:22] ReinH: Oh, when did #ruby-lang merge with #ruby?

2016-07-09

[06:35:20] ReinH: has joined #ruby

2015-06-10

[02:00:53] ReinH: has left #ruby: ("WeeChat 1.0.1")

2015-05-21

[19:28:37] ReinH: Ping timeout: 265 seconds
[19:54:07] ReinH: has joined #ruby

2015-01-09

[00:36:01] ReinH: Radar: o/

2015-01-07

[01:25:34] ReinH: orangerobot: https://pages.github.com/
[01:26:23] ReinH: kyfho: virtual machines...
[01:52:57] ReinH: or run a desktop linux
[01:53:03] ReinH: and forget you're even in windows at all
[01:53:10] ReinH: kyfho: sure
[18:55:01] ReinH: restart the computer? Should be enough to create a new login session
[18:56:53] ReinH: certainty: yeah
[18:57:39] ReinH: certainty: cool :)

2015-01-03

[00:35:22] ReinH: sweet sweet justice

2014-12-22

[03:16:36] ReinH: hfp: chruby + ruby-install is my preferred method
[03:16:44] ReinH: RVM is too magical and complicated.

2014-12-15

[20:43:46] ReinH: epitron: It's opinionated about things it can control.
[20:43:53] ReinH: It can't control whether or not you have git installed.
[20:44:39] ReinH: epitron: A rough guess? 100x slower.
[20:44:55] ReinH: epitron: I'm not joking...
[20:45:01] ReinH: git is extremely fast even for C

2014-12-12

[17:08:08] ReinH: fwiw, "${ARGS[@]}" would be equivalent to $ARGS[*]

2014-01-24

[16:41:14] ReinH: > M.fromList [(1,1)]

2013-12-06

[22:11:03] ReinH: Gabriel403: some of us use text editors as well...

2013-12-05

[01:14:32] ReinH: Radar: oh god what did I miss?
[01:19:52] ReinH: OhBizzle: you might want to run `rake routes` and look at what is generated for you
[01:21:30] ReinH: OhBizzle: is violation_path one of the generated helpers?
[01:22:06] ReinH: OhBizzle: by looking at the output of rake routes
[01:22:49] ReinH: OhBizzle: then you can't use violaiton_path as a route helper.
[01:22:56] ReinH: or violation_path, for that matter ;)
[01:23:44] ReinH: OhBizzle: well, look in your view for where you're using violation_path and fix it. The backtrace should include line numbers
[01:24:21] ReinH: OhBizzle: (or where violation_path is being magically generated based on something you are doing)
[01:24:33] ReinH: Although it shouldn't be since it doesn't exist...
[01:25:01] ReinH: OhBizzle: (this is why it's useful to post the error and related code when you're reporting problems :)
[01:25:25] ReinH: OhBizzle: are you sure it isn't in rake routes? Can you pastie the output?
[01:25:44] ReinH: (or gist or w/e)
[01:27:55] ReinH: OhBizzle: Ah. "locations" is the route name and "_path" and "_url" are what you add to get the path generation and url generation methods, respectively
[01:28:24] ReinH: OhBizzle: but you're running that on heroku... why not run it locally?
[01:28:47] ReinH: It doesn't seem to match your routes file since it's still listing a "violations" route not nested under locations
[01:29:05] ReinH: oh wait, yes it does
[01:29:58] ReinH: OhBizzle: ok I'm reading the routes output wrong because of wrapping
[01:30:17] ReinH: the Prefix column is the generated helper name, to which you append _path or _url
[01:30:35] ReinH: notice that this gives you, e.g., locations_path, location_violations_url, and so on
[01:32:14] ReinH: OhBizzle: violations_path is a non-existant route.
[01:32:21] ReinH: @voilations and |violation| are your own names
[01:32:25] ReinH: or @violations
[01:32:42] ReinH: OhBizzle: those have nothing to do with routing and could just as well be @foos.each do |foo|
[01:33:31] ReinH: OhBizzle: if you look at the error, it's telling you that violations_path is a method that doesn't exist. So start by fixing that and then you'll either be done or find a new error :)
[01:33:52] ReinH: OhBizzle: It's probably wrong, but you can let Ruby's error reporting tell you that :)
[01:34:24] ReinH: OhBizzle: ofc it won't actually be able to tell you that unless you run that code somehow, like via tests. ;)
[01:54:48] ReinH: OhBizzle: so... stop using "violation_path" :)
[01:55:34] ReinH: OhBizzle: where does the backtrace lead you and what code is there?
[01:59:23] ReinH: OhBizzle: you're really going to want to develop locally...
[01:59:49] ReinH: OhBizzle: but I would recommend looking at app/views/violations/index.html.erb:27
[01:59:54] ReinH: OhBizzle: since that's where it says the error is :)
[02:03:10] ReinH: OhBizzle: you are trying to show a violation, which means Rails will magically try to generate a path for that object
[02:03:28] ReinH: OhBizzle: since that object is a Violation, it will use violion_path
[02:04:09] ReinH: OhBizzle: to fix it, you can either use an explicit route like location_violation_path with the correct args or specify both objects in the path: [violation.location, violation]
[02:04:29] ReinH: which should correctly generate the nested path
[02:05:44] ReinH: the second uses consistent rules, and so is pretty easy to use once you understand those rules.
[21:31:02] ReinH: nobitanobi: if you never want background to have spaces, you can rewrite the setter: def background=(str); write_attribute :background, str.delete(' '); end
[21:31:05] ReinH: nobitanobi: see http://api.rubyonrails.org/classes/ActiveRecord/Base.html#label-Overwriting+default+accessors
[21:31:27] ReinH: (Note that this impl doesn't handle nils, so caveat implementor)
[21:31:49] ReinH: nobitanobi: I figured :) np
[21:31:57] ReinH: nobitanobi: I try to avoid callbacks wherever possible
[21:33:06] ReinH: agent_white: I find it difficult to understand the control flow when significant parts of it happen at a distance through callbacks
[21:33:17] ReinH: I find them opaque and ahrd to reason about
[21:33:59] ReinH: agent_white: If you look hard enough you can almost find a way to do it that doesn't use callbacks, and that way will almost always involve adding some useful abstraction that benefits your code :)
[21:34:17] ReinH: nobitanobi: only if you're worried about background= being called with nil
[21:35:01] ReinH: agent_white: for instance, saving-related callbacks that enforce some consistency properties can be better expressed with some orchestration object that manages a transaction, etc
[21:35:15] ReinH: nobitanobi: background= will only be called when necessary
[21:35:28] ReinH: nobitanobi: up to you how defensive you want to be, and as always you can test things :)
[21:36:27] ReinH: Duckily: if that's what you want to to, they are available via the params object
[21:36:43] ReinH: agent_white: np :)
[21:41:29] ReinH: Duckily: your hash is already a params hash
[21:41:40] ReinH: so you probably don't want params = { params : {...} }
[21:51:22] ReinH: Duckily: well, what you're saying there is "the current params with format set to 'xls', which sounds a lot like the problem you expressed :)
[21:52:04] ReinH: " # close hanging string
[21:52:27] ReinH: elaptics: yes, the best solution to (things you think are hackish) is to hide them :D