Skip to content

Commit

Permalink
everything ok
Browse files Browse the repository at this point in the history
  • Loading branch information
enterteg committed Apr 19, 2016
1 parent 0958e8c commit cc551d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/public_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def life
end

def about
@post = Post.includes(:photo_files).find(1)
@post = Post.includes(:photo_files).find_by(id: 1)
render :nothing unless @post
end

def search
Expand Down
2 changes: 1 addition & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)

Category.create([{id: 1, name: 'travels'}, {id:3, name: 'life'},{id: 2, name: 'food'}, {id: 4, name: 'about'}])
Category.create([{id: 1, name: 'travels'}, {id:3, name: 'life'},{id: 2, name: 'food'}, {id: 4, name: 'about'}])

0 comments on commit cc551d3

Please sign in to comment.