linjunpop
V2EX  ›  问与答

Ruby 初学者问题: !

  •  
  •   linjunpop · Oct 26, 2011 · 4851 views
    This topic created in 5494 days ago, the information mentioned may be changed or developed.
    `is_admin!`

    和

    `make_admin!`

    哪个才是正确的命名?

    参考:http://essential-rails-pattern.heroku.com/#23
    4 replies  •  1970-01-01 08:00:00 +08:00
    keakon
    keakon
    Oct 26, 2011
    1
    貌似是这样:
    is_admin?
    make_admin!
    flyingkid
    flyingkid
    Oct 26, 2011
    2
    huacnlee
    huacnlee
    Oct 26, 2011
    3
    @keakon 不对
    这样才是推崇的

    admin?
    make_admin!
    linjunpop
    linjunpop
    OP
    Oct 26, 2011
    4
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   974 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:01 · PVG 06:01 · LAX 14:01 · JFK 17:01
    ♥ Do have faith in what you're doing.