Sha256: f248590fbebb3a5d794977d986480b1987520ccacb717475751e684110bcd296

Contents?: true

Size: 331 Bytes

Versions: 1

Compression:

Stored size: 331 Bytes

Contents

module WepayRails
  module Helpers
    module ModelHelpers
      def wepayable(*args)
        @params = args.last if args.last.is_a?(Hash)
        @column = args.first.to_s

        puts "*"*50
        puts @column


      end

      eval "define_method(has_#{@column}?) {
            #{@column}.present?
      }"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wepay-rails-0.1.6 lib/helpers/model_helpers.rb