Thanks to visit codestin.com
Credit goes to github.com

Skip to content

liangzan/hide_columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hide Columns hides the content columns of the ActiveRecord Object.

Hide columns is replaced by the define_columns gem. The author will be maintaining define_columns in the future.

$ gem install hide_columns
# Person has content_columns [ "name", "address", "gender", "hobbies" ]
# Note that the names must be an exact match
class Person < ActiveRecord::Base
  hide_columns ["hobbies", "address"]
end

# Person.content_columns returns [ "name", "gender" ]

Copyright © 2009 Wong Liang Zan. See LICENSE for details.

About

Hide chosen content columns in the ActiveRecord Model

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages