Cutting Corners or Why Rails May Kill Ruby
solnic.eu
solnic.eu
That's exactly what you'd do in Scala.
implicit class HtmlHelpers(node: Node) {
def id: String = node \ "@id" text
def name: String = node \ "@name" text
def cssClass: String = node \ "@class" text
def href: String = node \ "@href" text
}
And I haven't abused anything. Whenever I need it, even within another method, I can just import until.HtmlHelpers.So even though I agree with you, I think it's going to be very difficult changing the philosophy of the Rails' ecosystem.