Sha256: 769e458bd3027db9bbdf2323fd045302a5e940105c62cda5f0995999ba024cce

Contents?: true

Size: 359 Bytes

Versions: 6

Compression:

Stored size: 359 Bytes

Contents

module SocialExtension
  class LikesController < Chili::ApplicationController

    def index
      @likes = current_user.likes
    end

    def create
      @like = current_user.likes.create!(params[:like])
      redirect_to :back, notice: 'Post liked!'
    end

    private

    def current_user
      super.becomes(SocialExtension::User)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chili-1.0.1 spec/dummy/example_app/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb
chili-1.0.0 spec/dummy/example_app/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb
chili-0.3.5 spec/dummy/example_app/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb
chili-0.3.4 spec/dummy/example_app/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb
chili-0.3.3 spec/dummy/example/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb
chili-0.3.2 spec/dummy/example/vendor/chili/social_extension/app/controllers/social_extension/likes_controller.rb