File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -203,10 +203,12 @@ def value_for(attribute, options = {})
203203 elsif exposure_options [ :using ]
204204 exposure_options [ :using ] . represent ( object . send ( attribute ) , :root => nil )
205205 elsif exposure_options [ :format_with ]
206- if exposure_options [ :format_with ] . is_a? Symbol
207- self . send ( exposure_options [ :format_with ] . to_sym , object . send ( attribute ) )
208- elsif exposure_options [ :format_with ] . respond_to? :call
209- exposure_options [ :format_with ] . call ( object . send ( attribute ) )
206+ format_with = exposure_options [ :format_with ]
207+
208+ if format_with . is_a? Symbol
209+ self . send ( format_with . to_sym , object . send ( attribute ) )
210+ elsif format_with . respond_to? :call
211+ format_with . call ( object . send ( attribute ) )
210212 end
211213 else
212214 object . send ( attribute )
You can’t perform that action at this time.
0 commit comments