Class: Msip::Mundep
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Msip::Mundep
- Defined in:
- app/models/msip/mundep.rb
Overview
Ideas de www.sitepoint.com/speed-up-with-materialized-views-on-postgresql-and-rails/ Vista: Municipios con departamento
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ActiveRecord::Base
fecha_ddMyyyy, flotante_localizado
Class Method Details
.refresca ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/models/msip/mundep.rb', line 14 def self.refresca if ActiveRecord::Base.connection.data_source_exists?("msip_mundep") ActiveRecord::Base.connection.execute( "REFRESH MATERIALIZED VIEW msip_mundep", ) end end |
Instance Method Details
#readonly? ⇒ Boolean
10 11 12 |
# File 'app/models/msip/mundep.rb', line 10 def readonly? true end |