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

2020-02-16 Thread fugee ohu
On Monday, February 17, 2020 at 12:38:03 AM UTC-5, Walter Lee Davis wrote: > > You may use fields_for for any object that you have declared > "accepts_nested_attributes_for" in your form's parent model. It obviously > makes the most sense to do this with a related object. > > Walter > > > On

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

2020-02-16 Thread fugee ohu
On Monday, February 17, 2020 at 12:38:03 AM UTC-5, Walter Lee Davis wrote: > > You may use fields_for for any object that you have declared > "accepts_nested_attributes_for" in your form's parent model. It obviously > makes the most sense to do this with a related object. > > Walter > > > On

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

2020-02-16 Thread Walter Lee Davis
You may use fields_for for any object that you have declared "accepts_nested_attributes_for" in your form's parent model. It obviously makes the most sense to do this with a related object. Walter > On Feb 16, 2020, at 10:41 PM, fugee ohu wrote: > > Can I use fields_for for any models or do t

[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 rubyonrails-talk+unsubscr...@googleg

Re: [Rails] Why do basic forms not work in Rails 6 without binding events to each form?

2020-02-16 Thread Ariel Juodziukynas
It doesn't say you that you HAVE to bind all the ajax events. It explicitly says that you "probably" want to do that if you "probably" want to do something other than just submitting the form. El dom., 16 feb. 2020 a las 17:53, Momeas Interactive () escribió: > it says here in the docs that for t

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

2020-02-16 Thread Nicholas Schwaderer
Fugee, Did that solution work for you? Sent from my iPhone > On 14 Feb 2020, at 10:52 pm, fugee ohu wrote: > > > >> On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote: >> Is your form set to the default of an Ajax submission, or did you add the >> configuration flag t

[Rails] Why do basic forms not work in Rails 6 without binding events to each form?

2020-02-16 Thread Momeas Interactive
it says here in the docs that for turobolinks that you now have to BIND ALL YOUR AJAX EVENTS (!?!?) if you want your forms to submit correctly. https://guides.rubyonrails.org/working_with_javascript_in_rails.html#remote-elements "You probably don't want to just sit there with a filled out ,

[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, w

[Rails] ActiveRecord Error: Where clause hash conditions with table prefix

2020-02-16 Thread Hélio Pereira
Hi everyone, Before submitting and issue in rails github I'm asking if this is a normal behaviour in rails activerecord. Without table prefix in comments table the following code prints the correct SQL Syntax: Post.distinct.joins(:comments).where(comments: { user: current_user }). to_sql SEL