Order.rb:
class Order < ActiveRecord::Base
has_one :review
end
Review.rb:
class Review < ActiveRecord::Base
belongs_to :order
end
I need to build a review, im using this method:
class OrdersController < ApplicationController
def build_review
@review = Review.new(:order => @order)
end
but i get this error: Can't mass-assign protected attributes: order
any ideas?