This file contains hidden or 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
#Inherited Resources speeds up development by making your controllers inherit all restful actions so you just | |
#have to focus on what is important. | |
#It makes your controllers more powerful and cleaner at the same time. | |
#In addition to making your controllers follow a pattern, | |
#it helps you to write better code by following fat models and skinny controllers convention. | |
#There are two screencasts available besides this README: | |
gem 'inherited_resources' | |
$ gem install has_scope | |
$ gem install responders |
This file contains hidden or 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
<%=form_for @order_item, url: list_link, remote: true, html: { id: "dropdown_item_form", class: "orderDate" } do |f| %> | |
<%= f.select :product_id, @products.map{|p| [p.name, p.id] }, { prompt: "select product" }, id: "search_id", class: "selectbox" %> |
This file contains hidden or 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
require 'rubygems' | |
require 'mechanize' | |
require 'open-uri' | |
require 'pry' | |
require 'nokogiri' | |
require 'active_record' | |
require 'httparty' | |
agent = Mechanize.new |
This file contains hidden or 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
require 'httparty' | |
require 'pry' | |
require 'json' | |
require 'nokogiri' | |
require 'csv' | |
require 'active_record' | |
require 'mechanize' | |
# model_name = "web_scraper" | |
# table_name = job_list |
This file contains hidden or 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
get 'admin/doctors' => 'admin/doctors_locator#index' | |
post 'admin/doctors/approve' => "admin/doctors_locator#approve", as: :approve_doctor | |
post 'admin/doctors/disapprove' => "admin/doctors_locator#disapprove", as: :disapprove_doctor | |
get 'admin/doctors/export' => 'admin/doctors_locator#export' | |
put "admin/doctors/update" => 'admin/doctors_locator#update' | |
get "admin/doctors/:id/edit" => 'admin/doctors_locator#edit' | |
resource |
This file contains hidden or 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
function initialize() { | |
var zoom_area_coordinates = document.getElementById("coordinates").value.split(" ") | |
var zoom_level = 4; | |
if(request_type == "true" && (flash_value == "No Doctor found" || flash_value == "Please enter an address")){ | |
zoom_level = 4; | |
} | |
else if(request_type == "true"){ | |
zoom_level = 13; |