
Untitled
By: a guest on
Jun 4th, 2012 | syntax:
None | size: 0.55 KB | hits: 12 | expires: Never
searchable do
text :name
boolean :online_search
boolean :offline_search
end
def online_search
store.online_store == true
end
def offline_search
store.online_store == false
end
def search_type=(boolean)
case (boolean)
when 'online'
@online_search = true
@offline_search = false
when 'offline'
@online_search = false
@offline_search = true
when 'all'
@online_search = true
@offline_search = true
else
@online_search = true
@offline_search = true
end
end