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

#74 Add Handle to Events #94

Merged
merged 9 commits into from
Oct 17, 2021

Conversation

yagosansz
Copy link
Contributor

@yagosansz yagosansz commented Oct 14, 2021

Description

We are adding a handle to Event, so it's possible to reach "confbuddies/events/rubyconf" instead of "confbuddies/events/2347".

Changes

  • Add handle to Events
  • Add presence validation to handle
  • Update Event factory
  • Add handle to list of allowed event parameters
  • Add handle to Events form partial
  • Validate handle uniqueness and that it conforms to the viable url format
    • This change also made necessary to update the Event factory.

I've tagged this with Work In Progress, because I wanted to the make sure that the validation I added is what we are looking for - at least for the time being!

I'm thinking there will probably be an issue with my changes, because I didn't update the Views to include a field for the handle!

Please let me know if there is anything can be improved =)

Closes #74

Copy link
Owner

@ChaelCodes ChaelCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's what you thought! We need to add the handle to the Form. It doesn't need to be on the show or index page, but the form is important.

app/models/event.rb Outdated Show resolved Hide resolved
@yagosansz yagosansz marked this pull request as draft October 15, 2021 02:31
@yagosansz yagosansz changed the title WIP: #74 Add Handle to Events #74 Add Handle to Events Oct 15, 2021
@yagosansz yagosansz marked this pull request as ready for review October 15, 2021 02:32
We've removed both the AddHandleToEvents and ChangeHandleToEvents
migrations, because it's possible to complete both changes in a
single migration (AddIndexToEvents).
Copy link
Owner

@ChaelCodes ChaelCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES! This looks great! Now we have everything we need to set up custom routing for Profiles and Events based on handle!

@ChaelCodes ChaelCodes merged commit 27fa2b7 into ChaelCodes:main Oct 17, 2021
@ChaelCodes ChaelCodes added this to the Hacktoberfest 2021 milestone Nov 1, 2021
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 this pull request may close these issues.

Use Friendly handle for Events!
2 participants