Rails 8 Course - Beginner to Intermediate

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

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

  • @MalachiRails
    @MalachiRails  10 дней назад +3

    Hey Everyone,
    If anyone has any questions about this course, please let me know and I will answer ASAP. It doesn't matter if it's 1 year from now or 10 years.
    Also, to master Rails quickly. It is important to get a mentor. I offer this on Patreon
    patreon.com/user?u=89485299&Link&

  • @wised_one
    @wised_one 10 дней назад +3

    дякую!
    Чудовий урок

    • @MalachiRails
      @MalachiRails  10 дней назад +1

      No problem. Happy it helped!

    • @ledockol
      @ledockol 10 дней назад +2

      Приємно чути солов'їну мову! Вітаю ще одного розробника на Ruby on Rail з України.
      Слава України! Ми обовʼязково переможемо!

  • @Bhushankadam011
    @Bhushankadam011 9 дней назад +1

    Thank you so much for this video....i was thinking about learning ROR but struggled to find latest resources...

  • @rickbacker1
    @rickbacker1 10 дней назад +1

    Thank you for this video! It was interesting to look at new Rails 8 stuff and war with kamal (devs normally has such wars everyday and it is normal) :) For me it was simpler to deploy via railway app service.
    Please keep going with more Rails stuff.

  • @tonycharles8991
    @tonycharles8991 6 дней назад +1

    Good content, thanks for sharing

  • @patrickfeeney4180
    @patrickfeeney4180 11 дней назад +2

    I think you should do a video about action cable and solid cable. There's barely anything about it that is up to date.

    • @MalachiRails
      @MalachiRails  10 дней назад

      That’s a great idea. I will do it.

  • @rjkush17
    @rjkush17 11 дней назад +3

    that the video i am waiting for

    • @MalachiRails
      @MalachiRails  11 дней назад

      Perfect, if you have questions let me know. I will answer them.

  • @ledockol
    @ledockol 10 дней назад +2

    Thank you for sharing this informative tutorial! Below are some suggestions and observations that might improve the code and its maintainability:
    1) Post Model and user Attribute
    Consider using a belongs_to :user, foreign_key: :user_id relationship or a references type for the user column in the posts table. This clarifies the association and enforces referential integrity.
    2) Missing dependent: :destroy
    The has_many :comments and has_many :likes associations in the Post model (and others) would benefit from dependent: :destroy. This way, when a post is deleted, its comments and likes are removed automatically, preventing orphaned records.
    3) Hidden user_id Field in Forms
    Including a hidden user_id in forms can be unsafe and is generally unnecessary. Instead, create posts/likes/comments directly through the current user, for example:
    current_user.posts.create(post_params)
    This approach is safer and more expressive of the relationship.

    • @MalachiRails
      @MalachiRails  9 дней назад +1

      Thank you for your valuable comment. All great points.

  • @alessandroscimone5463
    @alessandroscimone5463 10 дней назад +1

    Fantastico! Grazie my friend

    • @MalachiRails
      @MalachiRails  10 дней назад

      Perfect. Thank you for watching!

  • @ledockol
    @ledockol 10 дней назад +1

    Part 2)
    4) Polymorphic Like Model
    If you plan to allow likes on multiple models (e.g., posts, comments), consider making Like polymorphic (belongs_to :likeable, polymorphic: true). This design is more flexible and can handle liking various record types without duplicating code.
    5) Partial for Like Count
    Extract the HTML displaying the total number of likes into a separate partial. After each creation or deletion of a like, broadcast (or otherwise update) the new count. This keeps the main views cleaner and promotes reusability.
    6) Consolidated Creation/Deletion of Likes
    Managing like creation and removal in a single model method-and thus a single controller action-can simplify the logic. For example, a toggle_like method in the model could handle both cases.
    7) Use a Concern for Shared Logic
    If likes become polymorphic, you can move their logic into a Rails concern. The same pattern could apply to comments if you need to enable discussions on multiple resources.
    Hope these points help make the application more robust and secure. Thank you again for the valuable tutorial!

  • @tanchinsiang5996
    @tanchinsiang5996 11 дней назад +3

    Hello can you make a video about rails api only?

  • @mynameisnabil
    @mynameisnabil 9 дней назад +2

    As much as I appreciate your efforts, I find the pace too quick for me and lacks explanation for why using the mentioned features so a noob like me finds himself watching trying to understand to end up without added value after an hour and a half 😢

    • @MalachiRails
      @MalachiRails  9 дней назад

      Thank you for that I will that into account

  • @SarathKP-c8t
    @SarathKP-c8t 11 дней назад +2

    Can't we use a front-end library like react instead of the rails traditional views ?, can you make a tutorial related to that ?.

    • @patrickfeeney4180
      @patrickfeeney4180 11 дней назад +1

      yeah you can...using Rails as just an API

    • @matthewb192
      @matthewb192 11 дней назад +3

      The classic javascript developer overcomplicating everything that they don't need to.

    • @MalachiRails
      @MalachiRails  11 дней назад

      Fr fr

    • @SarathKP-c8t
      @SarathKP-c8t 11 дней назад +2

      @ But bro in these days alot companies are switching to react

    • @SarathKP-c8t
      @SarathKP-c8t 11 дней назад +1

      @ Next friday ?

  • @masoud1128
    @masoud1128 11 дней назад +2

    Thanks
    But We need SaaS projects
    Like loom, printify, linktree etc

  • @Billion-Code
    @Billion-Code 9 дней назад +1

    Thanks for the content but you need to go so fast…