@mymodel.user = current_user is not working for me
问题 I followed these questions(one and two) on how to adjust my methods with the current user only so they have the specific user_id to edit,update, create and destroy their products. Here is my code: My Migration: class CreateProducts < ActiveRecord::Migration def self.up create_table :products do |t| t.string :name t.date :date t.decimal :price, :default => 0, :precision => 10, :scale => 2 t.integer :user_id t.float :latitude t.float :longitude the Controller: class ProductsController <