def create_one_accessors(context, options)
      define_method(context) do
        media.with_context(context.to_sym).first
      end

      module_eval <<-"end;", __FILE__, __LINE__
        def #{context}=(value)
          return if value.blank?
          medium = Medium.new_from_value(self, value, "#{context}", "#{options[:encode]}", "#{options[:only]}")
          if medium
            @old_media ||= []
            @old_media += media.with_context("#{context}")
            media << medium
          end
        end
      end;
    end
def create_one_accessors(context, options)
      define_method(context) do
        media.with_context(context.to_sym).first
      end

      module_eval <<-"end;", __FILE__, __LINE__
        def #{context}=(value)
          return if value.blank?
          medium = Medium.new_from_value(self, value, "#{context}", "#{options[:encode]}", "#{options[:only]}")
          if medium
            @old_media ||= []
            @old_media += media.with_context("#{context}")
            media << medium
          end
        end
      end;
    end
create_one_accessors
 Create needed accessors on master object for unique relation

 @param [String] context
 @param [Hash]   options