Hello, I’m trying Rails 1.2 (edge-rails), and having a method in
ApplicationController it isn’t visible by
another controller, why?
class ApplicationController < ActionController::Base
def set_charset
str_type = request.xhr? ? “javascript” : “html”
@headers[“Content-Type”] = “text/#{str_type}; charset=ISO-8859-1”
end
end
class BackupsController < ApplicationController
after_filter :set_charset
def index
list
render :action => ‘list’
end
def list
@backup_pages, @backups = paginate :backups, :per_page => 10
end
end
The error:
NoMethodError in BackupsController#list
undefined method `set_charset’ for #BackupsController:0xb772a74c
What’s happening!!!