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 ApplicationController < ActionController::Base | |
| include HoptoadNotifier::Catcher | |
| around_filter :ensure_page_title | |
| def ensure_page_title | |
| yield | |
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
| */1 * * * * ( [ ! -f /tmp/send_email_message.lock ] && unset SEND_EMAIL_MESSAGELOCK && touch /tmp/send_email_message.lock && export SEND_EMAIL_MESSAGELOCK=1 && cd /home/neeraj/apps/demo_production/current ; /usr/bin/rake email:run RAILS_ENV=production >> /home/neeraj/apps/demo_production/current/log/send_email_message.log ; [ "$SEND_EMAIL_MESSAGELOCK" = "1" ] && rm -f /tmp/send_email_message.lock ) > /dev/null 2>&1 |
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
| module ActiveSupport | |
| Inflector.inflections do |inflect| | |
| inflect.plural(/$/, 's') | |
| inflect.plural(/s$/i, 's') | |
| inflect.plural(/(ax|test)is$/i, '\1es') | |
| inflect.plural(/(octop|vir)us$/i, '\1i') | |
| inflect.plural(/(alias|status)$/i, '\1es') | |
| inflect.plural(/(bu)s$/i, '\1ses') | |
| inflect.plural(/(buffal|tomat)o$/i, '\1oes') | |
| inflect.plural(/([ti])um$/i, '\1a') |
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
| module Shoulda # :nodoc: | |
| module ActiveRecord # :nodoc: | |
| module Matchers | |
| def validate_format_of(attr) | |
| ValidateFormatOfMatcher.new(attr) | |
| end | |
| class ValidateFormatOfMatcher < ValidationMatcher # :nodoc: | |
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
| -myplugin | |
| --app | |
| ---controllers | |
| --config | |
| ---routes.rb | |
| -init.rb | |
| -lib | |
| -tasks | |
| -test | |
| -README |
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 Article < ActiveRecord::Base | |
| end | |
| class User < ActiveRecord::Base | |
| has_many :articles | |
| roll_searchable_for do | |
| searchable_for :first_name | |
| searchable_for :last_name | |
| searchable_for :email, | |
| :condition => "users.email LIKE :search_term AND users.id > 1" |
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 'eventmachine' | |
| module ChatClient | |
| def self.list | |
| @list ||= [] | |
| end | |
| def post_init | |
| @name = "anonymous_#{rand(99999)}" |
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
| var highlightClass = 'hl'; | |
| function createHighlights(text, regex, node,parentn) { | |
| if (regex.exec(text) != null) { | |
| parentn.insertBefore(document.createTextNode(RegExp.$1),node); | |
| highlightNode = document.createElement("span"); | |
| highlightNode.className = highlightClass; | |
| highlightNode.appendChild(document.createTextNode(RegExp.$2)); | |
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
| students | |
| ------- | |
| INT id | |
| STRING first_name | |
| STRING last_name | |
| STRING full_name | |
| STRING mother_name | |
| STRING father_name | |
| specializations ( fields in which one might major/minor ) |