Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove code complexity

  • Loading branch information...
commit 8d47941b8f31218f55feffae71f5674499ca44c9 1 parent a79b4c8
@mkristian authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/ixtlan/babel/model_filter.rb
View
6 lib/ixtlan/babel/model_filter.rb
@@ -24,12 +24,16 @@ def filter_array( models, options, &block )
end
end
- def filter_data(model, data, context, &block)
+ def setup_data(model, data, context)
context.methods.each do |m|
unless data.include?(m)
data[ m ] = model.send( m.to_sym )
end
end
+ end
+
+ def filter_data(model, data, context, &block)
+ setup_data(model, data, context)
result = {}
data.each do |k,v|
Please sign in to comment.
Something went wrong with that request. Please try again.