I need to show a virtual attribute :status in my wicegrid but I always get the error that :status is not in the database .... of course its not, its virtual !
Is there a way to have a column containing a virtual attribute? and if Yes, how can I have a custom filter on that?
the model
class Shop < ActiveRecord::Base
attr_accessor :status
end
in the view
<%= grid(@grid, upper_pagination_panel: false) do |g|
g.column name: "Status", attribute: "status"
<% end %>
The documentation from Wice Grid says that it is not possible to use a virtual attribute for a column...
Sorry i cannot help anymore, maybe someone else will answer the other half of the question.