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
================= Request - 1 ===================== | |
6 products cannot change categories | |
------------------------------------ | |
I, [2015-08-14T17:09:35.568194 #17185] INFO -- : {"productIds":[131302,131384,131385,131388,131390,131392],"categoryId":642} | |
I, [2015-08-14T17:09:35.568228 #17185] INFO -- : ------------ Request ----------------------------------------- | |
I, [2015-08-14T17:09:35.758727 #17185] INFO -- : ------------ Response ----------------------------------------- | |
I, [2015-08-14T17:09:35.758792 #17185] INFO -- : {"response"=>{"code"=>200, "message"=>"SuccessBULK_UPDATE_PRODUCT_ERROR: could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement\nBULK_UPDATE_PRODUCT_ERROR: could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement\nBULK_UPDATE_PRODUCT_ERROR: could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statemen |
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
irb(main):039:0> ["/g/p/gp065sp.jpg", | |
irb(main):040:1* "/g/p/gp65aq.jpg", | |
irb(main):041:1* "/g/p/gp065pr.jpg", | |
irb(main):042:1* "/G/E/GE001AM_3.jpg", | |
irb(main):043:1* "/G/E/GE001AQ_3.jpg", | |
irb(main):044:1* "/G/E/GE001CR_3.jpg", | |
irb(main):045:1* "/G/E/GE001EM_3.jpg", | |
irb(main):046:1* "/G/E/GE001GR_3.jpg", | |
irb(main):047:1* "/G/E/GE001OP_3.jpg", | |
irb(main):048:1* "/G/E/GE001PR_3.jpg", |
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 check_image(url) | |
uri = URI(url) | |
request = Net::HTTP.new uri.host | |
response= request.request_head uri.path | |
return response.code.to_i == 200 | |
end | |
@count = 0 | |
Image.all.each do |i| | |
str = i.original |
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 migrator(str,w,h) | |
if str.include?('dpjnlniaq') | |
@count += 1 | |
puts "===========" | |
puts str | |
response = Cloudinary::Uploader.upload(str, :use_filename => true, :unique_filename => false, width: w, height: h) | |
puts response | |
puts "===========" | |
else | |
puts "not senthils cloud" |
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
<a href="/tiles"><span class="glyphicon glyphicon-th-large"></span>Tiles</a> | |
respond_to do |format| | |
format.html { redirect_to tiles_path, notice: 'Tile was successfully updated.' } | |
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
======= Emails ========= | |
Enquiry, Registration, Partner, People has_and_belongs_to_many: emails | |
Email has_and_belongs_to_many: enquiries,registrations, partners, people | |
======= Others - Has Many ========= | |
Enquiry, Registration, Partner, People has_many: tasks, as: :taskable | |
Enquiry, Registration, Partner, People has_many: follow_ups, as: :follow_upable | |
Enquiry, Registration, Partner, People has_many: notes, as: noteable | |
======= Others - Belongs To ========== |
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
-- -- -- Data Migration For Organizor -- -- -- | |
-- What is it? | |
-- List of SQL queries to migrate data from old database to the newly designed database. | |
-- It has been classified into two levels | |
-- 1. Level 1 (which will be in top of database hierarchy) | |
-- 2. Level 2 (which will be depend on the Level 1 tables) | |
-- Prerequisites for data migration | |
-- Login into MySQL prompt |
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 RegistrationReport | |
def initialize(id) | |
@id = id | |
end | |
def application_details | |
Registration.find(@id).programmes.map {|i| | |
[i.course_level_name,i.partner_name, i.partner_type].join("-") | |
}.join(",\n") |
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 evaluate_email_template email_template | |
expected_to_be_column = [] | |
model_column_names = [] | |
subject = email_template.subject.scan(/__.*?__/).map{|i| i.gsub(/__/,"").strip.downcase.tr(" ","_") } | |
body = email_template.body.scan(/__.*?__/).map{|i| i.gsub(/__/,"").strip.downcase.tr(" ","_") } | |
signature = email_template.signature.scan(/__.*?__/).map{|i| i.gsub(/__/,"").strip.downcase.tr(" ","_") } | |
expected_to_be_column << subject if subject.present? | |
expected_to_be_column << body if body.present? | |
expected_to_be_column << signature if signature.present? | |
expected_to_be_column = expected_to_be_column.flatten.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
module Evaluation | |
class << self | |
FIELDS = %w(subject body signature) | |
def evaluate_email_template email_template | |
model_column_names = [] | |
hsh = set_hsh(email_template) | |
expected_to_be_column = get_column(hsh) | |
model_column_names = email_template.core_type.titleize.constantize.column_names |