tandusrl / acts_as_bookable

A reservation plugin for Rails applications that allows resources to be bookable.
MIT License
140 stars 103 forks source link

@bookable.schedule method missing #18

Closed iliaboti closed 7 years ago

iliaboti commented 7 years ago

Hi,

I am trying to use acts_as_bookable with Rails5 and I see that @bookable.schedule gives me NoMethodError: undefined method `schedule' for ...

FYI.. @bookable.booking_opts => {:time_type=>:fixed, :capacity_type=>:none, :bookable_across_occurrences=>false}

Also note that I am using the influitive/apartment gem -> https://github.com/influitive/apartment

Thanks for your help, Ioannis

Chosko commented 7 years ago

Hi,

to use the :time_type option your bookable class must have a "schedule" field. You should generate (and run) a migration to add that "schedule" column of type "text" to your bookable table. It's all explained in the readme. Tell me if that helps, or if you need additional assistance.

Il 18 dic 2016 9:43 PM, "iliaboti" notifications@github.com ha scritto:

Hi,

I am trying to use acts_as_bookable with Rails5 and I see that @bookable.schedule gives me NoMethodError: undefined method `schedule' for ...

FYI.. @bookable.booking_opts => {:time_type=>:fixed, :capacity_type=>:none, :bookable_across_occurrences=>false}

Thanks for your help, Ioannis

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tandusrl/acts_as_bookable/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJSOuLCXj9EadLrpS2AP9VeL0VIo5fmks5rJZsGgaJpZM4LQOoz .

iliaboti commented 7 years ago

Thanks! You are absolutely right. The documentation mentions this requirement for creating the relevant column. Apologies for not seeing it. I am now a step further and trying to use the gem. Thanks a lot for your work and your answer.