Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controllers: Rails 8 docs conflicts with the current lesson (based on Rails 7) #29121

Open
2 of 3 tasks
Monatric opened this issue Nov 23, 2024 · 2 comments · May be fixed by #29127
Open
2 of 3 tasks

Controllers: Rails 8 docs conflicts with the current lesson (based on Rails 7) #29121

Monatric opened this issue Nov 23, 2024 · 2 comments · May be fixed by #29127
Assignees

Comments

@Monatric
Copy link
Contributor

Checks

Describe your suggestion

My concerns are:

  1. To explicitly allow parameters, the lesson suggests to use require with permit. However, I'm following the version 8 docs, but it strongly recommends to use expect, which "requires" and "permits" parameters all at once. The logic and syntax is understandable, but it kinda confused me which one should I use as I move forward in the curriculum, and even considered to downgrade the Rails version.
  2. While this one is not originally an issue for me, I think it's also worth mentioning that the TOP lesson and docs exposes us about flash messages. The generated models and controllers in the project use a different syntax for the flash like so:
    format.html { redirect_to @car, notice: "Car was successfully updated." }, unlike the lesson's introduction to flash messages.

This clearly led to a confusion. I suggest that the lesson must expose us for what's to come when following the Rails 8 docs, as well as what Rails generates in the project (since I also explore the project at the same time). This way, we'll be prepared for content, we'll know which is better/suited for certain cases, and minimise confusion for different Rails versions.

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-on-rails-controllers

(Optional) Discord Name

Koko#8682

(Optional) Additional Comments

No response

@JoshDevHub JoshDevHub self-assigned this Nov 25, 2024
@JoshDevHub
Copy link
Contributor

Thank you for making this issue @Monatric

@JoshDevHub JoshDevHub linked a pull request Nov 25, 2024 that will close this issue
7 tasks
@JoshDevHub
Copy link
Contributor

I'm only going to address the stuff with strong parameters in my PR as that's already a solid chunk of work to consider and review. If you have strong feelings about the flash message stuff, I recommend opening a different issue for that so it can be tackled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants