Sha256: e9af51fde5e15b07dea2b3fac7c1da99c1e16e6e5280f6f30f295b3a4b48032b

Contents?: true

Size: 734 Bytes

Versions: 11

Compression:

Stored size: 734 Bytes

Contents

require_dependency "social_networking/application_controller"

module SocialNetworking
  # Manage profile icons.
  class ProfileIconController < ApplicationController
    skip_before_action :verify_authenticity_token

    def save
      profile = Profile.find(profile_icon_params[:profile_id])
      profile.icon_name = profile_icon_params[:icon_name]
      profile.save

      respond_to do |format|
        format.html { render nothing: true, status: :accepted }
        format.js   { render nothing: true, status: :accepted }
        format.json { render nothing: true, status: :accepted }
      end
    end

    private

    def profile_icon_params
      params.require(:profile).permit(:profile_id, :icon_name)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
social_networking-0.11.8 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.7 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.6 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.5 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.4 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.3 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.2 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.1 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.11.0 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.10.0 app/controllers/social_networking/profile_icon_controller.rb
social_networking-0.9.3 app/controllers/social_networking/profile_icon_controller.rb