Skip to content

Instantly share code, notes, and snippets.

View jmercedes's full-sized avatar

Juan jmercedes

View GitHub Profile
Started POST "/refinery/posts" for ::1 at 2016-06-01 23:32:29 -0400
Processing by Refinery::Posts::Admin::PostsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"BI4868SbS9UKePiDLAFe1VlquHvrB4z8TGjbDG2sEHjrCWgCQdoK6qpOxhc4gP0WvZyzCAUQm/ITwhHhwnhdog==", "switch_locale"=>"", "post"=>{"post_image_id"=>"", "title"=>"Segunda noticia", "post_date(3i)"=>"2", "post_date(2i)"=>"6", "post_date(1i)"=>"2016", "author"=>"", "description"=>""}, "locale"=>:pt}
(0.5ms) SELECT MAX("refinery_posts"."position") FROM "refinery_posts"
Refinery::Authentication::Devise::User Load (0.7ms) SELECT "refinery_authentication_devise_users".* FROM "refinery_authentication_devise_users" WHERE "refinery_authentication_devise_users"."id" = $1 ORDER BY "refinery_authentication_devise_users"."id" ASC LIMIT 1 [["id", 1]]
Refinery::Authentication::Devise::Role Load (1.9ms) SELECT "refinery_authentication_devise_roles".* FROM "refinery_authentication_devise_roles" INNER JOIN "refinery_authentication_devise_ro
module Refinery
module Games
class Game < Refinery::Core::BaseModel
self.table_name = 'refinery_games'
validates :location, :presence => true, :uniqueness => true
# To enable admin searching, add acts_as_indexed on searchable fields, for example:
#
app/controllers/results_controller.rb:10:in `index'
actionpack (4.2.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.4) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.4) lib/active_support/callbacks.rb:505:in `call'
class Loan < ActiveRecord::Base
Pending = 'Pendiente'
Approved = 'Aprobado'
Declined = 'Declinado'
DefaultFinancingRate = 42
Statuses = [Pending, Approved, Declined]
activemodel (4.2.1) lib/active_model/attribute_methods.rb:433:in `method_missing'
vendor/extensions/clinics/app/views/refinery/clinics/admin/clinics/_form.html.erb:18:in `block in _vendor_extensions_clinics_app_views_refinery_clinics_admin_clinics__form_html_erb__873914298743966921_70325109399920'
actionview (4.2.1) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
actionview (4.2.1) lib/action_view/helpers/capture_helper.rb:200:in `with_output_buffer'
haml (4.0.6) lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
actionview (4.2.1) lib/action_view/helpers/capture_helper.rb:38:in `capture'
haml (4.0.6) lib/haml/helpers/action_view_mods.rb:52:in `capture_with_haml'
actionview (4.2.1) lib/action_view/helpers/form_helper.rb:444:in `form_for'
haml (4.0.6) lib/haml/helpers/action_view_mods.rb:139:in `form_for_with_haml'
haml (4.0.6) lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss'
module Refinery
module Testimonies
module Admin
class SettingsController < Refinery::AdminController
before_action :check_setting, :only => [:edit, :update]
after_action :save_subject_for_confirmation, :save_message_for_confirmation, :only => :update
def edit
@setting = Refinery::Setting.find(params[:id])
loan_amount = 250000
rate = 0.42 / 12
periods = 60
#Monthly payment amount
payment_amount = loan_amount * ( (rate * ( 1 + rate)**periods) / ( ( 1 + rate )**periods - 1) )
#Total payment (capital + interest)
amortization_table = []
period_values = []
Dir.chdir('tmp') do
Net::FTP.open('***') do |ftp|
ftp.passive = true
ftp.login('***', '***')
files = ftp.nlst("*.xml")
puts files
end #ftp
end #Dir
app/models/deposit.rb:8:in `block in update_account_amount'
activerecord (4.2.1) lib/active_record/locking/pessimistic.rb:72:in `block in with_lock'
activerecord (4.2.1) lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
activerecord (4.2.1) lib/active_record/transactions.rb:220:in `transaction'
activerecord (4.2.1) lib/active_record/transactions.rb:277:in `transaction'
activerecord (4.2.1) lib/active_record/locking/pessimistic.rb:70:in `with_lock'
app/models/deposit.rb:7:in `update_account_amount'
activesupport (4.2.1) lib/active_support/callbacks.rb:432:in `block in make_lambda'
activesupport (4.2.1) lib/active_support/callbacks.rb:228:in `block in halting_and_conditional'
activesupport (4.2.1) lib/active_support/callbacks.rb:506:in `block in call'
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'
ruby '1.9.3'
# Use sqlite3 as the database for Active Record
gem 'pg'
gem 'unicorn'