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
| # language: es | |
| @internet | |
| Característica: Proceso de archivos del banco | |
| Para agilizar el proceso de captura de pagos | |
| Como usuario de cobranza | |
| Quiero procesar los archivos del banco | |
| Antecedentes: | |
| Dado que soy un administrador autenticado |
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 dbi --version 0.4.0 | |
| gem install dbd-odbc --version 0.2.4 | |
| gem install rails-sqlserver-2000-2005-adapter -s http://gems.github.com |
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
| # Configuration for rails-sqlserver-2000-2005-adapter | |
| # using ODBC | |
| development: | |
| adapter: sqlserver | |
| mode: ODBC | |
| dsn: your_database_dsn | |
| username: your_sqlserver_user | |
| password: your_sqlserver_password | |
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
| hectorsq$ irb | |
| >> require 'uuid' | |
| => true | |
| >> UUID.generate | |
| => "ea4ab920-cfe7-012b-5530-0017f2f422ea" | |
| >> UUID.generate :default | |
| => "ee19c970-cfe7-012b-5530-0017f2f422ea" | |
| >> UUID.generate :urn | |
| => "urn:uuid:f3959e70-cfe7-012b-5530-0017f2f422ea" | |
| >> UUID.generate :compact |
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
| require 'rubygems' | |
| require 'uuid' | |
| module UUIDHelper | |
| def before_create() | |
| self.uuid = UUID.generate(:compact).upcase | |
| end | |
| 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 CreateDocuments < ActiveRecord::Migration | |
| def self.up | |
| create_table :documents do |t| | |
| t.string :name | |
| t.string :doc_file_name | |
| t.string :doc_content_type | |
| t.integer :doc_file_size | |
| t.datetime :doc_updated_at | |
| t.timestamps |
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 Document < ActiveRecord::Base | |
| has_attached_file :doc, :styles => { :medium => "300x300>", :thumb => "100x100>" } | |
| 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
| >> puts 5 / 3 # 1.6 rounded to −∞ = 1 | |
| 1 | |
| => nil | |
| >> puts -5 / 3 # -1.6 rounded to −∞ = -2 | |
| -2 | |
| => nil |