ruby on rails - argument error/wrong number of arguments - I have no idea what's going on here, -
i'm trying use paperclip , update listing whenever on form receive error. argumenterror in listingscontroller#update wrong number of arguments (2 1) code follows , line highlighted being @ fault begins if @listing.update(listing_params) @listing = listing.new respond_to |format| if @listing.update(listing_params) format.html { redirect_to @listing, notice: 'listing updated.' } format.json { head :no_content } else this application trace app/controllers/listings_controller.rb:45:in `block in update' app/controllers/listings_controller.rb:44:in `update' is there i'm missing, syntax-wise, or else? many thanks. edit: the code listings model (listings.rb) follows class listing < activerecord::base has_attached_file :image, :styles => { :medium => "200x", :thumb => "100x100>" }, :default_url => "default.jpg" end my form (_form.html.erb) follows: <%= f...