Sha256: 6877b58399c3df7cbaebba6e8c062c076409638011e1a4ff4e402789d555f77b

Contents?: true

Size: 323 Bytes

Versions: 8

Compression:

Stored size: 323 Bytes

Contents

module ChiliSocial
  class LikesController < Chili::ApplicationController

    def index
      @likes = current_user.becomes(ChiliSocial::User).likes
    end

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

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
chili-0.3.0 spec/dummy/example/vendor/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.2.2 spec/dummy/example/vendor/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.2.1 spec/dummy/example/vendor/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.2.0 spec/dummy/example/vendor/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.1.0 spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.0.9 spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.0.8 spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb
chili-0.0.7 spec/dummy/chili_social/app/controllers/chili_social/likes_controller.rb