README.md in active_link_to-1.0.4 vs README.md in active_link_to-1.0.5
- old
+ new
@@ -26,11 +26,10 @@
## Active Options
Here's a list of available options that can be used as the `:active` value
```
-<<<<<<< HEAD
* Boolean -> true | false
* Symbol -> :exclusive | :inclusive | :exact
* Regex -> /regex/
* Controller/Action Pair -> [[:controller], [:action_a, :action_b]]
* Controller/Specific Action Pair -> [controller: :action_a, controller_b: :action_b]
@@ -77,11 +76,11 @@
```ruby
# For matching multiple controllers and actions:
active_link_to 'User Edit', edit_user_path(@user), active: [['people', 'news'], ['show', 'edit']]
# For matching specific controllers and actions:
-active_link_to 'User Edit', edit_user_path(@user), :active => [people: :show, news: :edit]
+active_link_to 'User Edit', edit_user_path(@user), active: [people: :show, news: :edit]
# for matching all actions under given controllers:
active_link_to 'User Edit', edit_user_path(@user), active: [['people', 'news'], []]
# for matching all controllers for a particular action
@@ -95,10 +94,10 @@
```
If we need to set link to be active based on `params`, we can do that as well:
```ruby
-active_link_to 'Admin users', users_path(role_eq: 'admin'), :active => { role_eq: 'admin' }
+active_link_to 'Admin users', users_path(role_eq: 'admin'), active: { role_eq: 'admin' }
```
## More Options
You can specify active and inactive css classes for links: