change in algo of event generation plus now multi week events enabled
This commit is contained in:
1 parent
d2fea92969
commit
022d28e5e7
8 files changed
+145
-70
No files matched your search
+14
-1
@@ -7,7 +7,20 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||
def create
|
||||
debugger
|
||||
@newlocation = Location.new(params[:location])
|
||||
render :json => {"success"=>"true"}.to_json
|
||||
@newlocation.save!
|
||||
render :action => "index"
|
||||
end
|
||||
|
||||
def get_locations
|
||||
locations = Location.all
|
||||
@data = Array.new
|
||||
|
||||
locations.each do |location|
|
||||
picurl = "http://"+request.host + location.file.url
|
||||
thumburl = "http://"+request.host + location.file.thumb.url
|
||||
@data << {"name"=>location.name,"pic_url"=>picurl,"thumb_url"=>thumburl,"description"=>location.description}
|
||||
end
|
||||
render :json => @data.to_json
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ Rails.application.routes.draw do
|
||||
namespace :gprs do
|
||||
namespace :back_end do
|
||||
|
||||
resources :locations
|
||||
match "locations/get_locations" => "locations#get_locations"
|
||||
|
||||
resources :locations
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user