README.md in rails-patterns-0.9.0 vs README.md in rails-patterns-0.10.0
- old
+ new
@@ -22,15 +22,15 @@
```
Then `bundle install`
## Query
-
+
### When to use it
-One should consider using query objects pattern when in need to perform complex querying on active record relation.
-Usually one should avoid using scopes for such purpose.
+One should consider using query objects pattern when in need to perform complex querying on active record relation.
+Usually one should avoid using scopes for such purpose.
As a rule of thumb, if scope interacts with more than one column and/or joins in other tables, it should be moved to query object.
Also whenever a chain of scopes is to be used, one should consider using query object too.
Some more information on using query objects can be found in [this article](https://medium.com/@blazejkosmowski/essential-rubyonrails-patterns-part-2-query-objects-4b253f4f4539).
### Assumptions and rules
@@ -96,13 +96,13 @@
* Calling service object's `.call` method executes `#call` and returns service object instance
* A result of `#call` method is accessible through `#result` method
* It is recommended for `#call` method to be the only public method of service object (besides state readers)
* It is recommended to name service object classes after commands (e.g. `ActivateUser` instead of `UserActivation`)
-### Other
+### Other
-A bit higher level of abstraction is provided by [business_process gem](https://github.com/Selleo/business_process).
+A bit higher level of abstraction is provided by [business_process gem](https://github.com/Selleo/business_process).
### Examples
#### Declaration
@@ -394,27 +394,27 @@
### Examples
#### Declaration
```ruby
-class OrderIsSentRule < Rule
+class OrderIsSentRule < Patterns::Rule
def satisfied?
subject.sent?
end
end
-class OrderIsPaidRule < Rule
+class OrderIsPaidRule < Patterns::Rule
def satisfied?
subject.paid?
end
def forceable?
true
end
end
-OrderCompletedNotificationRuleset = Class.new(Ruleset)
+OrderCompletedNotificationRuleset = Class.new(Patterns::Ruleset)
OrderCompletedNotificationRuleset.
add_rule(:order_is_sent_rule).
add_rule(:order_is_paid_rule)
```
@@ -435,6 +435,6 @@

Software development teams with an entrepreneurial sense of ownership at their core delivering great digital products and building culture people want to belong to. We are a community of engaged co-workers passionate about crafting impactful web solutions which transform the way our clients do business.
-All names and logos for [Selleo](https://selleo.com/about) are trademark of Selleo sp. z o. o. sp. k.
+All names and logos for [Selleo](https://selleo.com/about) are trademark of Selleo Labs Sp. z o.o. (formerly Selleo Sp. z o.o. Sp.k.)