On Sunday, January 5, 2020 at 8:41:33 AM UTC-5, Ariel Juodziukynas wrote:
>
> No, the first line is ruby and the convention is snakecase so it's ok you 
> use underscores, the second line is html and the attributes syntax is 
> hyphen, when you access that data attribute with javascript it will be 
> dataset.conversationWithId as camelcase. You should write using the 
> convention of the language you are using, then each language takes care of 
> converting it.
>
> El dom., 5 ene. 2020 a las 4:35, fugee ohu (<fuge...@gmail.com 
> <javascript:>>) escribió:
>
>> <%= content_tag :div, id: "message_holder", data: {conversation_with_id: @
>> conversation_with.id} do %>
>>
>> translates to this html from page source:
>>
>> <div id="message_holder" data-conversation-with-id="3">
>>
>> The underscores get translated to hyphens Should I just rename the variable 
>> to conversation-with-id ?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to rubyonra...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/8da006ce-97eb-49d2-aa3f-b2226c8f0ef5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/rubyonrails-talk/8da006ce-97eb-49d2-aa3f-b2226c8f0ef5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
In my case, since I used   `received(data) {`  do you mean dataset or data ?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/cc4dc30a-d0be-4df7-9ecb-450bc88669a1%40googlegroups.com.

Reply via email to