Parent

Methods

Class/Module Index [+]

Quicksearch

Mongoid::Errors::UnsupportedJavascript

Raised when Javascript criteria selector is passed for embedded document.

Public Class Methods

new(klass, javascript) click to toggle source

Create the new error caused by using Javascript in embedded document criteria selector.

@example Create the error.

UnsupportedJavascriptSelector.new(Album, "this.name == '101'")

@param [ Class ] klass The embedded document class. @param [ String ] javascript The javascript expression.

@since 3.0.0

# File lib/mongoid/errors/unsupported_javascript.rb, line 16
def initialize(klass, javascript)
  super(
    compose_message(
      "unsupported_javascript",
      { klass: klass, javascript: javascript }
    )
  )
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.