lundi 22 février 2016

ActionView::Template::Error: undefined method `split' for nil:NilClass

i am getting for above error. i can't find the solution. pls tell me.

this is my feed_view_mobile.erb code;

if params[:controller]=='categories'
    meta :title => " #{feed_hash[:filter_keyword]+' | ' if feed_hash[:filter_keyword].present?} " + (feed_hash[:seo_title]||feed_hash[:title]) + ( ((' - Page ' + params[:page]) if params[:page].present?) ||''),
    :description => " #{feed_hash[:filter_keyword]+' | ' if feed_hash[:filter_keyword].present?} " + (feed_hash[:description] || '') + ( ((' - Page ' + params[:page]) if params[:page].present?) ||''),
    :keywords => (feed_hash[:filter_keyword].split.select{ |x| x.length>2}).concat(feed_hash[:keywords] || feed_hash[:title].split.select{ |x| x.length >2 })
    #salwar special case for testing.
    @secondary_message = "<a class='btn btn-primary btn-attn' href='"+new_user_registration_path.to_s+"'>Signup </a>" + "  and get your free personal stylist." if !current_user.present? && params[:term]!="salwars-churidars"
    @secondary_message = ""
end

Aucun commentaire:

Enregistrer un commentaire