Search Ideas
1824 ideas match your query.:
I think the thing I’m really fighting here is Rails being object-oriented. Which I can’t do anything about.
Not sure the Rails team realizes how much OOP reduces the extensibility of Rails.
Having explored three different ideas, I believe #302 – having regular helper methods to render Hiccdown structures – is the best.
The idea is not without its flaws, but having to qualify a method name by, say, calling it idea_form instead of form is still better than manually having to pass the view context around all the time and not being able to trivially access instance variables.
So I’ll stick with #302 for now, which is the status quo already.
#327 applies here, too: no access to instance variables inside helper class methods.
Instance variables are not available inside the methods.
I’m trying this now. Having to prepend every invocation of a helper method with vc. is getting really old really fast.
Tested, it works. self does indeed point to the view_context in the helper. Verified by printing object_ids.
I don’t like the term ‘renderer’ yet. It’s too loaded with meaning, what with Rails already having a render method in controllers and another render method in views…
I don’t think that’s something people would do a lot, but they still easily could: ProductsRenderer.index(self)
Hiccdown methods should live in their own, separate modules. How about they are called ‘renderers’?
module ProductsRendererdef self.index vc, # …vc.some_helper_methodendend
That would be mixing class methods an instance methods in Rails helper modules, which typically only contain instance methods. Not idiomatic Rails usage.
If so, there might be a way to bind them to the view_context. Or I could definitely pass the view_context explicitly as the first parameter:
So instead of
@helper_module.instance_method(@action_name).bind_call(view_context)
I would do
@helper_module.send(@action_name, view_context)
And the parameter list of each Hiccdown method would start accordingly:
module ProductsHelperdef self.index vc #, …vc.some_helper_methodenddef some_helper_method# …endend
That isn’t a good idea because Hiccdown methods often share the same conventional names (index, show, etc), which can and does lead to conflict.
I’m pro abortion but I have some pro life in me.
Banning the abortion of a zygote seems ridiculous. So does aborting a seven-month-old fetus.
Why not go with: you can abort until the nervous system develops.
Clearly, an embryo without a nervous system can’t be sentient and thus can’t be a person, right? And as long as it’s not a person, it doesn’t have any rights.
According to https://www.neurosciencefoundation.org/post/brain-development-in-fetus, “an embryo’s brain and nervous system begin to develop at around the 6-week mark.” And: “At as early as 8 weeks (about 2 months), you can see physical evidence of the brain working (the electric impulses) as ultrasounds show the embryo moving.”
This idea is for viable pregnancies only. Other considerations may apply for non-viable ones.
Clearly, a fetus without a nervous system can’t be sentient and thus can’t be a person, right?
It’s not considered a fetus until week 9, at which point the nervous system has already begun building.
The correct word to use here is ‘embryo’.
If an already-born person is deadly ill, that doesn’t mean you can kill them. Why should that be any different for an unborn person?
What happens if only one of two twins is non-viable but abortion would kill both?
I have addressed this issue separately – it’s a separate idea. #274
The heartbeat has no particular epistemological or moral relevance.
Defensive force and security services are productive endeavors.
Retaliatory force is only part thereof, and defense involves the employment of scarce resources, thus economic principles apply. (Logan Chipkin)
If the government tries to step outside the free market, that’s tantamount to pretending there’s magically no scarcity for the government. But in reality, the government still has to attract talent to fill government jobs, pay that talent, and use scarce resources. If it tries this without the error-correction mechanisms the free market provides, it will do anything poorly.
Two people out in international waters, or in space, or anywhere else with no government, can still have consensual interactions. For example, they can decide to share a sandwich. That’s still consensual if neither party has a preference that arbitrarily steamrolls over the other.
There are already consensual interactions between people that are nonetheless unregulated. Sex, for instance.