Sha256: 8710380a49b5ad001cf3779988029ac018785c3767d5f72fbc6bd8614958f8cf
Contents?: true
Size: 757 Bytes
Versions: 1
Compression:
Stored size: 757 Bytes
Contents
# frozen_string_literal: true <% module_namespacing do -%> class <%= name.split('/').last.to_s.camelcase %> include Formify::Form # attr_accessor :fixed_attr # delegate_accessor :bar # :baz, # to: :fixed_attr # validates_presence_of :foo # :bar, # :baz # validate :validate_something # initialize_with :fixed_attr do |attributes| # puts attributes # end def save raise NotImplementedError with_advisory_lock_transaction(:foo) do validate_or_fail .and_then { form_method } .and_then { success(fixed_attr) } end end private # def form_method # end # def validate_something # end end <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
formify-0.14.1 | lib/generators/form/templates/form.rb.tt |