In my GamesController I try to render create_or_update.js that is
stored in the events view dir. Apparently Rails alwayslooks in the
games view dir.
Is there a way I can force Rails to look in the events view dir?
class GamesController < ApplicationController
def create
@event = Game.new(params[:game])
respond_to do |format|
if @event.save
format.js { render :action => '../events/create_or_update' }
#doesn't work
end
end
end
end
In my GamesController I try to render create_or_update.js that is
stored in the events view dir. Apparently Rails alwayslooks in the
games view dir.
Is there a way I can force Rails to look in the events view dir?
class GamesController < ApplicationController
def create
@event = Game.new(params[:game])
respond_to do |format|
if @event.save
format.js { render :action => '../events/create_or_update' }
#doesn't work
end
end
end
end