POST /calendars POST /calendars.json
# File app/controllers/calendars_controller.rb, line 50 def create @calendar = Calendar.new(params[:calendar]) respond_to do |format| if @calendar.save format.html { redirect_to @calendar, notice: 'Calendar was successfully created.' } format.json { render json: @calendar, status: :created, location: @calendar } else format.html { render action: "new" } format.json { render json: @calendar.errors, status: :unprocessable_entity } end end end
DELETE /calendars/1 DELETE /calendars/1.json
# File app/controllers/calendars_controller.rb, line 82 def destroy @calendar = Calendar.find(params[:id]) @calendar.destroy respond_to do |format| format.html { redirect_to calendars_url } format.json { head :no_content } end end
GET /calendars/1/edit
# File app/controllers/calendars_controller.rb, line 39 def edit @calendar = Calendar.find(params[:id]) respond_to do |format| format.html # new.html.erb format.js end end
# File app/controllers/calendars_controller.rb, line 5 def index @calendars = Calendar.accessible_by(current_ability,:show) @calentries =@calendars.map{|c| c.calentries }.flatten respond_to do |format| format.html # index.html.erb format.json { render json: @calendars } format.ics end end
GET /calendars/new GET /calendars/new.json
# File app/controllers/calendars_controller.rb, line 30 def new @calendar = Calendar.new respond_to do |format| format.html # new.html.erb format.json { render json: @calendar } end end
GET /calendars/1 GET /calendars/1.json
# File app/controllers/calendars_controller.rb, line 18 def show @calendar = Calendar.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @calendar } format.ics { render 'show.ics.erb'} end end
PUT /calendars/1 PUT /calendars/1.json
# File app/controllers/calendars_controller.rb, line 66 def update @calendar = Calendar.find(params[:id]) respond_to do |format| if @calendar.update_attributes(params[:calendar]) format.html { redirect_to @calendar, notice: 'Calendar was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @calendar.errors, status: :unprocessable_entity } end end end
Generated with the Darkfish Rdoc Generator 2.