Skip to content

Decoupling ActiveSupport from ActionView #5675

Closed
wants to merge 2 commits into from

5 participants

@amutz
amutz commented Mar 30, 2012

I'm resubmitting this pull request on master, since my previous pull request was on 3-1-stable.

I'm interested in using the ActiveSupport::Testing::Performance module and was surprised to see that it requires and calls code from ActionView. Is this intentional?

I'd like to use this module in a context without ActionView, so I'm submitting a pull request that decouples ActiveSupport from ActionView.

@josevalim
Ruby on Rails member

If it is requiring methods from action view, we could alternatively rewrite it or move the action view methods to AS. /cc @fxn

@carlosantoniodasilva
Ruby on Rails member

Just linking to the other pull request #4952, and following the issue.

@amutz
amutz commented Apr 3, 2012

Hi, I can implement a different solution to the problem if you like. Would you like me to reimplement the logic from NumberHelper in AS::Testing::Performance or would you like me to move the NumberHelper code over to AS (and include it in AV::Helpers::NumberHelpers)?

Thanks!

@josevalim
Ruby on Rails member

I am leaving this decision to @fxn :)

@rafaelfranca rafaelfranca was assigned Apr 30, 2012
@amutz
amutz commented May 11, 2012

The most recent addition to the pull request was an oversight. I will fix it.

But since @fxn is making the call here, how would you like this implemented? I'd still like to decouple activesupport from actionview. How would you like this done? Should I clean up the original pull request, or should I reimplement it one of the ways suggested by @josevalim ?

@carlosantoniodasilva
Ruby on Rails member

@amutz I want to add that there's some idea to extract some of the date/time/number AV helpers to ActiveSupport, and that would probably solve this problem as well by being able to use something like 1.human_size.

#3214

@fxn
Ruby on Rails member
fxn commented May 12, 2012

Hey guys, really busy days lately. Just a heads up to say I have this in my queue.

@amutz
amutz commented May 15, 2012

I've implemented the approach of moving the NumberHelper methods to ActiveSupport:

#6315

Let me know if I can help move this forward in any way.

Thanks!

@carlosantoniodasilva
Ruby on Rails member

I'm closing this in favor of #6526.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.