ruby on rails 4 - ActiveRecord query, adding inner join, but getting syntax error -
i'm having trouble adding association existing code.
this works:
propertyspa.joins(:spa_results, :country)
and works:
propertyspa.joins(:spa_results => [:comp_status])
but combining want doesn't work:
propertyspa.joins(:spa_results => [:comp_status], :country)
gives me error:
syntaxerror: (irb):18: syntax error, unexpected ')', expecting => /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/console.rb:110:in
start' /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/console.rb:9:instart' /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:68:in `console ...
thanks assistance.
try way.
propertyspa.joins(:country, :spa_results => [:comp_status]) most methods written expect implicit hashes last arguments of method.
Comments
Post a Comment