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

Always show public photos #6398

Closed

Conversation

svbergerem
Copy link
Member

Fixes #5973.

current_user.photos_from(person, limit: limit, max_time: max_time)
else
Photo.where(author_id: person.id, public: true)
end.order("created_at desc")
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer assignment to a local photos = if ... over chaining on end.

context "without a current user" do
it "returns all public photos" do
expect(Photo).to receive(:where).with(author_id: @user.person.id, public: true).and_call_original
Photo.visible(nil, @user.person, :all, nil)
Copy link
Member

Choose a reason for hiding this comment

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

I think it's okay to rely on the default values here too.

@svbergerem svbergerem added this to the 0.5.4.0 milestone Sep 13, 2015
@jhass
Copy link
Member

jhass commented Sep 14, 2015

Merged as 05a6d95

Thanks!

@svbergerem svbergerem deleted the always-show-public-photos branch September 14, 2015 20:09
jhass added a commit that referenced this pull request Sep 14, 2015
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.

None yet

2 participants