Re: [Rails] How do I prevent rails from redirecting to request referrer after create

2020-01-29 Thread fugee ohu


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 > 
> 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+unsubscr...@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.


[Rails] how do i reference active storage attachments to get the url

2020-01-29 Thread fugee ohu
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+unsubscr...@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.


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

2020-01-29 Thread Hassan Schroeder
> It's ok now, I got fired.

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

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


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

2020-01-29 Thread Sampson Crowley
well that escalated quickly

On Wed, Jan 29, 2020 at 1:36 PM Joe Guerra  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  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+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAM5L8qPM1SaMu9wsQsGUiA4oC_BuZxNsYBhL6ZQaPzAy%2BYNxxw%40mail.gmail.com.


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

2020-01-29 Thread Brandon McClelland
Ouch!

On Wed, Jan 29, 2020 at 2:36 PM Joe Guerra  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  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+unsubscr...@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+unsubscr...@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.


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

2020-01-29 Thread Joe Guerra
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  > 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+unsubscr...@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.


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

2020-01-29 Thread fugee ohu


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 ( >) 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  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+unsubscr...@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.


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

2020-01-29 Thread Ariel Juodziukynas
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 ()
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  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+unsubscr...@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcA1qCtFT1JEUaFqmEs-UoMnRj4VAkoGoiPORAwxungSGQ%40mail.gmail.com.


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

2020-01-29 Thread fugee ohu


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 > 
> 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+unsubscr...@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.


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

2020-01-29 Thread Walter Lee Davis
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  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+unsubscr...@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+unsubscr...@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.