Sha256: 6c5f8d3a7ef26343d2a9d532ec449b0e40007ffaf5788e7fb929a86df0dccf27

Contents?: true

Size: 306 Bytes

Versions: 7

Compression:

Stored size: 306 Bytes

Contents

module SimpleCalendar
  module ModelAdditions
    def has_calendar(options={})
      config = { :start_time => "start_time"}
      config.update(options) if options.is_a?(Hash)

      class_eval <<-EOV
        def start_time_column
          #{config[:start_time]}
        end
      EOV
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
simple_calendar-0.0.8 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.7 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.6 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.5 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.4 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.3 lib/simple_calendar/model_additions.rb
simple_calendar-0.0.2 lib/simple_calendar/model_additions.rb