Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/printing_press/publishable.rb

Class Method Summary collapse

Class Method Details

.arel_tableObject



90
91
92
93
94
95
96
# File 'lib/printing_press/publishable.rb', line 90

def arel_table
				if not defined?(@quoted_table_name) or @last_table_name_for_arel != table_name
 		@arel_table = Arel::Table.new(table_name, arel_engine)
				end
				
				@last_table_name_for_arel = @arel_table
end

.quoted_table_nameObject



82
83
84
85
86
87
88
# File 'lib/printing_press/publishable.rb', line 82

def quoted_table_name
				if not defined?(@quoted_table_name) or @last_table_name_for_quoted != table_name
  	@quoted_table_name = connection.quote_table_name(table_name)
				end
				
				@last_table_name_for_quoted = @quoted_table_name
end