method

to_fs

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: Array
to_fs(format = :default) public

Extends Array#to_s to convert a collection of elements into a comma separated id list if :db argument is given as the format.

This method is aliased to to_formatted_s.

Blog.all.to_fs(:db)  # => "1,2,3"
Blog.none.to_fs(:db) # => "null"
[1,2].to_fs          # => "[1, 2]"
Show source
Register or log in to add new notes.