I've got a problem with assigning some value to model attribute and save it. I've tried a lot of ways, but none worked.
@rating = Rating.new(rating_params)
@rating.save
@rating.update_attribute(:ip_address, request.remote_ip)
or
@rating = Rating.new(rating_params)
@rating.ip_address = request.remote_ip
@rating.save
Nothing is working for me :-( Everytime I got NULL in my database for column ip_address