ruby-on-rails: update_attributes overrides model validations?
- by cbrulak
I have a typical, Post model:
class Post< ActiveRecord::Base
validates_presence_of :user_id #Line 1
validates_presence_of :title,:body #Line 2
in the controller, I have:
def create
if request.post?
if login_required
@post = Post.new(params[:post]) …