Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shetty-tejas authored May 29, 2024
1 parent 59a49b1 commit 666d9fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class UsersController < ApplicationController
# set_user namespace: 'admin/account', ...

# If you want to search an object's relationship, you can use the `associated_to` option.
# set_articles! associated_to: :user, ... # => Article.where(user => user)
# set_articles! associated_to: :user, scope_to: :published # => Article.published.where(user => user).find_by
# set_article! associated_to: :user, ... # => Article.where(user => user).find_by
# set_article! associated_to: :user, scope_to: :published # => Article.published.where(user => user).find_by

def show
do_something with: user # You also have an attribute reader with the same name available if the object is found. If not, it defaults to nil (unless a bang method is used, in which case an error is raised!)
Expand Down

0 comments on commit 666d9fa

Please sign in to comment.