-
Notifications
You must be signed in to change notification settings - Fork 72
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
Danebook #35
base: master
Are you sure you want to change the base?
Danebook #35
Conversation
comment test |
Woooo, comments!!! Yeah |
When I logout and then go to the timeline page, I get an error |
get 'comments/new' | ||
|
||
resources :users do | ||
resource :profiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use shallow: true if you can
should resource be resources?
when i try to go to a page that doesnt have a user, i get redirected to the home page which is nice, but then i dont have a way to get back to the timeline |
the search button breaks the app (as exepected because we haven't done that yet!) |
def destroy | ||
@post = Post.find_by_id(params[:id]) | ||
@post.destroy | ||
redirect_to current_user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably makes more sense to redirect to the profile you are currently on, not your own profile
resources :users do | ||
resource :profiles, only: [:edit, :show, :update] | ||
resources :posts, only: [:create, :destroy] | ||
resources :photos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make this a shallow route, for both posts and photos.
No description provided.