Simon Kiteley PRO
Joined 10/25/2016
Simon Kiteley PRO said almost 5 years ago on Using Action Text in a Rails 5.2 Application :
Thanks, that fixed my styling issue :)

Simon Kiteley PRO said almost 5 years ago on Saving Individual Attributes with StimulusJS :
Don't know if it would be of any help to any one but I did this: ``` ``` and ``` switch_on(event) { let data = new FormData() // user[host_video] let that = this; data.append(this.off_switchTarget.name, '1') Rails.ajax({ type: 'PATCH', url: this.url(this.off_switchTarget), dataType: 'json', data: data, success: function (response) { var on = document.getElementById(that.element.getAttribute('id') + '-on'); var off = document.getElementById(that.element.getAttribute('id') + '-off'); on.style.display = 'inline'; off.style.display = 'none'; }, error: function (response) { console.log('Setting could not be saved.')} }) } switch_off(event) { let data = new FormData() let that = this; data.append(this.on_switchTarget.name, '0') Rails.ajax({ type: 'PATCH', url: this.url(this.on_switchTarget), dataType: 'json', data: data, success: function (response) { var on = document.getElementById(that.element.getAttribute('id') + '-on'); var off = document.getElementById(that.element.getAttribute('id') + '-off'); off.style.display = 'inline'; on.style.display = 'none'; }, error: function (response) { console.log('Setting could not be saved.')} }) } ``` Sure my javascript is pants and not my expertise but it works well.

Simon Kiteley PRO said over 4 years ago on Real Time Updates with ActionCable :
Thanks for this. I was thinking how you could have 'somethings' that when included on a page of html could register itself to a channel :)

Simon Kiteley PRO said over 4 years ago on Video Chat with WebRTC :
Don't know if anyone has a clue... used as is. Using the numb server:

Uncaught (in promise) DOMException: Failed to execute 'createAnswer' on 
'RTCPeerConnection': PeerConnection cannot create an answer in a state other than 
have-remote-offer or have-local-pranswer.

Uncaught (in promise) DOMException: Failed to execute 'createAnswer' on 
'RTCPeerConnection': PeerConnection cannot create an answer in a state other than 
have-remote-offer or have-local-pranswer.

Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on 
'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: kStable

Any help appreciated...

Simon Kiteley PRO said almost 4 years ago on The Stimulus 2.0 Tutorial :
This is great. I am totally loving Stimulus. So many complicated server and javascript things are being replaced by much simpler stimulus controllers.