class Testimonial

Schema Information

Table name: testimonials

id           :integer          not null, primary key
heading      :string(255)
name         :string(255)
position     :string(255)
university_name :string(255)
active       :boolean
created_at   :datetime
updated_at   :datetime
description  :text
university_id   :integer

Public Class Methods

paginate(option={}) click to toggle source

Set pagination and records limit per page.

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

Public Instance Methods

image_url(style = :original) click to toggle source

Returns the testimonial image url.

# File app/models/testimonial.rb, line 35
def image_url(style = :original)
  (testimonial_image || build_testimonial_image).image.url(style)
end