app/controllers/subscribes_controller.rb in enju_library-0.1.0.pre33 vs app/controllers/subscribes_controller.rb in enju_library-0.1.0.pre34

- old
+ new

@@ -7,20 +7,20 @@ def index @subscribes = Subscribe.page(params[:page]) respond_to do |format| format.html # index.html.erb - format.json { render :json => @subscribes } + format.json { render json: @subscribes } end end # GET /subscribes/1 # GET /subscribes/1.json def show respond_to do |format| format.html # show.html.erb - format.json { render :json => @subscribe } + format.json { render json: @subscribe } end end # GET /subscribes/new # GET /subscribes/new.json @@ -29,11 +29,11 @@ @subscribe.subscription = @subscription if @subscription @subscribe.work = @work if @work respond_to do |format| format.html # new.html.erb - format.json { render :json => @subscribe } + format.json { render json: @subscribe } end end # GET /subscribes/1/edit def edit @@ -44,28 +44,28 @@ def create @subscribe = Subscribe.new(params[:subscribe]) respond_to do |format| if @subscribe.save - format.html { redirect_to @subscribe, :notice => t('controller.successfully_created', :model => t('activerecord.models.subscribe')) } - format.json { render :json => @subscribe, :status => :created, :location => @subscribe } + format.html { redirect_to @subscribe, notice: t('controller.successfully_created', model: t('activerecord.models.subscribe')) } + format.json { render json: @subscribe, status: :created, location: @subscribe } else - format.html { render :action => "new" } - format.json { render :json => @subscribe.errors, :status => :unprocessable_entity } + format.html { render action: "new" } + format.json { render json: @subscribe.errors, status: :unprocessable_entity } end end end # PUT /subscribes/1 # PUT /subscribes/1.json def update respond_to do |format| if @subscribe.update_attributes(params[:subscribe]) - format.html { redirect_to @subscribe, :notice => t('controller.successfully_updated', :model => t('activerecord.models.subscribe')) } + format.html { redirect_to @subscribe, notice: t('controller.successfully_updated', model: t('activerecord.models.subscribe')) } format.json { head :no_content } else - format.html { render :action => "edit" } - format.json { render :json => @subscribe.errors, :status => :unprocessable_entity } + format.html { render action: "edit" } + format.json { render json: @subscribe.errors, status: :unprocessable_entity } end end end # DELETE /subscribes/1