Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Jun 26, 2023
1 parent 93f323e commit cdb2462
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/avo/fields/base_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def initialize(id, **args, &block)
@nullable = args[:nullable] || false
@null_values = args[:null_values] || [nil, ""]
@format_using = args[:format_using] || nil
@update_using = args[:update_using] || nil
@placeholder = args[:placeholder]
@autocomplete = args[:autocomplete] || nil
@help = args[:help] || nil
Expand All @@ -83,8 +84,6 @@ def initialize(id, **args, &block)
@view = args[:view] || nil
@value = args[:value] || nil
@stacked = args[:stacked] || nil
@update_as = args[:update_as] || nil
@format_as = args[:format_as] || nil
@resource = args[:resource]

@args = args
Expand Down Expand Up @@ -206,8 +205,8 @@ def fill_field(model, key, value, params)
model
end

def update_as(model, key, value, params)
Avo::ExecutionContext.new(target: @update_as, model: model, key: key, value: value, resource: resource, field: self).handle
def update_using(model, key, value, params)
Avo::ExecutionContext.new(target: @update_using, model: model, key: key, value: value, resource: resource, field: self).handle
end

# Try to see if the field has a different database ID than it's name
Expand Down

0 comments on commit cdb2462

Please sign in to comment.