Help me DRY this up please

I had the same problem, this helped me:

write_attribute("title", title.gsub(...))

Have luck!:slight_smile:

Paweł K wrote:

I had the same problem, this helped me:

write_attribute("title", title.gsub(...))

Have luck!:slight_smile:

thanks, but where does that go? in my items model?

Yup, in the model :slight_smile:

So you could make this:

def title=(str)    write_attribute("title", str.gsub("_", " ")) end

this so far helps with stack problem :slight_smile: