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

Danebook #35

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Danebook #35

wants to merge 31 commits into from

Conversation

lynchd2
Copy link

@lynchd2 lynchd2 commented Aug 12, 2016

No description provided.

@hannahsquier
Copy link

comment test

@matthinea
Copy link

Woooo, comments!!! Yeah

@hannahsquier
Copy link

When I logout and then go to the timeline page, I get an error

get 'comments/new'

resources :users do
resource :profiles
Copy link

@hannahsquier hannahsquier Aug 12, 2016

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?

@hannahsquier
Copy link

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

@hannahsquier
Copy link

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

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

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.

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.

4 participants