Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Form objects
Search
Roman Dubrovsky
June 16, 2016
Programming
1
170
Form objects
Roman Dubrovsky
June 16, 2016
Tweet
Share
More Decks by Roman Dubrovsky
See All by Roman Dubrovsky
Life with GraphQL
roman_dubrovsky
0
150
Timezone pain (lighting)
roman_dubrovsky
0
33
Feature toggling
roman_dubrovsky
0
60
GraphQl paratemers (lightning)
roman_dubrovsky
0
17
Views and Controllers, Forms
roman_dubrovsky
0
21
Railway Oriented Programming
roman_dubrovsky
0
150
Git tips
roman_dubrovsky
0
62
Cells refactroing
roman_dubrovsky
0
40
Other Decks in Programming
See All in Programming
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
Patterns of Patterns
denyspoltorak
0
1.4k
Fragmented Architectures
denyspoltorak
0
150
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
250
CSC307 Lecture 03
javiergs
PRO
1
490
2026年 エンジニアリング自己学習法
yumechi
0
130
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Ethics towards AI in product and experience design
skipperchong
2
190
Context Engineering - Making Every Token Count
addyosmani
9
650
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Transcript
Form Objects
None
User model
None
None
None
None
https://github.com/apotonick/reform
Defining form
Defining form Building form
Defining form Building form Using form
Defining form Building form Using form Using form
Form objects can: • Mapping attributes from models to form
• Define validations for form • Simple render form’s attributes
Form object is easy
1st case
1st case
Using form
Rendering form
accepts_nested_attributes_for:
2nd case accept_nested_attributes_for cocoon
Without form objects
None
With form objects
Move validations out of models
3rd case
None
With form object it’s easy
4th case
None
None
Using forms
Summary • Form objects can mapping attributes from models to
form • Form objects defining validations for form • Simple render form’s attributes with form objects • No validations in model
None
Pros • New abstraction • Clean models • No more
conditional validations • No more conditional params permissions
Cons • New abstraction • More code • Human factor
None
ПОТРАЧЕНО