Paperclip generating extra file in root of Rails app -


i have controller method receives string client, converts pseudo file using stringio, , saves paperclip attribute.

#tasks_controller def generate      generator = stringio.new(params[:generator])     @task.update_attribute :generator, generator      render nothing: true end   

this save string file in correct location, additionally saves same file under random hexadecimal name in root directory of rails app.

here task object defining paperclip attribute should saved:

#task.rb class task < activerecord::base     has_attached_file :generator, :url => "/generators/:id/generator.js" end 


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -