[PATCH conductor] Fix deployable uploading in Ruby 1.9
Jozef Zigmund
jzigmund at redhat.com
Thu Jun 21 16:01:10 UTC 2012
On Wednesday 13 June 2012 15:58:44 ifarkas at redhat.com wrote:
> From: Imre Farkas <ifarkas at redhat.com>
>
> The Object#instance_variables method in Ruby 1.9 is returning an array of
> symbols instead of and array of strings as in Ruby 1.8 ---
> src/app/models/deployable.rb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/app/models/deployable.rb b/src/app/models/deployable.rb
> index 68e8c4b..9c6aff9 100644
> --- a/src/app/models/deployable.rb
> +++ b/src/app/models/deployable.rb
> @@ -112,7 +112,7 @@ class Deployable < ActiveRecord::Base
> #method used with uploading deployable xml in catalog_entries#new
> def xml=(data)
> #for new
> - if data.instance_variables.include?("@original_filename") &&
> data.instance_variables.include?("@tempfile") + if
> data.is_a?(ActionDispatch::Http::UploadedFile)
> write_attribute :xml_filename, data.original_filename
> write_attribute :xml, data.tempfile.read
> #for update or new from_url
ACK.
More information about the aeolus-devel
mailing list