Guest User

Untitled

a guest
Apr 25th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. elsif @field_name.match(/_id/)
  2. if @table_name == 'file_metas' and @field_name == 'parent_id'
  3. value = value.to_i + KEY_OFFSETS[@table_name].to_i unless value.nil?
  4. else
  5. # parse out the table
  6. table_name = @field_name.gsub(/_id/,'s')
  7. value = value.to_i + KEY_OFFSETS[table_name].to_i
  8. end
  9. end
Add Comment
Please, Sign In to add comment