File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ def open(attributes = nil)
118
118
# @param [#to_s] value
119
119
def attribute ( name , value )
120
120
return __send__ ( name , value ) if respond_to? ( name )
121
- @output << @_str_space << name . to_s << @_str_eql_quote << CGI . escapeHTML ( value . to_s ) << @_str_quote
121
+ @output << @_str_space << name . to_s . gsub ( '_' , '-' ) << @_str_eql_quote << CGI . escapeHTML ( value . to_s ) << @_str_quote
122
122
self
123
123
end
124
124
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ def id;
185
185
end
186
186
187
187
it "#data-secret" do
188
+ quick_render { div ( 'a' , data_secret : "I do not tell." ) } . should == '<div data-secret="I do not tell.">a</div>'
188
189
quick_render { div ( 'a' ) . data_secret ( "I do not tell." ) } . should == '<div data-secret="I do not tell.">a</div>'
189
190
end
190
191
You can’t perform that action at this time.
0 commit comments