Skip to content

Instantly share code, notes, and snippets.

In the controller action

change_img_params(params[:background_image])

def change_img_params(img)
begin
  Base64.decode64(params[:user][img])
  if params[:user][img]
    params[:user][img] = file_decode(params[:user][img].split(',')[1],

params[:user][:screen_name] )