Class: FeaturesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- FeaturesController
- Includes:
- FeatureGetterHelper
- Defined in:
- app/controllers/features_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/features_controller.rb', line 6 def index table = CartoDB::Connection.query "SELECT cartodb_id, title, ST_Centroid(the_geom) as the_geom FROM #{features_table_name} LIMIT 20" @features = table.rows || [] @features_json = @features.map{|f| {:title => f.title, :latitude => f.the_geom.y, :longitude => f.the_geom.x}}.to_json.html_safe end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/features_controller.rb', line 12 def show end |