Sha256: cf6cc780693fe0f09fe4a95a855b2b3193ecef1e569b8d5f038e85176d84d01c
Contents?: true
Size: 448 Bytes
Versions: 2
Compression:
Stored size: 448 Bytes
Contents
class ViewContext attr_accessor :start_date, :start_date_param def initialize(start_date = nil, options = {}) @start_date = start_date @start_date_param = options.fetch(:start_date_param, :start_date) end def params if @start_date.present? ActionController::Parameters.new({start_date_param => @start_date}) else ActionController::Parameters.new end end def render(options = {}) options end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_calendar-2.4.3 | spec/support/view_context.rb |
simple_calendar-2.4.2 | spec/support/view_context.rb |