Skip to content

Documentation


Documentation / @blazetrails/activemodel / FromUser

Class: FromUser ​

Defined in: packages/activemodel/lib/attribute.ts:275

Extends ​

Extended by ​

Constructors ​

Constructor ​

new FromUser(name, valueBeforeTypeCast, type, originalAttribute?, value?): FromUser

Defined in: packages/activemodel/lib/attribute.ts:72

Parameters ​

ParameterTypeDefault value
namestring | nullundefined
valueBeforeTypeCastunknownundefined
typeValueType<unknown> | nullundefined
originalAttributeAttribute | nullnull
value?unknownundefined

Returns ​

FromUser

Inherited from ​

Attribute.constructor

Properties ​

__valueForDatabase ​

protected __valueForDatabase: unknown

Defined in: packages/activemodel/lib/attribute.ts:32

Inherited from ​

Attribute.__valueForDatabase


_value ​

protected _value: unknown

Defined in: packages/activemodel/lib/attribute.ts:31

Inherited from ​

Attribute._value


_valueBeforeTypeCast ​

protected _valueBeforeTypeCast: unknown

Defined in: packages/activemodel/lib/attribute.ts:27

Inherited from ​

Attribute._valueBeforeTypeCast


eql ​

eql: (other) => boolean

Defined in: packages/activemodel/lib/attribute.ts:183

Parameters ​

ParameterType
otherAttribute

Returns ​

boolean

Inherited from ​

Attribute.eql


name ​

readonly name: string | null

Defined in: packages/activemodel/lib/attribute.ts:26

Inherited from ​

Attribute.name


type ​

readonly type: ValueType<unknown> | null

Defined in: packages/activemodel/lib/attribute.ts:28

Inherited from ​

Attribute.type


FromDatabase ​

static FromDatabase: typeof FromDatabase

Defined in: packages/activemodel/lib/attribute.ts:20

Inherited from ​

Attribute.FromDatabase


FromUser ​

static FromUser: typeof FromUser

Defined in: packages/activemodel/lib/attribute.ts:21

Inherited from ​

Attribute.FromUser


Null ​

static Null: typeof Null

Defined in: packages/activemodel/lib/attribute.ts:23

Inherited from ​

Attribute.Null


Uninitialized ​

static Uninitialized: typeof Uninitialized

Defined in: packages/activemodel/lib/attribute.ts:24

Inherited from ​

Attribute.Uninitialized


UserProvidedDefault ​

static UserProvidedDefault: typeof UserProvidedDefault

Defined in: packages/activemodel/lib/attribute.ts:19

Inherited from ​

Attribute.UserProvidedDefault


WithCastValue ​

static WithCastValue: typeof WithCastValue

Defined in: packages/activemodel/lib/attribute.ts:22

Inherited from ​

Attribute.WithCastValue

Accessors ​

originalValue ​

Get Signature ​

get originalValue(): unknown

Defined in: packages/activemodel/lib/attribute.ts:92

Returns ​

unknown

Inherited from ​

Attribute.originalValue


valueBeforeTypeCast ​

Get Signature ​

get valueBeforeTypeCast(): unknown

Defined in: packages/activemodel/lib/attribute.ts:68

Returns ​

unknown

Inherited from ​

Attribute.valueBeforeTypeCast


valueForDatabase ​

Get Signature ​

get valueForDatabase(): unknown

Defined in: packages/activemodel/lib/attribute.ts:100

Missing Rails Name ​

valueForDatabase — PERMANENT

Returns ​

unknown

Inherited from ​

Attribute.valueForDatabase

Methods ​

cameFromUser() ​

cameFromUser(): boolean

Defined in: packages/activemodel/lib/attribute.ts:280

Returns ​

boolean

Overrides ​

Attribute.cameFromUser


changedInPlace() ​

changedInPlace(): boolean | undefined

Defined in: packages/activemodel/lib/attribute.ts:123

Returns ​

boolean | undefined

Inherited from ​

Attribute.changedInPlace


dup() ​

dup(): Attribute

Defined in: packages/activemodel/lib/attribute.ts:247

Returns ​

Attribute

Inherited from ​

Attribute.dup


encodeWith() ​

encodeWith(coder): void

Defined in: packages/activemodel/lib/attribute.ts:228

Parameters ​

ParameterType
coderCoder

Returns ​

void

Inherited from ​

Attribute.encodeWith


equals() ​

equals(other): boolean

Defined in: packages/activemodel/lib/attribute.ts:174

Parameters ​

ParameterType
otherAttribute

Returns ​

boolean

Inherited from ​

Attribute.equals


forgettingAssignment() ​

forgettingAssignment(): Attribute

Defined in: packages/activemodel/lib/attribute.ts:130

Returns ​

Attribute

Inherited from ​

Attribute.forgettingAssignment


hasBeenRead() ​

hasBeenRead(): boolean

Defined in: packages/activemodel/lib/attribute.ts:170

Returns ​

boolean

Inherited from ​

Attribute.hasBeenRead


hash() ​

hash(): number

Defined in: packages/activemodel/lib/attribute.ts:185

Returns ​

number

Inherited from ​

Attribute.hash


initWith() ​

initWith(coder): void

Defined in: packages/activemodel/lib/attribute.ts:219

Parameters ​

ParameterType
coderCoder

Returns ​

void

Inherited from ​

Attribute.initWith


isChanged() ​

isChanged(): boolean | undefined

Defined in: packages/activemodel/lib/attribute.ts:119

Returns ​

boolean | undefined

Inherited from ​

Attribute.isChanged


isInitialized() ​

isInitialized(): boolean

Defined in: packages/activemodel/lib/attribute.ts:162

Returns ​

boolean

Inherited from ​

Attribute.isInitialized


isSerializable() ​

isSerializable(block?): boolean

Defined in: packages/activemodel/lib/attribute.ts:115

Parameters ​

ParameterType
block?(castValue) => void

Returns ​

boolean

Inherited from ​

Attribute.isSerializable


originalValueForDatabase() ​

originalValueForDatabase(): unknown

Defined in: packages/activemodel/lib/attribute.ts:189

Returns ​

unknown

Inherited from ​

Attribute.originalValueForDatabase


typeCast() ​

typeCast(value): unknown

Defined in: packages/activemodel/lib/attribute.ts:276

Parameters ​

ParameterType
valueunknown

Returns ​

unknown

Overrides ​

Attribute.typeCast


value() ​

value(_?): unknown

Defined in: packages/activemodel/lib/attribute.ts:87

Parameters ​

ParameterType
_?(name) => unknown

Returns ​

unknown

Inherited from ​

Attribute.value


withCastValue() ​

withCastValue(value): Attribute

Defined in: packages/activemodel/lib/attribute.ts:143

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withCastValue


withType() ​

withType(type): Attribute

Defined in: packages/activemodel/lib/attribute.ts:147

Parameters ​

ParameterType
typeValueType<unknown> | null

Returns ​

Attribute

Inherited from ​

Attribute.withType


withUserDefault() ​

withUserDefault(value): Attribute

Defined in: packages/activemodel/lib/attribute.ts:238

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withUserDefault


withValueFromDatabase() ​

withValueFromDatabase(value): Attribute

Defined in: packages/activemodel/lib/attribute.ts:139

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withValueFromDatabase


withValueFromUser() ​

withValueFromUser(value): Attribute

Defined in: packages/activemodel/lib/attribute.ts:134

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withValueFromUser


fromDatabase() ​

static fromDatabase(name, valueBeforeTypeCast, type, value?): FromDatabase

Defined in: packages/activemodel/lib/attribute.ts:34

Parameters ​

ParameterType
namestring | null
valueBeforeTypeCastunknown
typeValueType<unknown> | null
value?unknown

Returns ​

FromDatabase

Inherited from ​

Attribute.fromDatabase


fromUser() ​

static fromUser(name, valueBeforeTypeCast, type, originalAttribute?): FromUser

Defined in: packages/activemodel/lib/attribute.ts:43

Parameters ​

ParameterTypeDefault value
namestring | nullundefined
valueBeforeTypeCastunknownundefined
typeValueType<unknown> | nullundefined
originalAttributeAttribute | nullnull

Returns ​

FromUser

Inherited from ​

Attribute.fromUser


null() ​

static null(name): Null

Defined in: packages/activemodel/lib/attribute.ts:60

Parameters ​

ParameterType
namestring | null

Returns ​

Null

Inherited from ​

Attribute.null


uninitialized() ​

static uninitialized(name, type): Uninitialized

Defined in: packages/activemodel/lib/attribute.ts:64

Parameters ​

ParameterType
namestring | null
typeValueType<unknown> | null

Returns ​

Uninitialized

Inherited from ​

Attribute.uninitialized


withCastValue() ​

static withCastValue(name, valueBeforeTypeCast, type): WithCastValue

Defined in: packages/activemodel/lib/attribute.ts:52

Parameters ​

ParameterType
namestring | null
valueBeforeTypeCastunknown
typeValueType<unknown> | null

Returns ​

WithCastValue

Inherited from ​

Attribute.withCastValue