state_machines-activerecord:StateMachines活动记录集成

时间:2021-05-13 16:13:01
【文件属性】:
文件名称:state_machines-activerecord:StateMachines活动记录集成
文件大小:49KB
文件格式:ZIP
更新时间:2021-05-13 16:13:01
Ruby StateMachines活动记录集成 Active Record 5.1+集成增加了对数据库事务的支持,自动保存了记录,命名范围,验证错误。 安装 将此行添加到您的应用程序的Gemfile中: gem 'state_machines-activerecord' 然后执行: $ bundle 或将其自己安装为: $ gem install state_machines-activerecord 用法 有关完整的用法指南,请参见 例子 class Vehicle < ActiveRecord xss=removed> :parked do before_transition :parked => any - :parked , :do => :put_on_seatbelt after_transition any =>
【文件预览】:
state_machines-activerecord-master
----.gitignore(185B)
----gemfiles()
--------active_record_6.0.gemfile(277B)
--------active_record_5.1.gemfile(277B)
--------active_record_5.2.gemfile(277B)
--------active_record_6.1.gemfile(277B)
--------active_record_edge.gemfile(361B)
----log()
--------.gitkeep(0B)
----LICENSE.txt(1KB)
----.github()
--------workflows()
----state_machines-activerecord.gemspec(1KB)
----README.md(3KB)
----lib()
--------state_machines()
--------state_machines-activerecord.rb(215B)
----Appraisals(1017B)
----Gemfile(80B)
----Rakefile(169B)
----test()
--------integration_test.rb(905B)
--------machine_with_callbacks_test.rb(5KB)
--------machine_with_different_integer_column_default_test.rb(830B)
--------model_test.rb(369B)
--------machine_with_scopes_test.rb(2KB)
--------machine_with_failed_action_test.rb(1KB)
--------machine_with_dirty_attributes_during_loopback_test.rb(587B)
--------machine_with_failed_before_callbacks_test.rb(1KB)
--------machine_with_loopback_test.rb(595B)
--------machine_with_state_driven_validations_test.rb(852B)
--------machine_with_event_attributes_on_save_test.rb(6KB)
--------machine_with_non_column_state_attribute_defined_test.rb(800B)
--------machine_with_scopes_and_owner_subclass_test.rb(912B)
--------machine_with_failed_after_callbacks_test.rb(1017B)
--------machine_with_conflicting_state_name_test.rb(837B)
--------machine_without_database_test.rb(455B)
--------machine_nested_action_test.rb(900B)
--------machine_with_dirty_attribute_and_state_events_test.rb(498B)
--------machine_with_validations_test.rb(1KB)
--------machine_with_event_attributes_on_validation_test.rb(3KB)
--------machine_by_default_test.rb(344B)
--------machine_with_same_column_default_test.rb(651B)
--------machine_with_validations_and_custom_attribute_test.rb(525B)
--------machine_with_transactions_test.rb(557B)
--------machine_unmigrated_test.rb(373B)
--------machine_with_aliased_attribute_test.rb(538B)
--------machine_with_dirty_attribute_and_custom_attributes_during_loopback_test.rb(683B)
--------machine_with_different_column_default_test.rb(795B)
--------machine_with_scopes_and_joins_test.rb(1KB)
--------machine_with_event_attributes_on_autosave_test.rb(1KB)
--------machine_errors_test.rb(576B)
--------machine_with_dirty_attributes_and_custom_attribute_test.rb(973B)
--------machine_with_default_scope_test.rb(436B)
--------machine_with_event_attributes_on_custom_action_test.rb(922B)
--------files()
--------machine_with_event_attributes_on_save_bang_test.rb(2KB)
--------test_helper.rb(2KB)
--------machine_with_complex_pluralization_scopes_test.rb(391B)
--------machine_multiple_test.rb(509B)
--------machine_with_dynamic_initial_state_test.rb(2KB)
--------machine_with_conflicting_predicate_test.rb(350B)
--------machine_with_same_integer_column_default_test.rb(709B)
--------machine_with_column_state_attribute_test.rb(1KB)
--------machine_with_events_test.rb(304B)
--------machine_with_internationalization_test.rb(6KB)
--------machine_with_states_test.rb(310B)
--------machine_with_static_initial_state_test.rb(5KB)
--------machine_with_custom_attribute_test.rb(519B)
--------machine_with_dirty_attributes_test.rb(1007B)
--------machine_without_transactions_test.rb(565B)
--------machine_with_initialized_state_test.rb(1KB)

网友评论