Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
Capitalize data type value for levels
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyT committed Apr 25, 2013
1 parent 576bf5e commit ace4079
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rubiks/level.rb
Expand Up @@ -25,7 +25,7 @@ def to_xml(builder = nil)
builder = builder || new_builder

xml_attrs = {:name => caption, :column => column}
xml_attrs[:type] = data_type.to_s if data_type.present?
xml_attrs[:type] = data_type.to_s.titleize if data_type.present?
builder.level(xml_attrs)
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/examples/simple_mondrian_schema_spec.rb
Expand Up @@ -29,9 +29,9 @@
<dimension name="Date" foreignKey="date_id">
<hierarchy name="Year Quarter Month" primaryKey="id" hasAll="true">
<table name="view_dates"/>
<level name="Year" column="year" type="numeric"/>
<level name="Quarter" column="quarter" type="string"/>
<level name="Month" column="month" type="numeric"/>
<level name="Year" column="year" type="Numeric"/>
<level name="Quarter" column="quarter" type="String"/>
<level name="Month" column="month" type="Numeric"/>
</hierarchy>
</dimension>
<measure name="Sales" aggregator="sum" column="sales" formatString="$#,###"/>
Expand Down

0 comments on commit ace4079

Please sign in to comment.