Hello, I took the ruby on rails example, and tried to add to it a view which is displaying the keywords from an AdGroup, I am able to get the keywords, and the total no of keywords from a campaign but I don''t know why I can not display them in the view. keyword model: class Keyword attr_reader :id attr_reader :criteriaType attr_reader :keywordText def initialize(api_campaign) @id = api_campaign[:id] @criteriaType = api_campaign[:criteriaType] @keywordText = api_campaign[:keywordText] end def self.get_keywords_list(response) result = {} if response[:entries] response[:entries].each do |api_keyword| keyword = Keyword.new(api_keyword) result[keyword.id] = keyword end end return result end end keyword_controller class KeywordController < ApplicationController PAGE_SIZE = 50 def index() @selected_account = selected_account if @selected_account response = request_keywords_list(''AdGroupID'') if response @keywords = Keyword.get_keywords_list(response) @keyword_count = response[:total_num_entries] end end end private def request_keywords_list(ad_group_id) logger.debug ad_group_id api = get_adwords_api() service = api.service(:AdGroupCriterionService, get_api_version()) selector = { :fields => [''Id'', ''CriteriaType'', ''KeywordText''], :ordering => [{:field => ''Id'', :sort_order => ''ASCENDING''}], :predicates => [{:field => ''AdGroupId'', :operator => ''EQUALS'', :values => [ad_group_id]}, {:field => ''CriteriaType'', :operator => ''EQUALS'', :values => [''KEYWORD'']}], :paging => {:start_index => 0, :number_results => PAGE_SIZE} } result = nil begin result = service.get(selector) logger.debug service.get(selector) rescue AdwordsApi::Errors::ApiException => e logger.fatal("Exception occurred: %s\n%s" % [e.to_s, e.message]) flash.now[:alert] ''API request failed with an error, see logs for details'' end return result end end keyword/index.html.erb <h1>Keywords list</h1> <% if @selected_account.nil? %> <div class="notice">No account selected!</div> <% else %> <% if @keywords.nil? or @keywords.empty? %> <ul><li>No keywords available.</ul> <% else %> <ul><li>Total number of keywords: <%= @keyword_count %></ul> <table> <tr> <th>ID <th>KeywordText <th>CriteriaType <% @keywords.each do |id, keyword| %> <tr> <td><%= keyword.id %> <td><%= keyword.keywordText %> <td><%= keyword.criteriaType %> <% end %> </table> <% end %> If someone can help me with some pointers, I''ll be grateful. So I discovered what I did wrong, def self.get_keywords_list(response) result = {} if response[:entries] response[:entries].each do |api_keyword| keyword = Keyword.new(api_keyword) result[keyword.id] = keyword end end return result end In my response loop I need to have something like [keyword[:criterion][:id], keyword[:criterion][:type], keyword[:criterion][:text]] but I am such a noob, that I don''t know how to implement that in my code. Thank you -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c9fcfb49-342b-42c8-9c7d-f7313b81687d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.