README.md in params_builder-0.1.0 vs README.md in params_builder-0.2.0
- old
+ new
@@ -19,13 +19,14 @@
$ gem install params_builder
## Usage
-1. Set file_path for ParamsBuilder.
+1 Set file_path for ParamsBuilder.
If you are using Rails, by default ParamsBuilder will set file_path with
+
`"#{Rails.root}/spec/params_builders"`.
```ruby
@@ -33,23 +34,23 @@
config.file_path = "#{Rails.root}/spec/params_builders"
end
```
-2. Touch a new file like `company_params.yml.erb` in specify folder.
+2 Touch a new file like `company_params.yml.erb` in specify folder.
-```ruby
+```yaml
name: <%= company.name %>
logo: <%= company.logo %>
owner: <%= owner.name %>
images_attributes:
- url: "a.jpg"
- url: "b.jpg"
```
-3. Get params from this file.
+3 Get params from this file.
```ruby
class Company
attr_accessor :name, :logo
end