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
| .retailers | |
| .col-1 | |
| =link_to 'Amazon', 'http://amazon.com' | |
| =link_to 'Best Buy', 'http://amazon.com' | |
| .col-2 | |
| =link_to 'Dick\'s Sporting Goods', 'http://amazon.com' | |
| =link_to 'Fry\'s', 'http://amazon.com' | |
| .col-3 |
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
| match '/reports/autocomplete/:column_name' => 'reports#autocomplete', as: :reports_autocomplete |
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
| =label_tag :school_district, "School District" | |
| = hidden_field_tag :school_district, | |
| '', | |
| :class => 'select2 ajax', | |
| :data => { :source => reports_autocomplete_path('schooldistrict'), :column => 'schooldistrict' } |
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
| def autocomplete | |
| render :json => autocomplete_for_column(params[:column_name]) | |
| end | |
| def autocomplete_for_column(column_name) | |
| #zipcode and mls num doesnt work | |
| valid_names = %w(agentlist_fullname officelist_officename officesell_officename schooldistrict) | |
| if valid_names.include? column_name | |
| Property.select(column_name).where("#{column_name} LIKE ?", "%#{params[:q]}%").uniq |
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
| def autocomplete | |
| render :json => autocomplete_for_column(params[:column_name]) | |
| end | |
| def autocomplete_for_column(column_name) | |
| #zipcode and mls num doesnt work | |
| valid_names = %w(agentlist_fullname officelist_officename officesell_officename schooldistrict) | |
| if valid_names.include? column_name | |
| Property.select(column_name).where("#{column_name} LIKE ?", "%#{params[:q]}%").uniq |
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 watermarkIt(myArray, color) { | |
| for(var i=0; i<myArray.length; i++) { | |
| $(myArray[i][0]).watermark(myArray[i][1], {color: color}); | |
| } | |
| } | |
| // How to Use | |
| watermarkIt( [ | |
| ['#edit-submitted-full-name', 'Full Name'], | |
| ['#edit-submitted-email-address', 'Email Address'] ], '#000'); |
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
| class Airship | |
| # name and alert key | |
| SupportedDevices = { ios: "aps", android: "android" } | |
| def initialize(application_key: 'application-key', | |
| application_secret: 'application-secret', | |
| mester_secret: 'master-secret', | |
| logger: Rails.logger, | |
| request_timeout: 5) |
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
| "Jake Craige | |
| " Setup {{{ | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| set rtp+=~/Development/dotfiles/powerline/powerline/bindings/vim/ | |
| call vundle#rc() |
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
| class Phrase | |
| def initialize(string) | |
| @words = string.downcase.scan(/\w+/) | |
| end | |
| def word_count | |
| @words.inject({}) do |results, word| | |
| results.merge!({ word => 1 }) { |_, old, _| old + 1 } | |
| end | |
| end |