Ruby on Rails Friday, June 1, 2012

I am developing an application for days and times for school and I'm
using the gem EventCalendar, but I have a problem in time to paint the
day of the week for a particular discipline, the discipline
mathematics does not happen every day only on days Mon / Wed / Fri.
When creating a discipline I submit this:

class CreateDisciplines <ActiveRecord :: Migration

def change create_table: disciplines do | t |
t.string: name
t.integer: user_id
t.boolean: monday
t.boolean: thursday
t.boolean: wednesday
t.boolean: thursday
t.boolean: friday
t.time: hour_begin
t.time: hour_end
end
t.timestamps
end
end
end


class CreateEvents <ActiveRecord :: Migration

def change create_table: events do | t |
t.integer: discipline_id
t.date: start_at
t.date: end_at
t.boolean: all_day
t.timestamps
end
end
end


You can tell me how do I create a method to paint only the day of the
week a particular discipline registered?

Thank you for help.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment