0

I am trying to retrieve 2 columns from a mysql database to use with FullCalendar, using Ruby but I keep getting the ActiveModel::MissingAttributeError. What is the correct way of doing this? I have tried the following and checked SO but no luck. Please help me. Thanks.

Request.select("title, start").where(:id => '110012')

Request.find(:all, :select => "title, start", :conditions => {:id => '110012'} )
Ankur
  • 5,086
  • 19
  • 37
  • 62

1 Answers1

0

I was able to solve the problem by doing the following. Hope this helps someone else.

@title = []
@start = []
    Request.where(:vid =>'111349').find_each do |vacation|
        @title.push vacation.title
        @start.push vacation.start
    end