add basic pagination
create search queries model and migration
created query model, controller and join table, renamed photo type to post_type
improved paginating logic in query controller
fix bug in pagination
delete debugging code
Merge pull request #1 from DiscreteObject/paginate

Paginate