[Rails] Too many nested associations?

2020-03-22 Thread fugee ohu
i have user has_many press_releases and also user has_many artists and also artists have_many tours and also artists have_many press_releases Now I wanna create a tour and then a press_release for the tour The tour is made up of tour_dates, just in case you're wondering Complicating things is

[Rails] post request to unassociated model

2020-03-17 Thread fugee ohu
How do I make a post request to an unassociated model from the view of another model -- 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

[Rails] help me correct this wrongly syntaxed form_with block

2020-03-11 Thread fugee ohu
The problem I was having is params press_release was missing This is an attempt at adding it that draws a sytax error <%= form_with model: @press_release, url: create_user_tour_press_release_path(press_release: { tour_id: @tour.id, artist_id: @artist.id, poster_type: 'User' }) do |f| %> --

Re: [Rails] add user_id to new record

2020-03-10 Thread fugee ohu
; NB: If this doesn't appear to work, then you haven't built your > relationships correctly, and you need to fix that before proceeding. > > Walter > > > On Mar 2, 2020, at 12:59 AM, fugee ohu > > wrote: > > > > How do i add user_id to a new record without p

[Rails] form_with non-associated model on another model's view

2020-03-09 Thread fugee ohu
In my :tour show view I put a form for :press_release and so when the form's submitted there's no prepending of press_release: { to the params hash The form doesn't have any inputs rather field values are passed in parentheses to the route I tried to prepend by adding press_release: { as shown

[Rails] form_with from different model

2020-03-03 Thread fugee ohu
In tour_dates show view I've added a form to create a new press_release but on submit the request doesn't include a prepended press_release: { it just starts with {"authenticity token This is my form Why doesn't the parameters include a prepended press_release object? <%= form_with model:

[Rails] add user_id to new record

2020-03-01 Thread fugee ohu
How do i add user_id to a new record without placing it in a form as a hidden field? I tried adding in the controller's create action just before `if @post.save?` but that didn't cause new records created to have a value for user_id Maybe it was because I'm using a nested form and this record

[Rails] Re: Froala WYSIWYG Editor on Rails 6

2020-02-27 Thread fugee ohu
On Thursday, February 20, 2020 at 7:35:54 AM UTC-5, SM Ehsan wrote: > > Hello > I a trying to add froala WYSIWYG editor to my rails 6 project. > but i am unable to add this. > can any one please tell me how can i add froala WYSIWYG editor to my > project? > > Thank you > rails 6 includes Trix

Re: [Rails] do i need associations to use fields_for

2020-02-16 Thread fugee ohu
ed object. > > Walter > > > On Feb 16, 2020, at 10:41 PM, fugee ohu > > wrote: > > > > Can I use fields_for for any models or do they have to be associated? > > > > -- > > You received this message because you are subscribed to the Google > Grou

Re: [Rails] do i need associations to use fields_for

2020-02-16 Thread fugee ohu
ed object. > > Walter > > > On Feb 16, 2020, at 10:41 PM, fugee ohu > > wrote: > > > > Can I use fields_for for any models or do they have to be associated? > > > > -- > > You received this message because you are subscribed to the Google > Grou

[Rails] do i need associations to use fields_for

2020-02-16 Thread fugee ohu
Can I use fields_for for any models or do they have to be associated? -- 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

[Rails] what are the association requirements for fields_for

2020-02-16 Thread fugee ohu
I want to create rows in one model from a form for another where associations aren't as simple as the fields_for model belonging to the main model of the form In my case, I wanna add rows to :user_venue where the main form is for :tour_dates tour_dates belong to tours, which belong to artists,

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
301, not 200. > > Walter > > On Feb 14, 2020, at 9:59 AM, fugee ohu > > wrote: > >  > This is a redirect from my log, but page doesn't change I'm still on the > same page containing the form I submitted > > 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /a

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
301, not 200. > > Walter > > On Feb 14, 2020, at 9:59 AM, fugee ohu > > wrote: > >  > This is a redirect from my log, but page doesn't change I'm still on the > same page containing the form I submitted > > 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /a

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
301, not 200. > > Walter > > On Feb 14, 2020, at 9:59 AM, fugee ohu > > wrote: > >  > This is a redirect from my log, but page doesn't change I'm still on the > same page containing the form I submitted > > 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /a

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
301, not 200. > > Walter > > On Feb 14, 2020, at 9:59 AM, fugee ohu > > wrote: > >  > This is a redirect from my log, but page doesn't change I'm still on the > same page containing the form I submitted > > 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /a

[Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
This is a redirect from my log, but page doesn't change I'm still on the same page containing the form I submitted 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases HTTP/1.1" 200 2542 http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases -- You received

[Rails] Re: how do i use jquery-datetimepicker with webpacker

2020-02-11 Thread fugee ohu
1, 2020 at 2:56:16 AM UTC-6, fugee ohu wrote: >> >> I installed it with yarn but I don't know how to get it working >> > How do I apply different options to different fields? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] how do i use jquery-datetimepicker with webpacker

2020-02-11 Thread fugee ohu
I installed it with yarn but I don't know how to get it working -- 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

[Rails] bootstrap nav can't right align ul

2020-02-07 Thread fugee ohu
I'm trying to right align a in my navbar but it doesn't right align, it's left aligned <% blog_logo=@blog.pictures.where('designation=?', 'blog_logo').first %> <%= @blog.title %> <% if user_signed_in? %>

[Rails] searchkick show associations in view

2020-02-05 Thread fugee ohu
How do I show associations in a view with searchkick? I get error association not found even though user has_many_addresses My user model has scope :search_import, -> { includes(:addresses) } search.html.erb: <%= (t 'search_results_for') %> <%= @terms %> <% @users.each do |u| %>

[Rails] Re: help me perform my first searchkick search

2020-02-04 Thread fugee ohu
On Tuesday, February 4, 2020 at 8:08:17 PM UTC-5, fugee ohu wrote: > > So far, I don't get any results returned > > user.rb: > > searchkick word_middle: ['full_name', 'description', 'interests'] > > def full_name > [first_name, last_name].join(' ') &g

[Rails] help me perform my first searchkick search

2020-02-04 Thread fugee ohu
So far, I don't get any results returned user.rb: searchkick word_middle: ['full_name', 'description', 'interests'] def full_name [first_name, last_name].join(' ') end def search_data { full_name: full_name, description: description, interests: interests } end

[Rails] undefined method `addresses' for #

2020-02-02 Thread fugee ohu
world_controller.rb @users = User.search(params[:terms]).where("confirmed_at is not null") search.html.erb <%= (t 'search_results_for') %> <%= @terms %> <% @users.each do |u| %> <%= link_to "#{u.first_name} #{u.middle_name} #{u.last_name}", page_path(name: u.name) %> <%

[Rails] search form in layout

2020-02-02 Thread fugee ohu
I put a search form in my layout where the search field is named "terms" but then I get an unpermitted parameters for 'term' Do I need to declare term as an attr_accessor and use the :user in strong params in my world controller because I'm searching the User model -- You received this

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

2020-01-29 Thread fugee ohu
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 > redirect

[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

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

2020-01-29 Thread fugee ohu
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 U

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

[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] 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 renamin

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

2020-01-27 Thread fugee ohu
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 > redirect

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

2020-01-27 Thread fugee ohu
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

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

2020-01-26 Thread fugee ohu
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

[Rails] Trix rich_text_area form field doesn't clear on submit when containing an image

2020-01-23 Thread fugee ohu
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 <%=

[Rails] ActionCable.server.broadcast sending truncated version of rich-text-field to channel

2020-01-22 Thread fugee ohu
>From the log: RoomChannel transmitting {"content"=>"https://groups.google.com/d/msgid/rubyonrails-talk/63d4d627-abd6-4fca-b010-bc88d0bd73cf%40googlegroups.com.

Re: [Rails] how do i send pictures in channels?

2020-01-21 Thread fugee ohu
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 > > 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

[Rails] trix actiontext rich content append to div in view from js file (actioncable channel) not displaying rich content, field not clearing after submit

2020-01-20 Thread fugee ohu
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 So the problem is it doesn't display until the page is refreshed then

[Rails] how do i append a json object to a css selector in the dom

2020-01-20 Thread fugee ohu
I need to append this json object including images to a css selector Anyone can tell me how { "id": 43, "name": "content", "body":

Re: [Rails] how do i send pictures in channels?

2020-01-20 Thread fugee ohu
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 > > 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

Re: [Rails] how do i send pictures in channels?

2020-01-19 Thread fugee ohu
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 > > 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

Re: [Rails] how do i send pictures in channels?

2020-01-19 Thread fugee ohu
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 > > 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

Re: [Rails] how do i send pictures in channels?

2020-01-19 Thread fugee ohu
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 > > 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

[Rails] how do i send pictures in channels?

2020-01-19 Thread fugee ohu
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? -- You received this message

[Rails] actiontext.scss not loading

2020-01-19 Thread fugee ohu
application.scss @import "actiontext.scss"; -- 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

[Rails] where are these requests for images coming from?

2020-01-19 Thread fugee ohu
It seems I may have succeeded in importing something becuase webpacker is looking for all these image files Can someone explain to me what's going on? Seems to be looking for bootstrap and also actiontext image files? Module not found: Error: Can't resolve '../img/play-pause.png' in

[Rails] webpacker wants images under /app ?

2020-01-19 Thread fugee ohu
This is from app/javascript/application.js // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. // // const images =

Re: [Rails] //= require stylesheet with webpacker

2020-01-18 Thread fugee ohu
> https://github.com/rails/webpacker/blob/master/docs/css.md > > El sáb., 18 ene. 2020 a las 4:00, fugee ohu ( >) escribió: > >> I have my stylesheet in app/javascript/stylesheets and need to include >> actiontext.scss in application.scss where both files are lo

[Rails] //= require stylesheet with webpacker

2020-01-17 Thread fugee ohu
I have my stylesheet in app/javascript/stylesheets and need to include actiontext.scss in application.scss where both files are located in app/javascript/stylesheets but using //= require actiontext has no effect, styling is still not being applied -- You received this message because you are

Re: [Rails] where do i put my production mail server settings?

2020-01-17 Thread fugee ohu
On Thursday, January 16, 2020 at 7:34:27 PM UTC-5, Walter Lee Davis wrote: > > > > > On Jan 16, 2020, at 6:19 PM, fugee ohu > > wrote: > > > > > > > > On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis > wrote: > > >

Re: [Rails] where do i put my production mail server settings?

2020-01-17 Thread fugee ohu
On Thursday, January 16, 2020 at 7:34:27 PM UTC-5, Walter Lee Davis wrote: > > > > > On Jan 16, 2020, at 6:19 PM, fugee ohu > > wrote: > > > > > > > > On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis > wrote: > > >

[Rails] How do I let users design their own blog with trix

2020-01-17 Thread fugee ohu
I know how to use trix in a field but how do I let users design their entire page? -- 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

Re: [Rails] where do i put my production mail server settings?

2020-01-16 Thread fugee ohu
On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote: > > > > > On Dec 29, 2019, at 11:44 PM, fugee ohu > > wrote: > > > > I searched my entire tree starting at / for the name of my mail server > but didn't find it Everything's work

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-16 Thread fugee ohu
ng things up but you are > showing barely any relevant code. > > El mié., 15 ene. 2020 a las 22:37, fugee ohu ( >) escribió: > >> >> >> On Wednesday, January 15, 2020 at 8:26:45 PM UTC-5, Ariel Juodziukynas >> wrote: >>> >>> find method doe

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
e (little) code you > show it should work so something else is messing things up but you are > showing barely any relevant code. > > El mié., 15 ene. 2020 a las 22:37, fugee ohu ( >) escribió: > >> >> >> On Wednesday, January 15, 2020 at 8:26:45 PM UTC-5, Ar

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
ow your code, the stacktrace, the logs or anything? I > suggest you read something like stackoverflow's guidelines on how to ask, > you posts are usually really hard to understand and a lot of information is > missing > > El mié., 15 ene. 2020 a las 18:01, fugee ohu ( >) escri

Re: [Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
nderMethods/find>("31-sarah") # > returns the object for ID = 31 > > In your case, if you are using find, it should search for record with id = > 18 > > El mié., 15 ene. 2020 a las 16:18, fugee ohu ( >) escribió: > >> Doesn't work for me in ra

[Rails] ActiveRecord find ignores extra characters after numeric id. ?

2020-01-15 Thread fugee ohu
Doesn't work for me in rails 6 Parameters: {"id"=>"18-test-title"} ActionController::ActionControllerError (Cannot redirect to nil!): Ne -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

[Rails] google rejecting mail from my server

2020-01-14 Thread fugee ohu
I'm using my own mail server and it must be that google's rejecting my mail sent from no-reply address I see in my mail server's log that the messages are being sent and removed from the queue Does anyone else have this problem? I'm afraid to use services to send my mail because then they get

Re: [Rails] syntax error in react file index.js

2020-01-13 Thread fugee ohu
On Monday, January 13, 2020 at 1:04:46 PM UTC-5, jake wrote: > > That looks like a babel problem, you are not transforming the jsx. Post > your babel config file. > > On Mon, Jan 13, 2020 at 10:20 AM fugee ohu > wrote: > >> app/javascript/packs/index.js >

Re: [Rails] syntax error in react file index.js

2020-01-13 Thread fugee ohu
On Monday, January 13, 2020 at 1:04:46 PM UTC-5, jake wrote: > > That looks like a babel problem, you are not transforming the jsx. Post > your babel config file. > > On Mon, Jan 13, 2020 at 10:20 AM fugee ohu > wrote: > >> app/javascript/packs/index.js >

Re: [Rails] syntax error in react file index.js

2020-01-13 Thread fugee ohu
On Monday, January 13, 2020 at 1:04:46 PM UTC-5, jake wrote: > > That looks like a babel problem, you are not transforming the jsx. Post > your babel config file. > > On Mon, Jan 13, 2020 at 10:20 AM fugee ohu > wrote: > >> app/javascript/packs/index.js >

[Rails] syntax error in react file index.js

2020-01-13 Thread fugee ohu
app/javascript/packs/index.js import React from 'react' import ReactDom from 'react-dom' import App from '../components/App' document.addEventListener('DOMContentLoaded', () => { ReactDom.render( , document.body.appendChild(document.createElement('div')), ) }) I get this

[Rails] Notify user of unread messages

2020-01-13 Thread fugee ohu
On my sn site I want users to know how many unread messages they have in the layout alongside the messages link I've got the messages system working with javascript channels and when messages are created and saved, or in plain English sent, my app/javascript/channels/room.js file is appending

[Rails] Re: js-cookie

2020-01-10 Thread fugee ohu
On Saturday, January 11, 2020 at 1:48:31 AM UTC-5, fugee ohu wrote: > > I installed js-cookie using `yard add js-cookie and put this line in > application.js > require("js-cookie") > but when I use this code in my channel: > console.log(Cookies.get('current_u

[Rails] Re: js-cookie

2020-01-10 Thread fugee ohu
On Saturday, January 11, 2020 at 1:48:31 AM UTC-5, fugee ohu wrote: > > I installed js-cookie using `yard add js-cookie and put this line in > application.js > require("js-cookie") > but when I use this code in my channel: > console.log(Cookies.get('current_u

[Rails] js-cookie

2020-01-10 Thread fugee ohu
I installed js-cookie using `yard add js-cookie and put this line in application.js require("js-cookie") but when I use this code in my channel: console.log(Cookies.get('current_user_id')) I get the error Cookies is not defined -- You received this message because you are subscribed to the

[Rails] Re: How do I get the devise current_user in javascript

2020-01-09 Thread fugee ohu
ript. > > On Wednesday, January 8, 2020 at 10:13:44 PM UTC-5, fugee ohu wrote: >> >> ? >> > I also found this method on SO but the last line could be simplified by passing from controller current_user.id or current_user.name instead of the entire object Application.

[Rails] How do I get the devise current_user in javascript

2020-01-08 Thread fugee ohu
? -- 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

[Rails] Rails 6 Real time chat app

2020-01-07 Thread fugee ohu
I'm trying to learn how to build a chat app The youtube video titled "Rails 6 - Real Time Chat App" https://www.youtube.com/watch?v=nRP91C1uX-w covers the basics but doesn't say how I can put each users own sent messages on the right side and the messages received from their chat partner on the

Re: [Rails] how to pass data to javascript in div.content_tag

2020-01-07 Thread fugee ohu
h 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 ( >) escribió: > >> <%= co

Re: [Rails] how to pass data to javascript in div.content_tag

2020-01-05 Thread fugee ohu
h 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 ( >) escribió: > >> <%= co

Re: [Rails] how to pass data to javascript in div.content_tag

2020-01-05 Thread fugee ohu
h 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 ( >) escribió: > >> <%= co

Re: [Rails] how to pass data to javascript in div.content_tag

2020-01-05 Thread fugee ohu
h 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 ( >) escribió: > >> <%= co

[Rails] how to pass data to javascript in div.content_tag

2020-01-04 Thread fugee ohu
<%= content_tag :div, id: "message_holder", data: {conversation_with_id: @conversation_with.id} do %> translates to this html from page source: The underscores get translated to hyphens Should I just rename the variable to conversation-with-id ? -- You received this message because you are

Re: [Rails] where do i put my production mail server settings?

2020-01-04 Thread fugee ohu
On Monday, December 30, 2019 at 2:48:06 PM UTC-5, Walter Lee Davis wrote: > > > > > On Dec 29, 2019, at 11:44 PM, fugee ohu > > wrote: > > > > I searched my entire tree starting at / for the name of my mail server > but didn't find it Everything's work

[Rails] how do i know what ruby version my site was built with

2020-01-04 Thread fugee ohu
If I didn't specify a ruby version in my Gemfile -- 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

Re: [Rails] activerecord wrong number of arguments 3 given 0..2 expected

2020-01-03 Thread fugee ohu
On Thursday, January 2, 2020 at 7:15:40 PM UTC-5, hasan...@gmail.com wrote: > > To set strict_mode on MySQL in rails, the knob you want is `strict: false` > > > On Thu, 2 Jan 2020 at 16:06, fugee ohu > > wrote: > >> I'm thinking I'm getting this is because of

[Rails] activerecord wrong number of arguments 3 given 0..2 expected

2020-01-02 Thread fugee ohu
I'm thinking I'm getting this is because of mysql sql_mode traditional vs strict When I run select @@sql_mode on mysql console it returns a list of modes which include TRADITIONAL somewhere in the middle of the list database.yml default: adapter: mysql2 encoding: utf8 pool: 5 socket:

[Rails] activerecord template error wrong number of arguments given 3 expected 0-2

2020-01-01 Thread fugee ohu
My app causes this error I though it might be my database adapter gem so I changed the version of mysql2 in my gemfile, and ran bundle, then I got the error Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the

[Rails] Re: jquery css styling not being applied when appending to the dom

2019-12-31 Thread fugee ohu
ot;span" tags don't respond to floats unless > they have been set as block-level elements > > On Tuesday, December 24, 2019 at 7:07:32 PM UTC-7, fugee ohu wrote: >> >> $('#message_holder').append('' >> + data.content + '') >> >> The string gets appended t

[Rails] Re: jquery css styling not being applied when appending to the dom

2019-12-31 Thread fugee ohu
ot;span" tags don't respond to floats unless > they have been set as block-level elements > > On Tuesday, December 24, 2019 at 7:07:32 PM UTC-7, fugee ohu wrote: >> >> $('#message_holder').append('' >> + data.content + '') >> >> The string gets appended t

[Rails] Re: jquery css styling not being applied when appending to the dom

2019-12-31 Thread fugee ohu
ot;span" tags don't respond to floats unless > they have been set as block-level elements > > On Tuesday, December 24, 2019 at 7:07:32 PM UTC-7, fugee ohu wrote: >> >> $('#message_holder').append('' >> + data.content + '') >> >> The string gets appended t

[Rails] app/assets/config/manifest.js

2019-12-31 Thread fugee ohu
Beginning with what rails version is this path expected to exist? -- 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

[Rails] where do i put my production mail server settings?

2019-12-29 Thread fugee ohu
I searched my entire tree starting at / for the name of my mail server but didn't find it Everything's working it sends mail in production just fine but I'm trying to figure out how, since it seems I never put the url of my mail server anywhere? -- You received this message because you are

[Rails] Re: [rails] devise-in18n messages not localized

2019-12-28 Thread fugee ohu
On Thursday, December 26, 2019 at 6:17:23 PM UTC-5, Cédric Lefebvre wrote: > > I have deployed devise & devise-i18n to internationalize devise. > Everything works well - including all the i18n - except that flash messages > generated by devise do not get translated > > => messages generated by

[Rails] webpacker strange behavior; things don't update until I restart my computer

2019-12-28 Thread fugee ohu
I get very strange behavior from webpacker If something works then I change it, then it's broken so I undo my changes and save the file back the way it was, now things are still broken and stay broken until I restart my computer Have tried clearing browser cache, restarting webpack-dev-server,

[Rails] elasticsearch-lite

2019-12-25 Thread fugee ohu
i ran `yarn add elasticsearch-lite` and then `PORT=9200 node_modules/.bin/elasticsearch` internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'worker_threads' I'm doing this because my laptop can't handle elasticsearch -- You received this message because you are

[Rails] jquery css styling not being applied when appending to the dom

2019-12-24 Thread fugee ohu
$('#message_holder').append('' + data.content + '') The string gets appended to the message_holder div like so: 9 but the styling defined in .right doesn't get applied What to do? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] create chat view

2019-12-24 Thread fugee ohu
I'm trying to create a chat view where if the sender of the message is the current user then the message is displayed on the right side and if the sender is the other user then the message is displayed on the left So far what I have doesn't right or left float the messages, they all appear in

[Rails] element for styling text

2019-12-24 Thread fugee ohu
I have elements like <%= m.content %> where m stands for message as I iterate through @messages How do I style them since I haven't defined them as any type of element -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from

[Rails] error using will_paginate with mailboxer

2019-12-23 Thread fugee ohu
I removed the box param from conversations because I'm trying to show conversations in a chat type view meaning not have inbox, sent, trash available for the user So I get the error " undefined method `paginate' for

Re: [Rails] rails 6 where to put javascript files

2019-12-23 Thread fugee ohu
will create bundles using > those files, if you put them elsewhere wenpacker will bundle them inside > the packs that require them. > > El dom., 22 dic. 2019 a las 4:48, fugee ohu ( >) escribió: > >> Where do I put my custom javascript files now, under javascripts or und

Re: [Rails] Re: access images in stylesheets with webpacker and rails 6

2019-12-22 Thread fugee ohu
bpack guide on packing images and using it for background image for > example https://webpack.js.org/guides/asset-management/#loading-images > > El dom., 22 dic. 2019 a las 17:12, fugee ohu ( >) escribió: > >> Webpacker is serving images in views, I just don't know how t

Re: [Rails] Re: access images in stylesheets with webpacker and rails 6

2019-12-22 Thread fugee ohu
bpack guide on packing images and using it for background image for > example https://webpack.js.org/guides/asset-management/#loading-images > > El dom., 22 dic. 2019 a las 17:12, fugee ohu ( >) escribió: > >> Webpacker is serving images in views, I just don't know how t

Re: [Rails] bootstrap nav vs div class: nav

2019-12-22 Thread fugee ohu
g if better for a navigation bar as the name suggests. > > El dom., 22 dic. 2019 a las 20:08, fugee ohu ( >) escribió: > >> Documentation says to use: >> >> >> But in my views I've been using >> >> The code is a little different, I have to try it out, but the

[Rails] Re: access images in stylesheets with webpacker and rails 6

2019-12-22 Thread fugee ohu
jpg")); > > > So this is similar to the way you would access images in previous versions > of Rails, the linking of those assets is being handled by sprockets and not > webpacker. > > > On Sunday, 22 December 2019 20:27:45 UTC+2, fugee ohu wrote: >> >> &

[Rails] Re: access images in stylesheets with webpacker and rails 6

2019-12-22 Thread fugee ohu
On Sunday, December 22, 2019 at 10:15:59 AM UTC-5, fugee ohu wrote: > > How do I refer to images in stylesheets with rails 6/webpacker I always > get can't resolve image.png from code like this: > .search_button > > .search_button > { > background:url(search.png);

Re: [Rails] webpacker images folder

2019-12-22 Thread fugee ohu
rails/webpacker/blob/master/docs/assets.md#link-in-your-rails-views > > El dom., 22 dic. 2019 a las 15:50, fugee ohu ( >) escribió: > >> If I put in application.js require.context('../images', true) everything >> works fine regardless of whether I place my images folder und

[Rails] bootstrap nav vs div class: nav

2019-12-22 Thread fugee ohu
Documentation says to use: But in my views I've been using The code is a little different, I have to try it out, but the question is the same Is applying the class to the div the same as not using the div for bootstrap purposes -- You received this message because you are subscribed to the

  1   2   3   4   5   6   7   8   9   10   >