Exception: ActionView::WrongEncodingError
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
EncodingError ,
StandardError
|
|
Instance Chain:
self,
EncodingError ,
StandardError
|
|
Inherits: |
ActionView::EncodingError
|
Defined in: | actionview/lib/action_view/template/error.rb |
Class Method Summary
- .new(string, encoding) ⇒ WrongEncodingError constructor
Instance Method Summary
Constructor Details
.new(string, encoding) ⇒ WrongEncodingError
# File 'actionview/lib/action_view/template/error.rb', line 15
def initialize(string, encoding) @string, @encoding = string, encoding end
Instance Method Details
#message
[ GitHub ]# File 'actionview/lib/action_view/template/error.rb', line 19
def @string.force_encoding(Encoding::ASCII_8BIT) "Your template was not saved as valid #{@encoding}. Please " \ "either specify #{@encoding} as the encoding for your template " \ "in your text editor, or mark the template with its " \ "encoding by inserting the following as the first line " \ "of the template:\n\n# encoding: <name of correct encoding>.\n\n" \ "The source of your template was:\n\n#{@string}" end