r463 - in trunk/jredmine-client/src/main/redmine: jredmine-1.x/app/controllers jredmine-2.x/app/controllers
Author: tchemit Date: 2014-05-21 11:47:45 +0200 (Wed, 21 May 2014) New Revision: 463 Url: http://forge.nuiton.org/projects/jredmine/repository/revisions/463 Log: fixes #3205: Compilation error with ruby 1.9.1 Modified: trunk/jredmine-client/src/main/redmine/jredmine-1.x/app/controllers/jredmine_controller.rb trunk/jredmine-client/src/main/redmine/jredmine-2.x/app/controllers/jredmine_controller.rb Modified: trunk/jredmine-client/src/main/redmine/jredmine-1.x/app/controllers/jredmine_controller.rb =================================================================== --- trunk/jredmine-client/src/main/redmine/jredmine-1.x/app/controllers/jredmine_controller.rb 2014-04-17 06:49:45 UTC (rev 462) +++ trunk/jredmine-client/src/main/redmine/jredmine-1.x/app/controllers/jredmine_controller.rb 2014-05-21 09:47:45 UTC (rev 463) @@ -359,11 +359,12 @@ container = !@version ? @project : @version if attachment file = attachment['file'] - next unless file && file.size > 0 - a = Attachment.new(:container => container, - :file => file, - :description => attachment['description'].to_s.strip, - :author => User.current) + if file && file.size > 0 + a = Attachment.new(:container => container, + :file => file, + :description => attachment['description'].to_s.strip, + :author => User.current) + end end if a.save if Setting.notified_events.include?('file_added') Modified: trunk/jredmine-client/src/main/redmine/jredmine-2.x/app/controllers/jredmine_controller.rb =================================================================== --- trunk/jredmine-client/src/main/redmine/jredmine-2.x/app/controllers/jredmine_controller.rb 2014-04-17 06:49:45 UTC (rev 462) +++ trunk/jredmine-client/src/main/redmine/jredmine-2.x/app/controllers/jredmine_controller.rb 2014-05-21 09:47:45 UTC (rev 463) @@ -371,11 +371,12 @@ container = !@version ? @project : @version if attachment file = attachment['file'] - next unless file && file.size > 0 - a = Attachment.new(:container => container, - :file => file, - :description => attachment['description'].to_s.strip, - :author => User.current) + if file && file.size > 0 + a = Attachment.new(:container => container, + :file => file, + :description => attachment['description'].to_s.strip, + :author => User.current) + end end if a.save if Setting.notified_events.include?('file_added')
participants (1)
-
tchemit@users.nuiton.org