sinfin / auctify

Rails engine for auctions of items
MIT License
11 stars 4 forks source link

Implement #65

Closed dcalixto closed 1 year ago

dcalixto commented 1 year ago

Hello, i'm still confuse on implement this gem!

has any tutorial or exemple? because for exemple: after post creation how to bid the post and how to list the auctions?

def create

    @post = current_user.posts.build(post_params)

    respond_to do |format|
      if @post.save
        format.html { redirect_to post_url(@post), notice: "post was successfully created." }
        format.json { render :show, status: :created, location: @post }
      else
        format.html { render :new, status: :unprocessable_entity }
        format.json { render json: @post.errors, status: :unprocessable_entity }
      end
    end
  end
foton commented 1 year ago

Hi @dcalixto where did You find anything about post model? There is Auctify::Sale::Auction class, and you can call auction.bid!(bid) . See tests, eg. bidding_test could be helpfull.

dcalixto commented 1 year ago

Hi @dcalixto where did You find anything about post model? There is Auctify::Sale::Auction class, and you can call auction.bid!(bid) . See tests, eg. bidding_test could be helpfull.

I thought that auction integrate any model, so is it direct?

dcalixto commented 1 year ago

forget it too complicated to implement this