Midwest Dev Chat

MidwestDevChat.com github.com/skidvis/Midwest-Dev-Chat

  • The newest 15 messages in the super-cool #ruby channel.

  • 04/06 11:27:50 Jordyn: No, a route definition is one helper one resource url

  • 04/06 11:28:33 Jordyn: easiest way to deal with this is redirection/rewriting in the http layer

  • 04/06 13:29:12 Clifford: I thought about doing something like mod_rewrite or a rack middleware, but then the links produced by the underlying helper would be wrong for one of the subdomains

  • 04/06 13:29:51 Clifford: so custom url helpers that check the request subdomain before picking which url helper to use is the best I came up with

  • 04/06 13:30:38 Clifford: Thanks for the suggestion. It’s pretty clear to me now I’m asking route helpers to do something they aren’t intended to do.

  • 04/06 13:30:59 Jordyn: I think having two routes to the same place in general is a bad idea

  • 04/06 13:31:17 Jordyn: better to pick one, and redirect the other

  • 04/06 13:32:25 Clifford: the client would really like this to work transparently through a sub-domain and I didn’t want to create extra controllers just for that. I guess 2 DRY controllers might be simpler than the solution I came up with though.

  • 04/06 13:33:40 Clifford: I’d then have to have separate views that used different helpers, so I’m not sure. I’m starting to doubt there is a clean and simple solution.

  • 04/12 17:16:02 Maritza: 1) What is your current approach to integration/Javascript testing in Rails? (Assuming greenfield development.)
    2) Has this changed in a Rails 5.1+ world?

  • 04/13 09:22:35 Berneice: 1) If not needing JS testing, just capybara.
    If needing JS tests, normally I’d say capybara + poltergeist (which uses phantomjs as a driver), but seeing this today https://twitter.com/rvagg/status/852483040164986882 might make me look for alternatives.
    Maybe something chromium/electron based (see if I could get some sort of capybara + nightmare.js working together).
    Still poltergeist + capybara have worked well for me in the past so I’d go for that.
    2) I haven’t had a greenfield project using Rails 5.1+ yet cry

  • 04/13 11:44:37 Jordyn: I wrote some JS tests using Konacha & PhantomJS, was easy to get started

  • 04/13 11:44:40 Jordyn: https://github.com/jfirebaugh/konacha

  • 04/13 11:45:39 Jordyn: depends on how high-level your tests need to be, though

  • 04/17 09:18:37 Adan: does anyone know if there’s a way to tell Typheous to tell libcurl to not reuse existing connections?

  • *Usernames have been changed to protect the innocent.

Check out all the cool channels!

Join the conversation!