title: ruby access to value in sequel response
body: <p>I have a problem accessing value from Sequel response. It is only my lack of knowledge, I am new to Sequel.</p>
  
  <p>I am writing website where I ask for articles, then I send query for categories (associated with ID in model), so I have 2 variables to iterate.</p>
  
  <p>I do this</p>
  
  <pre><code>    @articles.each_with_index do |article, i|
        article.id
        article.author
        ...
  </code></pre>
  
  <p>And I have also value for categories, when I iterate it with pry, I receive good data</p>
  
  <pre><code>@cat.each do |category|
    category.each do |c|
      puts c
    end
  end
  </code></pre>
  
  <p>gives me perfect output with name of the col "category_cz" and value.</p>
  
  <p>So I tried to do upper block and fill in the name of the category in my language.</p>
  
  <pre><code>@articles.each_with_index do |article, i|
        article.id
        article.author
        @cat[i].???.category_cz
  end
  </code></pre>
  
  <p>I don't know how to access values where are ???, I tried combinations based on my associations.</p>
  
  <p>Way I am sending queries.</p>
  
  <pre><code>@articles = Article.association_join(:articles_data_cz).select
  binding.pry
  @cat = Article.association_join(:category).select(:category_cz)
  </code></pre>
  
  <p>And I have associations between table Article and Category models.</p>
  
  <p>in category:</p>
  
  <pre><code>one_to_one :articles
  </code></pre>
  
  <p>in article:</p>
  
  <pre><code>  many_to_one :articles_data_cz, key: :article_cz
    many_to_one :articles_data_en, key: :article_en
    many_to_one :category, key: :category
  </code></pre>
  
  <p>I know this is my stupidity and lack of knowledge, I tried a lots of combinations and I cannot guess from docs.</p>
  
  <p>Please, any suggestion?</p>
  
  <p>Thanks</p>
  
  <p>M.</p>