class Subject

Schema Information

Table name: subjects

id              :integer          not null, primary key
name            :string(255)
created_at      :datetime
updated_at      :datetime
description     :text
is_featured     :boolean          default(FALSE)
image_text      :string(255)
courses_count :integer          default(0)
university_id      :integer

Public Class Methods

paginate(options = {}) click to toggle source

Sets pagination and records limit per page.

# File app/models/subject.rb, line 50
def self.paginate(options = {})
  page(options[:page]).per(options[:per_page])
end