Skip to content

Commit

Permalink
Add missing attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdonarski committed Oct 9, 2023
1 parent 318ccdc commit d2649f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/spree/admin/actions/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def initialize(config)
@text = config[:text]
@method = config[:method]
@id = config[:id]
@target = config[:target]
@data = config[:data]
end

def available?(current_ability, resource = nil)
Expand Down
6 changes: 5 additions & 1 deletion app/models/spree/admin/actions/action_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def initialize(config)
@method = config[:method]
@id = config[:id]
@translation_options = config[:translation_options]
@target = config[:target]
@data = config[:data]
end

def build
Expand All @@ -30,7 +32,9 @@ def build_config
availability_check: @availability_check,
text: text(@name),
method: @method,
id: @id
id: @id,
target: @target,
data: @data
}
end

Expand Down

0 comments on commit d2649f4

Please sign in to comment.