A double-entry accounting system for Rails (inspired by http://www.cuppadev.co.uk/oldbrew/double-entry-accounting-in-rails/)
A basic accounting software, written in Ruby, using the Rails framework. UI in French.
| # | |
| # = Capistrano database.yml task | |
| # | |
| # Provides a couple of tasks for creating the database.yml | |
| # configuration file dynamically when deploy:setup is run. | |
| # | |
| # Category:: Capistrano | |
| # Package:: Database | |
| # Author:: Simone Carletti <[email protected]> | |
| # Copyright:: 2007-2010 The Authors |
| In response to all the responses to: | |
| http://twitter.com/rtomayko/status/1155906157 | |
| You should never do this in a source file included with your library, | |
| app, or tests: | |
| require 'rubygems' | |
| The system I use to manage my $LOAD_PATH is not your library/app/tests |
| # Copy and paste this to the rails console to test your email settings | |
| class MyMailer < ActionMailer::Base | |
| def test_email | |
| @recipients = "[email protected]" | |
| @from = "[email protected]" | |
| @subject = "test from the Rails Console" | |
| @body = "This is a test email" | |
| end | |
| end |
| # Guide | |
| # Configure the essential configurations below and do the following: | |
| # | |
| # Repository Creation: | |
| # cap deploy:repository:create | |
| # git add . | |
| # git commit -am "initial commit" | |
| # git push origin master | |
| # | |
| # Initial Deployment: |
A double-entry accounting system for Rails (inspired by http://www.cuppadev.co.uk/oldbrew/double-entry-accounting-in-rails/)
A basic accounting software, written in Ruby, using the Rails framework. UI in French.
| #--- | |
| #YAML is a format for representing objects as strings. | |
| #YAML is nice because it’s human-readable | |
| #--- | |
| #YAML::dump: convert your Person object array into YAML data | |
| >> require 'yaml' | |
| => true | |
| >> class Person |
| # an example of using the diff-lcs gem | |
| # a mirror of the gem is hosted at http://github.com/defunkt/diff-lcs | |
| # or `gem install diff-lcs` | |
| require 'diff/lcs' | |
| first, second = "hello, world!", "Hello, world!" | |
| diff = Diff::LCS.diff(first, second) | |
| patched = Diff::LCS.patch!(first, diff) |
| # | |
| # Ruby scrapi 采集口碑房源数据 | |
| # Author: Huacnlee <[email protected]> | |
| # Blog: http://huacnlee.com | |
| # | |
| # Gems install: | |
| # sudo gem install scrapi | |
| # | |
| require 'rubygems' | |
| require 'scrapi' |
| # db/migrate/20101004063749_create_photos.rb | |
| class CreatePhotos < ActiveRecord::Migration | |
| def self.up | |
| create_table :photos do |t| | |
| t.string :name, :null => false | |
| t.binary :data, :null => false | |
| t.string :filename | |
| t.string :mime_type | |
| t.timestamps |