Advertisement
新聞快報

本站是用Joomla架設。架設本站的主要目的是方便自己平時搜尋資料,也想將自己的原創資料同大家分享,更希望本站的資料可幫助閣下解決或處理有關問題。如果對本站有何見解或意見,可Email 到 jason at jason-tang.com。

 
(源自網絡)rails(2.3.2) + goldberg + activescaffold on Freebsd PDF 列印 E-mail
作者 Administrator   
2009/06/09, Tuesday

http://www.goldberg.240gl.org/installation
http://www.goldberg.240gl.org/usage/
http://activescaffold.com/tutorials/

cd /usr/ports/lang/ruby18
make install clean

cd /usr/ports/devel/ruby-gems
make install clean

cd /usr/ports/www/fcgi
make install clean

cd /usr/ports/www/ruby-fcgi
make install clean

cd /usr/ports/www/rubygem-rails
make install clean

rails -d mysql mysite
cd mysite
git init
git submodule add git://github.com/lardawge/goldberg.git vendor/plugins/goldberg
rake goldberg:install
rake goldberg:theme[snooker]
script/plugin install git://github.com/activescaffold/active_scaffold.git
script/server

script/generate model model_name
script/generate controller controller_name

add the following lines to controller_name_controller.rb

  active_scaffold :model_name

  protected

  def list_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'list')
  end

  def search_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'show_search')
  end

  def show_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'show')
  end

  def update_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'edit')
  end

  def create_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'new')
  end

  def delete_authorized?
    Goldberg.credentials.action_authorised?('model_name', 'delete')
  end

最後更新 ( 2009/06/12, Friday )
 
香港新聞
- 駐伊美軍2死9傷 結束戰鬥任務後首次
- 沃茲尼擊敗羅比度晉級美網八強
- 巴勒斯坦代表稱月底決定是否繼續和談
- 南太平洋斐濟及湯加附近分別發生地震
- 兩男子大埔購物涉嫌襲擊店員被捕
香港天氣
氣 溫 : 29 度
濕 度 : 8 %

天 氣 : 大 致 多 雲

七天天氣預報:

9 月 8 日
28 - 32 oC

9 月 9 日
9 月 9 日
27 - 32 oC


9 月 10
26 - 30 oC


9 月 11
26 - 30 oC


9 月 12
27 - 31 oC


9 月 13
28 - 32 oC


9 月 14
28 - 32 oC





[ design-cibox ]