6 Matching Annotations
  1. Dec 2022
    1. For the record, I've changed my position. I now follow that rule (of single quoting unless needed) and love it. I like it visually and it's slightly more explicit, since there's no need to parse the string to see if it contains any expression.
  2. May 2022
  3. Sep 2021
  4. Apr 2021
    1. There's nothing to stop you from doing initializer code in a file that lives in app/models. for example class MyClass def self.run_me_when_the_class_is_loaded end end MyClass.run_me_when_the_class_is_loaded MyClass.run_me... will run when the class is loaded .... which is what we want, right? Not sure if its the Rails way.... but its extremely straightforward, and does not depend on the shifting winds of Rails.

      does not depend on the shifting winds of Rails.

    1. Neither question nor answer appears to understand the notion of semantic HTML. Height and width are presentational attributes regardless of where you put them. For semantics we establish what the image means to content in the alt tag. I don't remember why it was so important to width/height in the HTML but I suspect it was in case you hit browsers without CSS rendering. It's not a semantics issue. If anything it thwarts separation of concerns to a degree.

      claim: that the OP's question and this answer are incorrect

      Could we say that this answer (that this comment replies to) missed the point?

      I actually believed and thought this answer was spot on ... until I read this comment, and then I reversed my opinion.

  5. Oct 2020