FAQ Database Discussion Community

how to using just one model for some tables?

I have a website that users can send their product (like car, mobile, computers) and sell it online on my website, maybe something like Ebay and Amazon. I have ads table that store all public information about one thing using Mass Assignment, and other categories like Mobile, Car and Computers...

Laravel 5 Modify Mass Assignment

How I can change the fillable attribute of a model on the fly? For example, I have User model with, protected $fillable = ['name', 'email', 'password'] When updating the user, I want to exclude 'email' from mass assignment so that the email is not changed on update....

Mass Assignment Vulnerability

I have a model A such as : class A < ActiveRecord::Base validates_uniqueness_of :name attr_accessible :name end I want to remove mass assignment vulnerability on attribute :name. So I deleted the line attr_accessible :name from this model. This model has no controller, so I didn't write any strong parameters. This...