Andrey Drozdov Andrey Drozdov - 1 year ago 69
Ruby Question

Ruby/Rails: Use `separator: '-'` instead

Writing test for my project, and notice this warning it terminal when running rspec

DEPRECATION WARNING: Passing the separator argument as a positional
parameter is deprecated and will soon be removed.
Use `separator: '-'` instead.
(called from add_link at /myapp/app/models/post.rb:37)

I have an action before save record, looks like = theme + '-' +

And I've tried to find some information about this but I don't really don't understanding what this warning means.

** EDIT **

Well, I've changed for
but it still gives me the same warning.

Than I decided to go other way and changed for
. The
method look like:

date = [,,]
date = date.join('-')

But it still gives me an error.

I don't think it's really big problem, but still I want t figure out why is that happening.

** EDIT **

Figure it out, it must gem that I use cause that problem (the gem is called
) I will do future research to fix this warning with gem or I'll try to find way to replace it.

Answer Source

This deprecation was removed 10 days ago.

Probably one of gems use old format of parameterize method.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download