Ruby on Rails
Saturday, March 10, 2018
On Sunday, 11 March 2018 02:39:43 UTC, Robert Phillips wrote:
On Friday, 9 March 2018 14:58:23 UTC, fugee ohu wrote:>Why create an ApplicationRecord class inheriting from ActiveRecord::Base and then have all models inherit from ApplicationRecord instead of ActiveRecord::Base ?I know a guy that doesn't use rails generate controller or rails generate model.. So when he makes a controller he just handcodes it.For him I suppose it'd be an advantage, asIt is easier to writeclass Abc < ApplicationControllerendthan to writeclass Abc < ActionController::Baseprotect_from_forgery with: :exceptionend
class Abc should say class AbcController
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9eba08e1-9847-43f5-8a16-1679e04ab639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment