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 BranchesDatatable | |
delegate :image_tag,:edit_branch_path,:params, :h, :link_to, :number_to_currency, to: :@view | |
def initialize(view) | |
@view = view | |
end | |
def as_json(options = {}) | |
{ | |
sEcho: params[:sEcho].to_i, |
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 CitiesDatatable | |
delegate :image_tag,:edit_city_path,:params, :h, :link_to, :number_to_currency, to: :@view | |
def initialize(view) | |
@view = view | |
end | |
def as_json(options = {}) | |
{ | |
sEcho: params[:sEcho].to_i, |
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 EnrollmentsDatatable | |
delegate :edit_enrollment_path,:image_url,:image?,:image_tag,:params, :h, :link_to, :number_to_currency, to: :@view | |
def initialize(view) | |
@view = view | |
end | |
def as_json(options = {}) | |
{ | |
sEcho: params[:sEcho].to_i, |
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
#================================== | |
# Author : Senthil | |
# Author Nick : beck03076 | |
# Description : Given N integers, Count the total pairs of Integers that have a difference of k | |
#================================== | |
# Getting input from console | |
puts "Enter comma separated numbers" | |
a = gets.chomp.split(",").map(&:to_i) | |
puts "Enter the value of K(difference)" | |
k = gets.chomp.to_i |
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 fset(f,name,elem,mad = nil,label = false) | |
html = String.new | |
cl = "frbox " | |
cl += mad.to_s | |
html = ("<div class='#{cl}'>" + f.label(name.to_sym,label) + f.send(elem,name.to_sym) + "</div>").html_safe | |
end | |
in your view | |
<div class="col6"> |
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
<%= javascript_include_tag 'common' %> | |
<%= nested_form_for(@enquiry) do |f| %> | |
<div class="frbox"> | |
<%= f.label :date_of_birth %> | |
<%= f.text_field :date_of_birth,{class: "dateField"} %> | |
</div> | |
<% end %> |
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
root@IECTest:/var/www/organizor# bundle exec rake assets:precompile --trace | |
** Invoke assets:precompile (first_time) | |
** Execute assets:precompile | |
/usr/local/rvm/rubies/ruby-2.0.0-p195/bin/ruby /usr/local/rvm/gems/ruby-2.0.0-p195@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace | |
** Invoke assets:precompile:all (first_time) | |
** Execute assets:precompile:all | |
** Invoke assets:precompile:primary (first_time) | |
** Invoke assets:environment (first_time) | |
** Execute assets:environment | |
** Invoke environment (first_time) |
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 NotificationObserver < ActiveRecord::Observer | |
observe :enquiry,:registration,:todo,:follow_up | |
def after_save(record) | |
if record.assigned_to != record.assigned_by | |
PrivatePub.publish_to("/notify/" + record.assigned_to.to_s, | |
message: "#{record.class.name} has been assigned to you", |
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 EnquiriesDatatable < DeviseController | |
delegate :params, :h, :link_to, | |
:number_to_currency,:image_tag, | |
:can?,:edit_enquiry_path,:check_box_tag, | |
:current_user,to: :@view | |
def initialize(view,cols,sFil) | |
@view = view | |
@cols = cols | |
@sFilter = sFil |
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
# Files are used to write success and error logs | |
require "fileutils" | |
# Mechanize is used to scrap data from urls and patterns | |
require 'mechanize' | |
# to connect to a remote database | |
require 'rubygems' | |
require 'active_record' | |
require 'mysql2' | |
require 'net/ssh/gateway' | |
# to check if a port is open |
OlderNewer