Sha256: 8a8d3f2a01c690586ad5ef59eab8bf959659bb7371e4aaeeee6fd87dd80add17

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

# get Notifications
Spree::BaseHelper.class_eval do
  def get_notification
    notifications = []
    if  session['notification_hide_time'].nil?
        notifications = Spree::Notification.where("start_date <= now() AND  end_date >= now()")
     else
     		notifications = Spree::Notification.where("start_date <= now() AND  end_date >= now() AND updated_at > ?",session['notification_hide_time'])
    end
    notifications
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_custom_notifications-0.5 app/helpers/base_helper_decorator.rb