Class: AdminAssistant::PaperclipColumn
- Defined in:
- lib/admin_assistant/paperclip_column.rb
Defined Under Namespace
Classes: FormView, IndexView, ShowView, View
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #contains?(column_name) ⇒ Boolean
-
#initialize(name) ⇒ PaperclipColumn
constructor
A new instance of PaperclipColumn.
Methods inherited from Column
#form_view, #index_view, #search_view, #show_view, #verify_for_search, #view
Constructor Details
#initialize(name) ⇒ PaperclipColumn
Returns a new instance of PaperclipColumn.
5 6 7 |
# File 'lib/admin_assistant/paperclip_column.rb', line 5 def initialize(name) @name = name.to_s end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/admin_assistant/paperclip_column.rb', line 3 def name @name end |
Instance Method Details
#contains?(column_name) ⇒ Boolean
9 10 11 12 13 |
# File 'lib/admin_assistant/paperclip_column.rb', line 9 def contains?(column_name) column_name.to_s == @name || column_name.to_s =~ /^#{@name}_(file_name|content_type|file_size|updated_at)$/ end |