app/controllers/application_controller.rb
# TODO: ideally, this would use the class associated with the controller
# calling it. As it happens, we don't really have to worry about that now that
# we did away with the two databases... but it's worth being aware that
# anything in the yielded block could fail if it calls logging (untested).
ideally, this would use the class associated with the controller
calling it. As it happens, we don't really have to worry about that now that
we did away with the two databases... but it's worth being aware that
anything in the yielded block could fail if it calls logging (untested).
ideally this would use the class associated with the controller calling it . As it happens we don ' t really have to worry about that now that we did away with the two databases ... but it ' s worth being aware that anything in the yielded block could fail if it calls logging ( untested ) .
def with_master_if_curator(&block)
    if current_user.try(:is_curator?)
      TaxonConcept.with_master do
        yield
      end
    else
      yield
    end
  end
def with_master_if_curator ( & block ) if current_user . try ( :is_curator? ) TaxonConcept . with_master do yield end else yield end end
TODO: ideally, this would use the class associated with the controller
calling it.
TODO : ideally this would use the class associated with the controller calling it .
block
<not_specific>