Coder Social home page Coder Social logo

web_tasks's People

Stargazers

 avatar

Watchers

 avatar

web_tasks's Issues

B1

功能实现的挺好的, 但是还是有一些问题

  • 为什么删除留言是一定成功的?id不存在呢?
<div>
  删除成功
  <form action="/" method="get">
    <input type="submit" value="返回">
  </form>
</div>
  • 查询失败没有提示, 这里应该是有提示的, 并且, 不能传入id数组查询

再说代码上的

  • 有很多莫名其妙的代码
# 这两个变量好像没用?
$search_1 = Array.new                    #储存筛选作者后的记录数组
$search_2 = Message.new                  #储存筛选ID后的记录

# add路由里的这一行代码是什么意思?
  @del_info = "删除成功 已删除#{$del_num}条留言"
  • 初始化代码写在configure(不了解的话, 看一下文档)里, 不要直接写在顶层空间.
  • 一些类的定义最好提取出来放在另一个文件中, 方便管理.
  • params['id'].to_i, 对参数直接调用to_i方法, 如果恶意传入不是数字的参数呢?这个方法转换失败的话也不会抛出异常,而是直接返回0的.

代码风格不错, 功能也基本实现了.继续加油.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.