Fix most likely copy/paste error
this lambda yielding a bool for `belongs_to` might confuse readers or conflate the :if block
which would probably look something like this
```ruby
belongs_to :primary_agent, if: proc { |movie, params| params[:current_user].present? } do |movie, params|
# in here, params is a hash containing the `:current_user` key
params[:current_user]
end
```
This commit is contained in:
parent
c3376037e7
commit
a25d415b4d
@ -462,7 +462,7 @@ class MovieSerializer
|
|||||||
|
|
||||||
belongs_to :primary_agent do |movie, params|
|
belongs_to :primary_agent do |movie, params|
|
||||||
# in here, params is a hash containing the `:current_user` key
|
# in here, params is a hash containing the `:current_user` key
|
||||||
params[:current_user].is_employee? ? true : false
|
params[:current_user]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user