class FlexColumns::Definition::FakeColumn
This is a class that complies with just enough of the ActiveRecord
interface to columns to be able to be swapped in for it, in our code.
We use this in just one case: when you declare a flex column on a model class whose underlying table doesn’t exist. If you call .reset_column_information
on the model in question, we’ll pick up the new, actual column (assuming the table exists now), but, until then, we’ll use this.
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/flex_columns/definition/fake_column.rb, line 12 def initialize(name) @name = name end
Public Instance Methods
limit()
click to toggle source
# File lib/flex_columns/definition/fake_column.rb, line 24 def limit nil end
null()
click to toggle source
# File lib/flex_columns/definition/fake_column.rb, line 16 def null true end
type()
click to toggle source
# File lib/flex_columns/definition/fake_column.rb, line 20 def type :string end