Session scoped controllers

I was wondering if the notion of session scoped controllers has ever
been discussed?

The idea is that you could do something like this:

def MyController < ActionController::SessionBase

def step1
@favorite_color = params[:color]
end

def step2
# when step2 is hit by the user
# @favorite_color would auto-magically be here
puts “favorite color is #{@favorite_color}”
end

end

I realize this could be accomplished by stashing stuff in the session,
but I thought the abstraction might be interesting.

thoughts?

eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs