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 Cashadvance < ActiveRecord::Base | |
belongs_to :merchant, :inverse_of => :cashadvances | |
has_many :payments | |
validates_presence_of :start_date, :factor_rate, :advance_amount, :expected_duration, :merchant | |
before_create :verify_zero_owed | |
def payback_amount | |
advance_amount * factor_rate | |
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
class ProfilesController < ApplicationController | |
before_filter :set_current_account | |
def index | |
@hours = BusinessHour.find_hours_for_id(@business.id) | |
@services = Service.find_services_for_business(@business.id) | |
@staffs = Staff.find_staff_for_business(@business.id) | |
respond_to do |format| |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.1' | |
gem 'authlogic' | |
gem 'switch_user' | |
gem 'acts_as_versioned' | |
gem 'jquery-rails', '>= 0.2.6' | |
gem 'capistrano' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' |
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
[general] | |
enable=yes | |
[csv] | |
usegmtime=no | |
loguniqueid=yes |
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
gem install rails -v 2.3.8 | |
ERROR: Loading command: install (LoadError) | |
no such file to load -- zlib | |
ERROR: While executing gem ... (NameError) | |
uninitialized constant Gem::Commands::InstallCommand | |
yonahw@yonahw-work:~$ rvm info | |
ruby-1.8.7-p302: | |
system: |
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
gem install rails -v 2.3.8 | |
/home/yonahw/.rvm/rubies/ruby-1.8.7-p302/bin/gem:13:in `require': no such file to load -- rubygems (LoadError) | |
from /home/yonahw/.rvm/rubies/ruby-1.8.7-p302/bin/gem:13 | |
rvm info | |
ruby-1.8.7-p302: | |
system: |
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 Merchant < ActiveRecord::Base | |
has_many :cashadvances | |
accepts_nested_attributes_for :cashadvances | |
end | |
class Cashadvance < ActiveRecord::Base | |
belongs_to :merchant | |
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
class ClassProjectsController < ApplicationController | |
def new | |
end | |
end |