2

How can i get mass assignable attributes for model?

I found this, but it seems to me kinda dirty.

Game.accessible_attributes.to_a.reject{|i| i.empty?}

Is there any cleaner way?

Mailo Světel
  • 24,002
  • 5
  • 30
  • 40

1 Answers1

0

I don't understand why the is the reject function.

Did you try this :

Game.accessible_attributes
Dougui
  • 7,142
  • 7
  • 52
  • 87