Class: Dhatu::BookingsController

Inherits:
ResourceController show all
Defined in:
app/controllers/dhatu/bookings_controller.rb

Instance Method Summary collapse

Methods inherited from ResourceController

#configure_filter_param_mapping, #get_category_filters

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
# File 'app/controllers/dhatu/bookings_controller.rb', line 4

def show
  @booking = @r_object = Dhatu::Booking.find_by_id(params[:id])
  if @booking
    @booking.read! if @booking.new? || @booking.unread?
  else
    set_notification(false, I18n.t('status.error'), I18n.t('status.not_found', item: default_item_name.titleize))
  end
end