Episode

  Рет қаралды 25,383

Drifting Ruby

Drifting Ruby

Күн бұрын

Пікірлер: 19
@Ivanthebrony
@Ivanthebrony 7 жыл бұрын
You saved my life, excellent video
@R2r_1337
@R2r_1337 7 жыл бұрын
Hey, awesome content! Those nested forms can be a real head scratcher for new devs, I was struggling with it very much However, I think that when you are whitelisting params in #todo_list_params it is better to always whitelist them explicitly, not using this obscure #map trick. Newbie developer can spot it and could probably want to use it with models with admin fields, etc, therefore exposing entire resource for manipulations.
@jamespage4784
@jamespage4784 4 жыл бұрын
How would you adapt this to work with another level of nesting?
@muhammadmehdi5789
@muhammadmehdi5789 4 жыл бұрын
ActionView::MissingTemplate in Crms#new it gives me error on render line, can you please help to get rid off this error? Extracted source (around line #6): id = new_object.object_id fields = form.fields_for(association, new_object, child_index: id) do |builder| render(:association.to_s.singularize, form: builder) end link_to(name, '#', class: "add_fields " + args[:class], data: {id: id, fields: fields.gsub(" ", "")}) end
@taab84
@taab84 7 жыл бұрын
how to use json data for child instead of a separate model? for exemple for a client who have one or multiple phones
@DriftingRuby
@DriftingRuby 7 жыл бұрын
+taab84 I would use serialized attributes and declare the attribute as a Jain. Postgres and MySQL 5.7 support the json datatype.
@aram2548
@aram2548 7 жыл бұрын
Hello, Im not using simple_form, but I tried your code but nothing happens here when I click on add. Do you know what could it be?
@aram2548
@aram2548 7 жыл бұрын
Thanks for the reply. My project is here github.com/aramsm/miniapp-autoseg When I click on add nothing happens
@DriftingRuby
@DriftingRuby 7 жыл бұрын
Your JS is appending the new form elements to $('.fields') but you do not have the class "fields" in your app so it's not getting added anywhere.
@aram2548
@aram2548 7 жыл бұрын
That worked, but now its creating duplicated fields, but that must be easy to track and fix. Thanks for the awesome tutorial.
@archanam.p6018
@archanam.p6018 6 жыл бұрын
hello how to use the nested form datepicker? Thanks in advance
@frmoudoute
@frmoudoute 5 жыл бұрын
Archana, could you find a solution ?
@R2r_1337
@R2r_1337 7 жыл бұрын
and your #link_to_add_field helper is not working if you don't pass any css class, args[:class] is nil in this case and it throws an error saying that you can't convert nil intro string insted of link_to(name, '#', class: 'add_fields ' + args[:class] you should use link_to(name, '#', class: 'add_fields ' + args.fetch(:class, "") therefore making class optional
@muhammadmehdi5789
@muhammadmehdi5789 4 жыл бұрын
ActionView::MissingTemplate in Crms#new it gives me error on render line, can you please help to get rid off this error? Extracted source (around line #6): id = new_object.object_id fields = form.fields_for(association, new_object, child_index: id) do |builder| render(:association.to_s.singularize, form: builder) end link_to(name, '#', class: "add_fields " + args[:class], data: {id: id, fields: fields.gsub(" ", "")}) end
@trailblazer_nomad
@trailblazer_nomad 6 жыл бұрын
Nice hax rendering the form to 'data' attribute ;)
@navroopsingh1
@navroopsingh1 6 жыл бұрын
is any gem installed for running this?
@jaimeandres1041
@jaimeandres1041 6 жыл бұрын
yes check this, github.com/nathanvda/cocoon
@tatawhillman3783
@tatawhillman3783 2 жыл бұрын
So many thing cramped into one video. A better tutorial of splitting this into several videos and really explaining the concepts will go a long way to help beginner rails users
@slim_mike
@slim_mike 6 жыл бұрын
this seems like a remake of this railscast episode kzbin.info/www/bejne/l563Y2qJm7Obga8
Episode #186 - Nested Forms from Scratch with StimulusJS
16:59
Drifting Ruby
Рет қаралды 7 М.
Rails Nested Forms: Deep Dive
1:19:31
Learn.co
Рет қаралды 11 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Ruby on Rails - Railscasts PRO #403 Dynamic Forms (pro)
14:02
Railscasts Reloaded
Рет қаралды 34 М.
Rails 5 ActionCable Introduction
18:48
GoRails
Рет қаралды 19 М.
Background Processing with Rails, Redis and Sidekiq
15:00
Decypher Media
Рет қаралды 61 М.
What is mathematical thinking actually like?
9:44
Benjamin Keep, PhD, JD
Рет қаралды 31 М.
Form Nested Attributes and Fields For in Rails
9:19
GoRails
Рет қаралды 25 М.
Episode #069 - Ruby on Rails 5.1.0 Changes and New Features
12:06
Drifting Ruby
Рет қаралды 12 М.
USA Olympiads || All Solutions || #maths
10:35
Learn with Christian Ekpo
Рет қаралды 237
Episode #059 - Background Jobs with Sidekiq
7:40
Drifting Ruby
Рет қаралды 28 М.
Simple Ruby on Rails 5 REST API From Scratch
34:48
Traversy Media
Рет қаралды 154 М.