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

[DRAFT] readme proofreading #189

Closed
yshmarov opened this issue Dec 3, 2023 · 6 comments
Closed

[DRAFT] readme proofreading #189

yshmarov opened this issue Dec 3, 2023 · 6 comments

Comments

@yshmarov
Copy link
Contributor

yshmarov commented Dec 3, 2023

-    redirect_to root_path, flash: { error: 'You are not worthy!' }
+    redirect_to root_path, error: 'You are not worthy!'

might be also worth adding this in the readme:

    <% if current_user %>
      <%= current_user.email %>
      <%= button_to 'Sign out', users_sign_out_path, method: :delete, form: { data: { turbo_confirm: 'Log out?' } } %>
    <% else %>
      <%= link_to 'Sign in', users_sign_in_path %>
    <% end %>
@mikker
Copy link
Owner

mikker commented Jan 24, 2024

Thank you. Closing this and updating the README manually

@mikker mikker closed this as completed Jan 24, 2024
@luiscobot
Copy link
Contributor

luiscobot commented Jan 24, 2024

maybe it is worth mentioning that we need to add

add_flash_types :error

in application controller

@mikker
Copy link
Owner

mikker commented Jan 24, 2024

Is this not already configured in Rails? I've never seen this before

@luiscobot
Copy link
Contributor

No, Rails only includes :alert and :notice out of the box.

If we want other types, we need to add it with add_flash_types

https://edgeapi.rubyonrails.org/classes/ActionController/Flash/ClassMethods.html#method-i-add_flash_types

@mikker
Copy link
Owner

mikker commented Jan 25, 2024

Ha! TIL.

I suggest we use :alert instead then?

@luiscobot
Copy link
Contributor

Yeah, it is more simple to use :alert

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

No branches or pull requests

3 participants