README.md in yamls-0.2.1 vs README.md in yamls-0.2.2
- old
+ new
@@ -103,10 +103,31 @@
# set columns
action_name_3:
# set columns
```
+Define method:
+
+```ruby
+class BooksController < ApplicationController
+ include Yamls::Support::Parameters
+
+ def action_name_1
+ params = book_action_name_1_params # {controller_name.singularize}_{action_name}_params
+ end
+
+ def action_name_2
+ params = book_action_name_2_params
+ end
+
+ def action_name_3
+ params = book_action_name_3_params
+ end
+end
+
+```
+
### Initialize configuration
1) If you want to specify a file:
```ruby
@@ -156,10 +177,10 @@
```ruby
Yamls::Parameters.new(
params,
required: :book,
- nested: %i[main nested1 neste2 neste3]
+ nested: %i[main nested1 nested2 nested3]
)
```
3) Model specification only: