Skip to content

Commit

Permalink
join result arrays for Ruby 1.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jsntv200 committed Feb 2, 2012
1 parent 6cc5391 commit 07ba1ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/mailer_tags.rb
Expand Up @@ -99,6 +99,7 @@ def mailer_config(mailer_page=self)
}
}
</script>)
results.flatten.join
end

desc %{
Expand Down Expand Up @@ -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 %{
Expand All @@ -143,6 +145,7 @@ def mailer_config(mailer_page=self)
results << render_part(:submit_placeholder)
results << %Q(</div>)
end
results.flatten.join
end

desc %{
Expand Down Expand Up @@ -228,7 +231,7 @@ def mailer_config(mailer_page=self)
result << tag.expand
end
end
result
result.flatten.join
end

desc %{
Expand Down Expand Up @@ -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.