Sha256: e25d719a0113d089c2e7de6716449f4b1ecbd4e927fe5a33b51c6dcb56621de8

Contents?: true

Size: 323 Bytes

Versions: 1

Compression:

Stored size: 323 Bytes

Contents

require 'map_fields/mapper'

module MapFields
  module Controller
    def map_fields(fields, file, &block)
      @mapper = Mapper.new(self, fields, file)
      if @mapper.mapped?
        block.call
      else
        append_view_path File.expand_path('../../../views/', __FILE__)
        render
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
map_fields-2.0.0.beta lib/map_fields/controller.rb