Skip to content

Commit

Permalink
remove table tramp_rule from migration
Browse files Browse the repository at this point in the history
  • Loading branch information
renoke committed Mar 6, 2009
1 parent b5baa03 commit 24fccf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
16 changes: 1 addition & 15 deletions generators/tramp/templates/create_tramp.rb
Expand Up @@ -48,20 +48,7 @@ def self.up
t.datetime "updated_at"
end

create_table "tramp_rules" do |t|
t.string "code"
t.string "label"
t.date "date_begin"
t.date "date_end"
t.string "amount"
t.string "parameter"
t.string "entry"
t.integer "event_type_id"
t.string "type"
t.datetime "created_at"
t.datetime "updated_at"
end


create_table "tramp_currencies" do |t|
t.string 'name'
t.string 'alphabetic_code'
Expand All @@ -86,7 +73,6 @@ def self.down
drop_table :tramp_entries
drop_table :tramp_events
drop_table :tramp_movements
drop_table :tramp_rules
drop_table :tramp_currencies
end
end
2 changes: 1 addition & 1 deletion lib/tramp/models/rule.rb
@@ -1,6 +1,6 @@
module Tramp
module Model
class Rule #< ActiveRecord::Base
class Rule

include Tramp::Rule::InstanceMethods
extend Tramp::Rule::ClassMethods
Expand Down
4 changes: 4 additions & 0 deletions lib/tramp/module/rule/rule_utilities.rb
Expand Up @@ -2,6 +2,10 @@ module Tramp
module Rule

module Utilities

def rule(name, &block)
Tramp::Model::Rule.new(name, block)
end

def to_hash(string)
instance_eval("{"+string+"}")
Expand Down

0 comments on commit 24fccf4

Please sign in to comment.