Permalink
Browse files

join result arrays for Ruby 1.9 compatibility

  • Loading branch information...
1 parent 6cc5391 commit 07ba1ab1c4d54512e073c696ddaf05c06f22674f @jsntv200 jsntv200 committed Feb 2, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/mailer_tags.rb
View
@@ -99,6 +99,7 @@ def mailer_config(mailer_page=self)
}
}
</script>)
+ results.flatten.join
end
desc %{
@@ -131,6 +132,7 @@ def mailer_config(mailer_page=self)
else
result = [%(<input onclick="showSubmitPlaceholder();" type="submit" value="#{value}" #{mailer_attrs(tag)} />)]
end
+ result.flatten.join
end
desc %{
@@ -143,6 +145,7 @@ def mailer_config(mailer_page=self)
results << render_part(:submit_placeholder)
results << %Q(</div>)
end
+ results.flatten.join
end
desc %{
@@ -228,7 +231,7 @@ def mailer_config(mailer_page=self)
result << tag.expand
end
end
- result
+ result.flatten.join
end
desc %{
@@ -378,10 +381,10 @@ def mailer_attrs(tag, extras={})
def add_required(result, tag)
result << %(<input type="hidden" name="mailer[required][#{tag.attr['name']}]" value="#{tag.attr['required']}" />) if tag.attr['required']
- result
+ result.flatten.join
end
def raise_error_if_name_missing(tag_name, tag_attr)
raise "`#{tag_name}' tag requires a `name' attribute" if tag_attr['name'].blank?
end
-end
+end

0 comments on commit 07ba1ab

Please sign in to comment.