rails 4.1 support

rails 4.1 support and 1 bug fix

Bug is has_many relations data is not paginated.