Guest User

Untitled

a guest
Jan 21st, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. def new_safe(params)
  2. playlist = Playlist.new
  3. playlist.title = params[:title]
  4. playlist.description = params[:description]
  5. playlist.save
  6. playlist
  7. end
  8.  
  9. @playlist = Playlist.new
  10. @playlist.input_params(params)
  11.  
  12. def input_params(params)
  13. playlist.title = params[:title]
  14. playlist.description = params[:description]
  15. playlist.save
  16. end
Add Comment
Please, Sign In to add comment