Ruby on Rails Wednesday, January 29, 2020



On Monday, January 27, 2020 at 10:52:28 PM UTC-5, Walter Lee Davis wrote:
You can define (in your controller) what the create action is after a successful save, and if you only want to do that for one format, and not the others, you can use the usual method for doing that in a controller, with:

if @foo.create(foo_params)
  respond_to do |format|
    if format.js
      render status: :ok
    else
      redirect_to @foo
    end
  end
else
  render :new
end

Using render status: :ok on success will not let anything else happen, no redirect, nothing changes on screen.

Walter


> On Jan 27, 2020, at 8:48 PM, fugee ohu <fuge...@gmail.com> wrote:
>
> I'm broadcasting to a javascript channel in my create action instead of redirecting but rails redirects to request referrer
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1b7ecb28-06c2-4638-9a37-221bf911da28%40googlegroups.com.


Cool Thanks I had solved this by removing respond_to and rails automatically returned 204 No content because there was no view Maybe that's not a good hack though with no respond_to

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/408898fb-3122-4cc4-9df6-72a6e6333086%40googlegroups.com.

Ruby on Rails

Message
has_one_attached :attachment

but if i put console.log(url_for(message.attachment)) webpack-dev-server returts compiled with warnings and nothing happens when i submit the form How do I reference the url and other attributes of the attachement?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b8bc2035-343d-4a7d-bc0b-ed92384a2097%40googlegroups.com.

Ruby on Rails

> It's ok now, I got fired.

Those two phrases don't seem to go together, but good luck to you!

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yBhfS4KePiLt7P7yAY%2B4F673vbuxJC89dMAEq6cxDj0uw%40mail.gmail.com.

Ruby on Rails

well that escalated quickly

On Wed, Jan 29, 2020 at 1:36 PM Joe Guerra <JGuerra@jginfosys.com> wrote:
It's ok now, I got fired.

On Tuesday, January 28, 2020 at 2:40:34 PM UTC-5, Brandon McClelland wrote:
"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 <JGu...@jginfosys.com> wrote:
_______
     |/       |
     |      (_)
     |       \|/
     |        |
     |       / \
     |
 __|___

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 had been working, now it's not :(
It doesn't render the new comment text box or button to sumbit a comment.


I can possibly remove all traces of the gem and try again, or figure out what is happening.  

are there any general troubleshooting tips I can narrow down this problem to?

Thanks,
Joe  

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38e8f14e-4796-45fa-b54a-e8ddcc0698d4%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4a128f23-8055-490e-b482-6ef84ea08f49%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5L8qPM1SaMu9wsQsGUiA4oC_BuZxNsYBhL6ZQaPzAy%2BYNxxw%40mail.gmail.com.

Ruby on Rails

Ouch!

On Wed, Jan 29, 2020 at 2:36 PM Joe Guerra <JGuerra@jginfosys.com> wrote:
It's ok now, I got fired.

On Tuesday, January 28, 2020 at 2:40:34 PM UTC-5, Brandon McClelland wrote:
"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 <JGu...@jginfosys.com> wrote:
_______
     |/       |
     |      (_)
     |       \|/
     |        |
     |       / \
     |
 __|___

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 had been working, now it's not :(
It doesn't render the new comment text box or button to sumbit a comment.


I can possibly remove all traces of the gem and try again, or figure out what is happening.  

are there any general troubleshooting tips I can narrow down this problem to?

Thanks,
Joe  

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38e8f14e-4796-45fa-b54a-e8ddcc0698d4%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4a128f23-8055-490e-b482-6ef84ea08f49%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADuEqH%2Bns%2BUXBkJVP-63Rbsk1Y9NLVSnDnNNF41MU0cm5nxwDg%40mail.gmail.com.

Ruby on Rails

It's ok now, I got fired.

On Tuesday, January 28, 2020 at 2:40:34 PM UTC-5, Brandon McClelland wrote:
"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 <JGu...@jginfosys.com> wrote:
_______
     |/       |
     |      (_)
     |       \|/
     |        |
     |       / \
     |
 __|___

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 had been working, now it's not :(
It doesn't render the new comment text box or button to sumbit a comment.


I can possibly remove all traces of the gem and try again, or figure out what is happening.  

are there any general troubleshooting tips I can narrow down this problem to?

Thanks,
Joe  

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38e8f14e-4796-45fa-b54a-e8ddcc0698d4%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4a128f23-8055-490e-b482-6ef84ea08f49%40googlegroups.com.

Ruby on Rails



On Wednesday, January 29, 2020 at 11:28:49 AM UTC-5, Ariel Juodziukynas wrote:
The client part requires javascript, the backend part requires no javascript, I strongly recommend you read this https://guides.rubyonrails.org/action_cable_overview.html

Sometimes it looks like you just ask questions without reading about the subject you try to use. The official guide shows you what file goes where.

El mié., 29 ene. 2020 a las 13:08, fugee ohu (<fuge...@gmail.com>) escribió:


On Wednesday, January 29, 2020 at 8:18:28 AM UTC-5, Walter Lee Davis wrote:
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> 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 rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

Thanks I'm trying to write an action cable chat app Eventually I want it to include video but for now I've got text working but I don't have images working yet Do all action cable chat solutions rely on javascript (?) because I notice there's an app/channels folder and an app/javascript/channels folder Does that mean I don't need to be 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 rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62555a89-a69e-485b-8117-f17394a5b676%40googlegroups.com.

Yes Thanks I'll read that I've been reading active storage overview trying to work out a better understanding of the attachment/s object how to render attachments because I'm having trouble with it

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9c2320fa-db27-4659-9634-c3f4724fd96d%40googlegroups.com.

Ruby on Rails

The client part requires javascript, the backend part requires no javascript, I strongly recommend you read this https://guides.rubyonrails.org/action_cable_overview.html

Sometimes it looks like you just ask questions without reading about the subject you try to use. The official guide shows you what file goes where.

El mié., 29 ene. 2020 a las 13:08, fugee ohu (<fugee279@gmail.com>) escribió:


On Wednesday, January 29, 2020 at 8:18:28 AM UTC-5, Walter Lee Davis wrote:
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> 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 rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

Thanks I'm trying to write an action cable chat app Eventually I want it to include video but for now I've got text working but I don't have images working yet Do all action cable chat solutions rely on javascript (?) because I notice there's an app/channels folder and an app/javascript/channels folder Does that mean I don't need to be 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62555a89-a69e-485b-8117-f17394a5b676%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcA1qCtFT1JEUaFqmEs-UoMnRj4VAkoGoiPORAwxungSGQ%40mail.gmail.com.

Ruby on Rails



On Wednesday, January 29, 2020 at 8:18:28 AM UTC-5, Walter Lee Davis wrote:
https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> 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 rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

Thanks I'm trying to write an action cable chat app Eventually I want it to include video but for now I've got text working but I don't have images working yet Do all action cable chat solutions rely on javascript (?) because I notice there's an app/channels folder and an app/javascript/channels folder Does that mean I don't need to be 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62555a89-a69e-485b-8117-f17394a5b676%40googlegroups.com.

Ruby on Rails

https://lmgtfy.com/?q=how+do+i+append+an+image+to+a+dom+element+using+javascript

> On Jan 29, 2020, at 12:18 AM, fugee ohu <fugee279@gmail.com> wrote:
>
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/537A0271-F027-4A15-8C70-398D9F0BFBDF%40wdstudio.com.

Ruby on Rails Tuesday, January 28, 2020

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a3f1366c-1bbb-4363-8a06-65b538719a32%40googlegroups.com.

Ruby on Rails

"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 <JGuerra@jginfosys.com> wrote:
_______
     |/       |
     |      (_)
     |       \|/
     |        |
     |       / \
     |
 __|___

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 had been working, now it's not :(
It doesn't render the new comment text box or button to sumbit a comment.


I can possibly remove all traces of the gem and try again, or figure out what is happening.  

are there any general troubleshooting tips I can narrow down this problem to?

Thanks,
Joe  

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38e8f14e-4796-45fa-b54a-e8ddcc0698d4%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADuEqHLdS8OxHdCyD0JvyDvs1GrU1zTSspbn0aMyw_fvmLxTgg%40mail.gmail.com.

Ruby on Rails

_______
     |/       |
     |      (_)
     |       \|/
     |        |
     |       / \
     |
 __|___

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 had been working, now it's not :(
It doesn't render the new comment text box or button to sumbit a comment.


I can possibly remove all traces of the gem and try again, or figure out what is happening.  

are there any general troubleshooting tips I can narrow down this problem to?

Thanks,
Joe  

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/38e8f14e-4796-45fa-b54a-e8ddcc0698d4%40googlegroups.com.

Ruby on Rails

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 (<arieljuod@gmail.com>) escribió:
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, instance variables, request controller/action, etc) inside an .js.erb asset file because it's an isolated process (assets are compiled into one final static .js bundle).

You can put request dependant code on .js.erb VIEWS because views are executed when they are needed for each request.

Not all js files are used the same way, you can use .erb extension to have ruby code but have to take into account the context to understand what variables you have access to.

El mar., 28 ene. 2020 a las 11:17, fugee ohu (<fugee279@gmail.com>) escribió:


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 (<fuge...@gmail.com>) escribió:
How would I run this same test in javascript without renaming my room_channel.js to room_channel.js.erb ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdf21e73-81a0-4485-957e-82afa0e2d6a9%40googlegroups.com.

I can change any .js file to .js.erb ? In this case it's app/javascript/channels/room_channel.js Passing data between javascript and rails is an important topic so I wanna learn as best I can without "cheating" but I'm attracted to the js.erb method too, I wanna mix it up something use js.erb sometimes use just .js so I don't end up ignorant

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3866a144-220f-4e6a-ad06-090226af6ef9%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcAct%3Do%2BwsthvgLRLb2rx5wONGx4Zznh1bDqMYb7%3D%3DYYMQ%40mail.gmail.com.

Ruby on Rails

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, instance variables, request controller/action, etc) inside an .js.erb asset file because it's an isolated process (assets are compiled into one final static .js bundle).

You can put request dependant code on .js.erb VIEWS because views are executed when they are needed for each request.

Not all js files are used the same way, you can use .erb extension to have ruby code but have to take into account the context to understand what variables you have access to.

El mar., 28 ene. 2020 a las 11:17, fugee ohu (<fugee279@gmail.com>) escribió:


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 (<fuge...@gmail.com>) escribió:
How would I run this same test in javascript without renaming my room_channel.js to room_channel.js.erb ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdf21e73-81a0-4485-957e-82afa0e2d6a9%40googlegroups.com.

I can change any .js file to .js.erb ? In this case it's app/javascript/channels/room_channel.js Passing data between javascript and rails is an important topic so I wanna learn as best I can without "cheating" but I'm attracted to the js.erb method too, I wanna mix it up something use js.erb sometimes use just .js so I don't end up ignorant

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3866a144-220f-4e6a-ad06-090226af6ef9%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcAKuKSx6WOsJibuiFqe8MmJvTh4N%2B%3D6WUpmFJ3u20CMDA%40mail.gmail.com.

Ruby on Rails



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 (<fuge...@gmail.com>) escribió:
How would I run this same test in javascript without renaming my room_channel.js to room_channel.js.erb ?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdf21e73-81a0-4485-957e-82afa0e2d6a9%40googlegroups.com.

I can change any .js file to .js.erb ? In this case it's app/javascript/channels/room_channel.js Passing data between javascript and rails is an important topic so I wanna learn as best I can without "cheating" but I'm attracted to the js.erb method too, I wanna mix it up something use js.erb sometimes use just .js so I don't end up ignorant

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3866a144-220f-4e6a-ad06-090226af6ef9%40googlegroups.com.

Ruby on Rails Monday, January 27, 2020



On Monday, January 27, 2020 at 10:52:28 PM UTC-5, Walter Lee Davis wrote:
You can define (in your controller) what the create action is after a successful save, and if you only want to do that for one format, and not the others, you can use the usual method for doing that in a controller, with:

if @foo.create(foo_params)
  respond_to do |format|
    if format.js
      render status: :ok
    else
      redirect_to @foo
    end
  end
else
  render :new
end

Using render status: :ok on success will not let anything else happen, no redirect, nothing changes on screen.

Walter


> On Jan 27, 2020, at 8:48 PM, fugee ohu <fuge...@gmail.com> wrote:
>
> I'm broadcasting to a javascript channel in my create action instead of redirecting but rails redirects to request referrer
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1b7ecb28-06c2-4638-9a37-221bf911da28%40googlegroups.com.

Thanks I solved that problem by removing the respond_to do |format| block and putting  respond_to :js, only: [:create] after my callbacks

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f920ca6e-b9a1-4387-84e4-0b07526ae26c%40googlegroups.com.

Ruby on Rails

You can define (in your controller) what the create action is after a successful save, and if you only want to do that for one format, and not the others, you can use the usual method for doing that in a controller, with:

if @foo.create(foo_params)
respond_to do |format|
if format.js
render status: :ok
else
redirect_to @foo
end
end
else
render :new
end

Using render status: :ok on success will not let anything else happen, no redirect, nothing changes on screen.

Walter


> On Jan 27, 2020, at 8:48 PM, fugee ohu <fugee279@gmail.com> wrote:
>
> I'm broadcasting to a javascript channel in my create action instead of redirecting but rails redirects to request referrer
>
> --
> 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+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1b7ecb28-06c2-4638-9a37-221bf911da28%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0DFFE05C-4FD0-468A-9086-2FD0B6420749%40wdstudio.com.

Ruby on Rails

I'm broadcasting to a javascript channel in my create action instead of redirecting but rails redirects to request referrer

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1b7ecb28-06c2-4638-9a37-221bf911da28%40googlegroups.com.

Ruby on Rails

You can't, you need the .erb extension to execute ruby code.

El lun., 27 ene. 2020 a las 0:29, fugee ohu (<fugee279@gmail.com>) escribió:
How would I run this same test in javascript without renaming my room_channel.js to room_channel.js.erb ?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdf21e73-81a0-4485-957e-82afa0e2d6a9%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcA4umMPFHLoXCdEZHa0SegVHt3hXGKYt5HfK4LUiiBzAA%40mail.gmail.com.

Ruby on Rails

This should be much more easily done with belongs_to really...


has_one is used if the other model holds the id to this model. Which, if I understood correctly, isn't the case in your code.

Am 26.01.2020 um 23:12 schrieb John Sanderbeck <bandor535@gmail.com>:


Sorry...  I was using class_name:   Typed it incorrectly here...

This worked for me...

  has_one :approver, class_name: "User", foreign_key: 'id', primary_key: 'approver_id'

John


On Sunday, January 26, 2020 at 1:24:18 PM UTC-5, Niklas Bichinger wrote:
Use „class_name", not „class" as option key. Also, from the Model that *holds the ID* of the other Model, it's always „belongs_to".

So in Event:
belongs_to :approver, class_name: „User"
and you're good to go.


Sent via iPhone.

Am 26.01.2020 um 16:56 schrieb John Sanderbeck <band...@gmail.com>:


I KNOW this is probably very simple, but I am scratching my head trying to get it to work...

I have a table with a key named approver_id

What I want to do is associate this to the User class

So I can do Event.approver.first_name, etc...

in Event I have

has_one :approver, class: 'User'

So how do I define the relationship to associate Event.approver_id to User.id

John

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bfbf73d2-2cf4-4c52-9896-5b58028f6f3d%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/19718c01-2b17-434b-90d4-866626ad7911%40googlegroups.com.

Ruby on Rails Sunday, January 26, 2020

How would I run this same test in javascript without renaming my room_channel.js to room_channel.js.erb ?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bdf21e73-81a0-4485-957e-82afa0e2d6a9%40googlegroups.com.

Ruby on Rails

Sorry...  I was using class_name:   Typed it incorrectly here...

This worked for me...

  has_one :approver, class_name: "User", foreign_key: 'id', primary_key: 'approver_id'

John


On Sunday, January 26, 2020 at 1:24:18 PM UTC-5, Niklas Bichinger wrote:
Use „class_name", not „class" as option key. Also, from the Model that *holds the ID* of the other Model, it's always „belongs_to".

So in Event:
belongs_to :approver, class_name: „User"
and you're good to go.


Sent via iPhone.

Am 26.01.2020 um 16:56 schrieb John Sanderbeck <band...@gmail.com>:


I KNOW this is probably very simple, but I am scratching my head trying to get it to work...

I have a table with a key named approver_id

What I want to do is associate this to the User class

So I can do Event.approver.first_name, etc...

in Event I have

has_one :approver, class: 'User'

So how do I define the relationship to associate Event.approver_id to User.id

John

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bfbf73d2-2cf4-4c52-9896-5b58028f6f3d%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/19718c01-2b17-434b-90d4-866626ad7911%40googlegroups.com.

Ruby on Rails

Use „class_name", not „class" as option key. Also, from the Model that *holds the ID* of the other Model, it's always „belongs_to".

So in Event:

belongs_to :approver, class_name: „User"
and you're good to go.


Sent via iPhone.

Am 26.01.2020 um 16:56 schrieb John Sanderbeck <bandor535@gmail.com>:


I KNOW this is probably very simple, but I am scratching my head trying to get it to work...

I have a table with a key named approver_id

What I want to do is associate this to the User class

So I can do Event.approver.first_name, etc...

in Event I have

has_one :approver, class: 'User'

So how do I define the relationship to associate Event.approver_id to User.id

John

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bfbf73d2-2cf4-4c52-9896-5b58028f6f3d%40googlegroups.com.

Ruby on Rails

I KNOW this is probably very simple, but I am scratching my head trying to get it to work...

I have a table with a key named approver_id

What I want to do is associate this to the User class

So I can do Event.approver.first_name, etc...

in Event I have

has_one :approver, class: 'User'

So how do I define the relationship to associate Event.approver_id to User.id

John

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/bfbf73d2-2cf4-4c52-9896-5b58028f6f3d%40googlegroups.com.

Ruby on Rails

Hello everyone,

At RemoteTeam.com we are building an HR tool for companies that they have remote employees.

We are looking experienced backend(Ruby on Rails) and frontend(Vue.js) developers to join our team.

You can check our stacks at https://stackshare.io/companies/remoteteam

If you are interested can you apply from this link? https://remote-team-inc.breezy.hr/p/4f4d43748d73

Thanks...

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c52c9ac2-397e-4931-9376-57e67fd40669%40googlegroups.com.

Ruby on Rails Saturday, January 25, 2020

if you don't use the uglifier gem anymore, try to see if there's a file (usually with the same name) still present in config/initializers and remove it.

Le sam. 25 janv. 2020 à 18:59, ja wa <desh4646@gmail.com> a écrit :
$ rails s
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:396:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'uglifier (>= 1.3.0) x86-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in `each'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in `verify_gemfile_dependencies_are_found!'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:212:in `start'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:191:in `resolve'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:235:in `resolve'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in `specs'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in `specs_for'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in `requested_specs'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in `block in definition_method'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in `setup'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from C:/Sites/simpleblog/config/boot.rb:3:in `<top (required)>'
        from bin/rails:3:in `require_relative'
        from bin/rails:3:in `<main>'

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/638d4d77-e370-4591-992d-fbee3d6cb074%40googlegroups.com.


--
Marc'Andria Battesti
Corsica Flash

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJEjUE5Mssptu2-NSLT2zp3drpRhOof6VDW2gSfdGyPnMvD8Dg%40mail.gmail.com.

Ruby on Rails

$ rails s
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:396:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'uglifier (>= 1.3.0) x86-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in `each'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:366:in `verify_gemfile_dependencies_are_found!'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:212:in `start'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:191:in `resolve'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:235:in `resolve'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in `specs'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in `specs_for'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in `requested_specs'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in `block in definition_method'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in `setup'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from C:/Sites/simpleblog/config/boot.rb:3:in `<top (required)>'
        from bin/rails:3:in `require_relative'
        from bin/rails:3:in `<main>'

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/638d4d77-e370-4591-992d-fbee3d6cb074%40googlegroups.com.

Ruby on Rails Thursday, January 23, 2020

If this form contains an image the rich_text_area field doesn't clear because I'm calling    
ActionCable.server.broadcast 'room_channel', content: @message.content, msg_time: Time.now, recipients: @message.recipients, sender: @message.sender, sender_name: User.find(@message.sender).name


<%= form_with model: @message, multipart: true, remote: true do |f| %>
    <%= f.rich_text_area :content, class: 'form-control' %>
    <%= f.hidden_field :recipients, value: @conversation_with.id %>
    <%= f.hidden_field :sender, value: current_user.id %>
    <%= f.submit 'Send' %>
<% end %>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/03f98b9b-e97c-4ef0-b0b5-2a46afefabff%40googlegroups.com.

Ruby on Rails Wednesday, January 22, 2020

From the log:

RoomChannel
transmitting {"content"=>"<div><action-text-attachment sgid=\"BAh7CEkiCGdpZAY6BkVUSSI4Z2lkOi8vaWduYXR6bW91c2UvQWN0aXZlU3RvcmFnZTo6QmxvYi8xND9leHBpcmVzX2luBjsAVEkiDHB1cnBvc2UGOwBUSSIPYXR0YWNoYWJsZQY7AFRJIg9leHBpcmVzX2F0BjsAVDA=--5b967f58340bb10513a940e1e4ed5eb083e1a1a0\" content-type=\"image/png\" url=\"http:/... (via streamed from room_channel)

As you can see the string is truncated att the url and ends with

url=\"http:/...

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/63d4d627-abd6-4fca-b010-bc88d0bd73cf%40googlegroups.com.

Ruby on Rails Tuesday, January 21, 2020



On Sunday, January 19, 2020 at 4:56:19 PM UTC-5, Walter Lee Davis wrote:


> On Jan 19, 2020, at 4:10 PM, fugee ohu <fuge...@gmail.com> wrote:
>
> Got my chat app working in rails 6 with channels but now how do I let users send  pictures in channels? I've seen chat apps where after you upload the picture it displays with a circled button that says send and you can also delete it instead How do I do that?
>

With JavaScript. One of the neatest implementations I've seen of this is in Trix (ActionText), which is open-source, so you could see how they do it there. Also GitLab has a nice one, and the source is available for that (unlike GitHub, who also have one). You're basically intercepting the drop and paste events, checking to see whether the payload was an image, and then doing some out-of-band trickery to make a file attachment using a separate model and controller. Trix uses the new ActiveStorage goodies for its implementation. Not sure what the others use.

Walter


Yes thanks I went with trix on this The problem I'm having now is ActionCable.server.broadcast unexpectedly sends a truncated version of the value of the rich text field over to my channel Maybe something in ActionCable config?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9a98d700-342a-416a-9ccc-ed8574365b30%40googlegroups.com.

Ruby on Rails Monday, January 20, 2020

Hello,

This is Aamil with Collabera. I just picked up a Sr. Software engineer role with my client who is the largest and fastest-growing player in the luxury items sales online, providing with millions of shoppers and consignors, three retail stores in NYC & LA and 9 Luxury Consignment Offices across the country. 

This role can be remote. 

Have a look and pass it on to someone who might be looking, if you are not open to the job market right now. I also pay some good $$$ for successful referrals.  

DUTIES & RESPONSIBILITIES

  • Produce high quality, performant, testable code
  • Design and build software for automating critical operation processes
  • Review pull requests and provide constructive feedback
  • Pair up with someone to work together on a feature
  • Learn something new, and mentor junior engineers
  • Deploy to production multiple times
  • Help define technical strategy and architecture
REQUIREMENTS

  • 5+ years of professional web application development experience
  • Fluency with any of Ruby, Elixir, Erlang
  • Strong understanding of web technologies: HTML5, Javascript, CSS/SASS, REST, JSON
  • Strong understanding of web-app performance fundamentals and related dev tools
  • Strong database fundamentals and experience with MySql or Postgresql
  • Worked with search engines such as ElasticSearch, Lucene, Solr
  • Experience using async message queues
  • Mastery of git and Github workflows
  • Bachelor of Computer Science degree or equivalent
NICE TO HAVE

  • Experience with Elixir, Phoenix
  • Advanced CS degree or equivalent

Best,
Aamil Saiyed
Senior Recruiter Direct Hire

T: (470) 447-2384   

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/14d99313-542b-4feb-836c-be19a731091e%40googlegroups.com.

Ruby on Rails

My app was working before I tried adding images in the richtext field Now the form field doesn't clear on submit and everything appends to the element I'm appending to from my javascript channel file (room.js) wrapped in <div class="trix-content"> So the problem is it doesn't display until the page is refreshed then they're displayed from the database and the form field doesn't clear

$('#message_holder').append('<div class="container-right"><div class="subscript">' + data.sender_name + '<br>' + data.msg_time + '</div>' + data.content.body  + '</div>');

Here it is in page source appended to the bottom of <div id="message_holder">

<div class="container-right">  				<div class="subscript">fugee<br>Mon, 20 Jan 2020 20:13:46 +0000</div>  				<div class="trix-content">    <div>hey<action-text-attachment sgid="BAh7CEkiCGdpZAY6BkVUSSI4Z2lkOi8vaWduYXR6bW91c2UvQWN0aXZlU3RvcmFnZTo6QmxvYi8xMj9leHBpcmVzX2luBjsAVEkiDHB1cnBvc2UGOwBUSSIPYXR0YWNoYWJsZQY7AFRJIg9leHBpcmVzX2F0BjsAVDA=--931b645abd976e02a37e809257c4837f7c4fda64" content-type="image/jpeg" url="http://localhost:3000/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bffdde6476172b543d8e5dd879a742b559406b74/Katana2.jpg" filename="Katana2.jpg" filesize="26982" width="410" height="512" previewable="true" presentation="gallery"><figure class="attachment attachment--preview attachment--jpg">      <img src="http://localhost:3000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bffdde6476172b543d8e5dd879a742b559406b74/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9VY21WemFYcGxYM1J2WDJ4cGJXbDBXd2RwQWdBRWFRSUFBdz09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--69a726fe314cc814b26ade236a1f8e8b78481edd/Katana2.jpg">      <figcaption class="attachment__caption">        <span class="attachment__name">Katana2.jpg</span>        <span class="attachment__size">26.3 KB</span>    </figcaption>  </figure></action-text-attachment>  </div>  </div>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/224b03d3-2851-41d4-9b42-0880875691bd%40googlegroups.com.