Hello,

OK, this is a Ruby question, even though it's for a RoR project :-D
I am a pretty hopeless Ruby programmer. I am getting better, but when 
it's about eval(), symbols and introspection, I still crumble...
Besides, I am not even sure what I want to do is actually possible in 
Ruby.

At one point, in my program I have this:

 def create
    @channel = Channel.new(params[:channel])
    if @channel.save
      flash[:notice] = 'Channel was successfully created.'
      redirect_to :action => 'index'
    else
      render :action => 'new'
    end
  end

What I want to do, is being able to write:

 def create
   ApplicationController::standard_create(:channel)
 end

That "standard_create" function should execute the code, but in 
create()'s scope.
What I don't know is:

1) How to keep the code execute by 
ApplicationController::standard_create in create()'s scope
2) From ApplicationController::standard_create(name), what to do to 
"create the code"

Any help would be _immensely_ appreciated!

Thanks a lot,

Merc.

-- 
Posted via http://www.ruby-forum.com/.