4 Ways to Create Dependent Drop-Downs With Ruby on Rails 7

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 21

  • @asgerwolff9992
    @asgerwolff9992 2 года назад +2

    I just implemented a similar feature on a site using Nuxt but this is so much nicer.
    Great video, looking forward to the release of your new course Cezar

    • @mixandgo
      @mixandgo  2 года назад

      I'm glad you like it.

  • @adrianthedev
    @adrianthedev 2 года назад +4

    Amazing! I'd like to add something dependent fields to Avo pretty soon. This will come in handy. Thanks!

    • @mixandgo
      @mixandgo  2 года назад +2

      Let me know how it goes.

    • @brandonzylstra
      @brandonzylstra 2 года назад +2

      haha, I just saw your work on this in Avo and thought "oh good, I don't need to implement it myself" 😄

    • @adrianthedev
      @adrianthedev 2 года назад +1

      Nice! Yeah, the Stimulus integration is quite nice! Give it a try and let me know how it goes.

  • @fabiantorresm
    @fabiantorresm 7 месяцев назад

    Your channel is very good, I have learned a lot from you, thank you. Congratulations on your channel. Hey, sorry for the question, can you create a system of custom fields with this? For example, create a post that has an attribute called post_type that can be a post, page, product and depending on what the user chooses, a form with different fields is displayed, of course these fields will be saved in another table so that each type of post has its own attributes and each post its own values

    • @mixandgo
      @mixandgo  7 месяцев назад +1

      Thanks. I'm glad you like the channel.
      Sure. You can create that.

  • @epicrato
    @epicrato 2 года назад

    Excellent information. Thanks for putting it together!

    • @mixandgo
      @mixandgo  2 года назад

      I'm glad you like it :)

  • @viktorsmari
    @viktorsmari 2 года назад +2

    Great video! Most often when I am using "select" I am already inside a form, do you know if we can get around that, since we cannot have a form nested inside a form? So if you would have the same example, but where you need to post and save the selected fields to an object record. If this was a Car object, and you could save the make, model, year, and maybe description (String) also when saving.

    • @mixandgo
      @mixandgo  2 года назад

      I'm not sure I understand the issue, but if you had a more non-standard setup... you could probably do that as well with more JS.
      But it's hard to give advice on something I don't fully understand.

    • @frbb20
      @frbb20 2 года назад

      @@mixandgo what I think Victor means is that these 3 selects would be part of a larger form with many other fields, so the solution of wrapping them in a turbo frame wouldn’t work, because it would submit the entire form regardless, losing the state in all other fields (and also potentially submitting the form prematurely).

    • @mixandgo
      @mixandgo  2 года назад

      @@frbb20 ah that makes sense, thank you for clarifying.
      One option is to have a form object with some validation rules.
      So until all the required data is filled in, it's in an invalid state.
      Does that make sense?

  • @myanch200
    @myanch200 2 года назад +1

    Can't wait for the course

    • @mixandgo
      @mixandgo  2 года назад +1

      The first cohort is launching next month. So make sure to join the waiting list.

    • @myanch200
      @myanch200 2 года назад +1

      Already done ✅

  • @ysuzukihk
    @ysuzukihk 2 года назад

    Thank you for your Video!! I saw "year","make",model" and "body_styles" on CSV file.
    I would like to add code ""
    But arranged code is not run.
    If possible ,could you give me any advice ?

    • @mixandgo
      @mixandgo  2 года назад

      No idea without more context. I would suggest you post a question on StackOverflow

    • @ysuzukihk
      @ysuzukihk 2 года назад

      Thank you for your message!!!
      I will post message on StackOverFlow soon.
      If possible , could you let me know why csv file has "body_styles" ?
      Is it so that learners like me can modify the code on their own?

    • @mixandgo
      @mixandgo  2 года назад

      ​@@ysuzukihk I'm not sure what you mean by that...
      If it's in the context of a car, then body style refers to how the car's body style (e.g., sedan, coupe, etc.).