1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
BikeShed-1/app/controllers/acts_as_loggable/bike_actions_controller.rb
2012-12-09 13:29:20 -05:00

32 lines
567 B
Ruby

class ActsAsLoggable::BikeActionsController < AuthenticatedController
expose(:bike_action) do
if params[:id]
BikeAction.find(params[:id])
elsif params[:bike_action]
BikeAction.new(params[:bike_action])
else
puts "WhOOOPS"
#BikeAction.new(:max_members => 16)
end
end
expose(:bike_actions) { BikeAction.order('id').paginate(:page => params[:page]) }
def index
end
def show
end
def new
end
def create
if bike_action.save
redirect_to bike_actions_url
else
render :new
end
end
end