This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func resignFirstResponder() -> Bool { | |
let resigned = super.resignFirstResponder() | |
self.layoutIfNeeded() | |
return resigned | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_create :set_location | |
def set_location | |
factory = RGeo::Geographic.spherical_factory(srid: 4326) | |
self.lonlat = factory.point(lon, lat) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: postgis | |
schema_search_path: '"$user", public, postgis' | |
production: | |
url: <%= ENV.fetch('DATABASE_URL', '').sub(/^postgres/, "postgis") %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RGeo::ActiveRecord::SpatialFactoryStore.instance.tap do |config| | |
# By default, use the GEOS implementation for spatial columns. | |
config.default = RGeo::Geos.factory_generator | |
# But use a geographic implementation for point columns. | |
config.register(RGeo::Geographic.spherical_factory(srid: 4326), geo_type: "point") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.spinner { | |
margin: 100px auto; | |
width: 50px; | |
height: 30px; | |
text-align: center; | |
font-size: 10px; | |
opacity: .5; | |
} | |
.spinner > div { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: bundle exec unicorn -p $PORT | |
worker: bundle exec sidekiq -q default | |
cron: bundle exec clockwork clock.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Controller: | |
class BlueprintsController < ApplicationController | |
protect_from_forgery with: :exception | |
def index | |
@blueprints = Blueprint | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$controller = Request::current()->controller(); | |
$action = Request::current()->action(); | |
$directory = Request::current()->directory(); | |
$controller_name = ($directory)? $directory.'_'.$controller : $controller; | |
if ( ! $this->a2->allowed($controller_name, $action)) | |
{ | |
HTTP::redirect(Route::url('account', array('action' => 'login'))); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- unexpected html. missing form element once it is rendered to page --> | |
<div class="modal-body"> | |
<p>This is a safety feature so you don't do something you didn't mean to do.</p> | |
<div class="control-group"> | |
<div class="controls"> | |
<input type="password" name="password" placeholder="Your Account Password"> | |
</div> | |
</div> |
NewerOlder