lib/magicka/form.rb in magicka-0.4.0 vs lib/magicka/form.rb in magicka-0.5.0

- old
+ new

@@ -1,23 +1,18 @@ # frozen_string_literal: true module Magicka # Class responsible for controlling one object form - class Form + class Form < Aggregator attr_reader :model def initialize(renderer, model) @renderer = renderer @model = model end - def input(field, model: self.model, **args) - Input.render(renderer: renderer, field: field, model: model, **args) - end - - def select(field, model: self.model, **args) - Select.render(renderer: renderer, field: field, model: model, **args) - end + with_element(Input) + with_element(Select) def button(**args) Button.render(renderer: renderer, **args) end