Displaying 2 results from an estimated 2 matches for "sherzod".
Did you mean:
sherrod
2010 Jun 23
3
Custom default form builder in Rails 3
Hello everyone,
I am trying to set a default custom form builder.
I have defined my form builder class in "lib/mymodule/mybuilder.rb"
as:
module Mymodule
class Mybuilder < ActionView::Helpers::FormBuilder
......
end
end
Then I am trying to use this custom class in application.rb as
config.action_view.default_form_builder = Mymodule::Mybuilder. But I
get "Uninitialized
2010 Nov 01
1
Encoding::UndefinedConversionError on a simple file upload (rvm, MRI-1.9.2-p0, rails 3.0.1, apache+passenger)
Hello everyone.
I am having the encoding issue on a simple file upload action:
Encoding::UndefinedConversionError in MainController#upload
"\xC4" from ASCII-8BIT to UTF-8
The action looks like this:
def upload
@uploaded_io = params[:upload]
File.open(Rails.root.join(''public'', ''images'',
@uploaded_io.original_filename), ''w'')