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?!!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---