[Rails] how do i append an image to a dom element using javascript

2020-01-28 Thread fugee ohu
how do i append an image to a dom element using javascript -- 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.

Re: [Rails] Re: general 3rd party troubleshooting tips?

2020-01-28 Thread Brandon McClelland
"It had been working, now it's not" - something changed between then and now. Look for code updates, version updates, server updates. I'd start with recent code changes you made - do any odd branch switching? On Tue, Jan 28, 2020 at 1:05 PM Joe Guerra wrote: > ___ > |/ | > |

[Rails] Re: general 3rd party troubleshooting tips?

2020-01-28 Thread Joe Guerra
___ |/ | | (_) | \|/ || | / \ | __|___ On Monday, January 27, 2020 at 11:09:56 AM UTC-5, Joe Guerra wrote: > > > I'm not sure what happened to this commontator gem ( > https://github.com/lml/commontator ) I'm using in my app. It

Re: [Rails] activestorage user.avatar.attached? in javascript

2020-01-28 Thread Ariel Juodziukynas
In your case, you CAN'T call "user.avatar.attached?" inside app/javascript/channels/room_channel.js.erb because it's a request dependant object. El mar., 28 ene. 2020 a las 12:24, Ariel Juodziukynas () escribió: > Although you can use .js.erb extension for any .js file you have to > understand

Re: [Rails] activestorage user.avatar.attached? in javascript

2020-01-28 Thread Ariel Juodziukynas
Although you can use .js.erb extension for any .js file you have to understand WHEN that erb gets executed to understand what you can do with it. Assets with .erb extension are compiled to JS code during the assets precompilation process, you can't put request dependant code (current_user,

Re: [Rails] activestorage user.avatar.attached? in javascript

2020-01-28 Thread fugee ohu
On Monday, January 27, 2020 at 8:28:48 AM UTC-5, Ariel Juodziukynas wrote: > > You can't, you need the .erb extension to execute ruby code. > > El lun., 27 ene. 2020 a las 0:29, fugee ohu ( >) escribió: > >> How would I run this same test in javascript without renaming my >> room_channel.js to