I decided to move to another section of Invoice before I tackle the finder used in Invoice#open. I’m thinking about using a simple state machine for the different invoice states and that will require some redesign. I found it’s best to think about redesigns for time before starting on them. The Refactoring Today I refactored …
Tag: inline-temp
Daily Refactor #70: Inline Temp in SourceVersion#migrate
The Refactoring Today’s refactoring is just like yesterday’s but I wanted to show a quick tip with #create! I didn’t mention. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class SourceVersion < ActiveRecord::Base include SecondDatabase set_table_name :versions def self.migrate all.each do |source_version| v = Version.new v.attributes …
Daily Refactor #69: Inline Temp in SourceNews#migrate
I wanted to start refactoring my Redmine merge plugin now. I’m getting it ready for a release so doing a few refactorings now will help me make sure it’s working properly. The Refactoring Using inline temp I was able to clean up how the SourceNews#migrate converts data from one database to the other database. Before …