Skip to content

Commit

Permalink
[api] fix some things ruby1.9 complains about
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Apr 2, 2012
1 parent fd10890 commit 49448fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/api/app/models/db_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def store_axml( project, force=nil )

#--- maintenance-related parts ---#
# The attribute 'type' is only set for maintenance and maintenance incident projects.
kind_element = project.value(:kind)
# kind_element = project.value(:kind)
# First remove all maintained project relations
maintained_projects.each do |maintained_project|
maintained_project.maintenance_project_id = nil
Expand Down
22 changes: 12 additions & 10 deletions src/api/config/initializers/nokogiri-builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

module ActionView
module Template::Handlers
class NokogiriBuilder
class_attribute :default_format
self.default_format = Mime::XML

def call(template)
"xml = ::Nokogiri::XML::Builder.new { |xml|" +
template.source +
"}.to_xml;"
end
end
class NokogiriBuilder

class_attribute :default_format
self.default_format = Mime::XML

def call(template)
"xml = ::Nokogiri::XML::Builder.new { |xml|" +
template.source +
"}.to_xml;"
end

end
end
end

Expand Down

0 comments on commit 49448fd

Please sign in to comment.