Fetching data through ActiveRecord