lib/generators/domp/templates/model_authentication.rb in domp-0.0.3 vs lib/generators/domp/templates/model_authentication.rb in domp-0.0.4
- old
+ new
@@ -4,10 +4,10 @@
belongs_to :authentication_provider
serialize :params
<% if Rails::VERSION::MAJOR < 4 -%>
- attr_accessible :user_id, :authentication_provider_id, :uid, :token, :token_expires_at, :params
+ attr_accessible "#{class_name.downcase}_id", :authentication_provider_id, :uid, :token, :token_expires_at, :params
<% end -%>
def self.create_from_omniauth(params, <%= class_name.downcase %>, provider)
create(
<%= class_name.downcase %>: <%= class_name.downcase %>,
\ No newline at end of file