features/index/index_scope_to.feature in activeadmin-1.0.0.pre4 vs features/index/index_scope_to.feature in activeadmin-1.0.0.pre5
- old
+ new
@@ -15,11 +15,11 @@
end
# Set up some scopes
scope :all, default: true
scope :published do |posts|
- posts.where "published_at IS NOT NULL"
+ posts.where "published_date IS NOT NULL"
end
end
"""
Scenario: Viewing the default scope counts
@@ -33,11 +33,11 @@
Scenario: Viewing the index with conditional scope :if
Given an index configuration of:
"""
ActiveAdmin.register Post do
- scope_to :if => proc{ false } do
+ scope_to if: proc{ false } do
User.find_by_first_name_and_last_name("John", "Doe")
end
end
"""
When I am on the index page for posts
@@ -45,10 +45,10 @@
Scenario: Viewing the index with conditional scope :unless
Given an index configuration of:
"""
ActiveAdmin.register Post do
- scope_to :unless => proc{ true } do
+ scope_to unless: proc{ true } do
User.find_by_first_name_and_last_name("John", "Doe")
end
end
"""
When I am on the index page for posts