Back to Parent

Example of mood input
elsif body.start_with? "mood"  
    mood = body.gsub(/[^0-9]/, '')
    if mood.nil? || ""
      arr = [body]
      mood = arr.map{ |s| s.gsub("mood ", "").gsub(" "," ") }[0]
    end
    recording = Journal.find_by(created_time: DateTime.now.to_date)
    recording.mood = mood
    recording.save
Click to Expand

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0