Sha256: 5cda4eb90249465278b897bedc5a2183647e6f2a4491a2649d827da839798142

Contents?: true

Size: 504 Bytes

Versions: 25

Compression:

Stored size: 504 Bytes

Contents

module IntercomRails

  module CustomDataHelper
    
    # This helper allows custom data attributes to be added to a user
    # for the current request from within the controller. e.g.
    #
    # def destroy
    #   intercom_custom_data.user['canceled_at'] = Time.now
    #   ...
    # end
    def intercom_custom_data
      @_request_specific_intercom_custom_data ||= begin
        s = Struct.new(:user, :company).new
        s.user = {}
        s.company = {}
        s
      end
    end

  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
intercom-rails-0.2.24 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.23 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.22 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.21 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.20 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.19 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.18 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.17 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.16 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.15 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.14 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.13 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.12 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.11 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.10 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.9 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.8 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.7 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.6 lib/intercom-rails/custom_data_helper.rb
intercom-rails-0.2.5 lib/intercom-rails/custom_data_helper.rb