kot-begemot/association_as_name — pull request #4 by koszta (2012-11-11 20:44:27+00:00)
Title: Fix jruby warnings

When running an app which includes this gem with jruby it produces the following warning:

```
lib/a_a_n/keeper.rb:35 warning: Found '=' in conditional, should be '=='.
```

It turned out that there is an elseif instead of an else in keeper.rb and that causes this warning, because it assumes that the next line is a conditional, therefore it gaves a warning to use ==.

```ruby
def association(name, &block)
sub_structure = block.call
sub_structure.each do |element|
if element.is_a? Hash
element.symbolize_keys!
element = element.to_a.flatten
elseif
element = [element.to_sym, "#{name}_#{element}".to_sym]
end
(AAN::Keeper[current_model][name] ||= []) << element
end
end
```