I am writing my first app based on the ‘depot’ application but with some
suttle differences to help me learn.
I am a bit sutck with following and would be grateful for any help:
I have the following controller:
class MainController < ApplicationController
@objects = Object.certified_items
This relates to a field called ‘certified’ within a table called
objects. The certified field contains an ‘int’ of either 0 or 1 - these
will become Y/N checkboxes.
Within my model I have the following:
:conditions => “certified < 1”,
What I am trying to do is use certified as a boolean for yes or no. So
if something is not certified ‘0’ don’t display it - if it is cerified
‘Y’ then do display it.