锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产无套无码av电影,亚洲中文字幕无码爆乳av中文,亚洲国产成人AV网站http://www.tkk7.com/rain1102/category/37656.html<br/><font color="green" style="font-family: 鍗庢枃琛屾シ;font-size:16px;">瀛愭洶錛氬嵄閭︿笉鍏ワ紝涔遍偊涓嶅眳銆傚ぉ涓嬫湁閬撳垯瑙侊紝鏃犻亾鍒欓殣銆?lt;/font><font color="#3C1435"></font>zh-cnSat, 21 Feb 2009 19:05:05 GMTSat, 21 Feb 2009 19:05:05 GMT60浠?Django 鐪?Ruby on Rails 鎴愬姛鐨勫師鍥?/title><link>http://www.tkk7.com/rain1102/archive/2008/12/04/244362.html</link><dc:creator>Eric.Zhou</dc:creator><author>Eric.Zhou</author><pubDate>Thu, 04 Dec 2008 06:06:00 GMT</pubDate><guid>http://www.tkk7.com/rain1102/archive/2008/12/04/244362.html</guid><wfw:comment>http://www.tkk7.com/rain1102/comments/244362.html</wfw:comment><comments>http://www.tkk7.com/rain1102/archive/2008/12/04/244362.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/rain1102/comments/commentRss/244362.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/rain1102/services/trackbacks/244362.html</trackback:ping><description><![CDATA[<p>榪欒!鏈変竴浠藉宀?cookoo 鍐欑殑瀵笵jango鐨勯仐鎲撅紝鐪熸槸涓綃囧ソ鏂囩珷錛岃!闈㈡弿鍐欏埌 Django 濡備綍閿欏け澶ч福澶ф斁鐨勬満浼氥傛垜鐪嬪畬涔嬪悗錛岀獊鐒跺彂鐜?cookoo 榪欑瘒鏂囩珷钘夌敱 Django 鐨勭己鐐癸紝浠栦篃欏轟究鍋峰伔鍒嗘瀽浜?Ruby on Rails 鎴愬姛鐨勫師鍥犮傚ぇ瀹跺彲浠ユ潵鐪嬬湅</p> <p><br /> django鐨勫師濮嬬爜鏀瑰姩棰戠箒<br /> ORM API 綣佺悙錛堝悗鏉ユ寜ActiveRecord椋庢牸閲嶅啓錛?br /> 娌℃湁鏁村悎鐨勬祴璇曟鏋?br /> 娌″嚭涔︼紝鏂囦歡鐩告瘮Rails緙轟箣鐢氬<br /> python鍐呴儴鏈変漢瀵筪jango瀹屽叏鐙珛鐨勪竴濂梖ull-stack緋葷粺鏈変笉鍚岀湅娉曪紝鍙堟悶浜嗗緢澶氬埆鐨勬鏋訛紙姣斿turbogears錛?br /> django瀵笰JAX鐑疆鏃犲姩鏂艱》<br /> 鐩告瘮璧鋒潵</p> <p><br /> Rails Team 鐩稿綋紼沖畾錛屽緢灝戝ぇ鏀?br /> ORM 澶紭緹庝簡<br /> 鍑虹殑涔︾睄涓綰ф錛屾枃浠朵篃鐩稿綋澶?br /> Ruby 鍥犱負紺劇兢灝忥紝瓚呯駭鍥㈢粨<br /> Full Stack 妗嗘灦錛孶nit Test 鍐呭緩<br /> RJS 璧朵笂 AJAX 鐑疆錛岀倰鐑笉灝戣瘽棰?br /> 铏界劧 Open Source 鎶鏈負鏈紝浣嗘槸鎾囧紑 Ruby on Rails 浼樼鐨勬妧鏈笉璋堛?/p> <p>鍋囧澶у閮戒笉鍐欐枃浠訛紝Ruby on Rails 鐨勬枃浠朵笉澶熷鐨勮瘽錛屾湁浜烘暍鐢ㄤ竴涓笉鐔熸倝鐨勮璦鍚楋紵<br /> 娌℃湁灝?Ruby 紺劇兢涓誨姏鏀懼湪 Rails 韜笂錛屽啓寰楀嚭閭i杭澶?API 鍚楋紵<br /> 娌℃湁鍥㈢粨鐨勫洟闃燂紝浜哄憳鏉ユ潵鍘誨幓錛屽惖鏉ュ惖鍘葷殑鍥㈤槦浣滃緱鍑哄ソ浣滃搧鍚楋紵<br /> 娌℃湁 DHH 鑲姳鍐欑▼寮忎互澶栫殑鏃墮棿鎺ㄩ攢 Rails 錛屽茍涓旇姳鐪懼鏃墮棿鍐欏嚭涓鏈珹gile Web Development with Rails錛屼細鏇村浜烘効鎰忚姳鏃墮棿鍘誨涔犱竴涓惉閮芥病鍚繃錛屼篃娌℃湁鍏徃support 鐨?Ruby on Rails 鍚楋紵</p> <p><br /> 涓鍚戞槸涓鐩樻暎娌欑殑 Open Source 紺劇兢鍙互浠旂粏鎬濊冧竴涓?Ruby on Rails 甯︾粰澶у鐨勫暉紺恒俁uby 紺劇兢鍚戝績鍔涘己錛屼笉鍒嗘暎鍔涢噺錛屽張鎳傚緱鍑轟功浠ュ強鎺屾彙鏃跺娍鐢≧JS鐐掔儹璇濋銆傝繖璇存槑錛屽洟闃熺鐞嗗ソ錛屽悜蹇冨姏寮猴紝琛岄攢寮猴紝姝f槸 Ruby on Rails 鎵╂暎閭i杭蹇熺殑涓誨洜銆傚叾瀹烇紝榪欎笉姝f槸涓涓ソ鍟嗕笟鍥㈤槦搴旇鍏峰鐨勭壒璐ㄥ悧錛?</p><img src ="http://www.tkk7.com/rain1102/aggbug/244362.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rain1102/" target="_blank">Eric.Zhou</a> 2008-12-04 14:06 <a href="http://www.tkk7.com/rain1102/archive/2008/12/04/244362.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Why I moved from Ruby on Rails to Python/Django and back[excerpt]http://www.tkk7.com/rain1102/archive/2008/11/21/241807.htmlEric.ZhouEric.ZhouFri, 21 Nov 2008 02:46:00 GMThttp://www.tkk7.com/rain1102/archive/2008/11/21/241807.htmlhttp://www.tkk7.com/rain1102/comments/241807.htmlhttp://www.tkk7.com/rain1102/archive/2008/11/21/241807.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/241807.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/241807.htmlAround March of 2006, I decided to proceed with a complete rewrite of Ajaxwhois.com. I had been studying Ruby on Rails for long enough and knew it would be the ideal platform to develop with. And I was right. While Ruby and Rails might be a little awkward at first for the Java or .NET coder in you, it all really makes sense after a little while.

The behind the scene code generation (aka: magic), the lack of a decent IDE, and worse, of a good debugger made my transition to Ruby somewhat difficult and sometimes confusing frustrating. I used to live in Visual Studio .NET and breath Intellisense. In fact, I still miss that to this day.

Any newcomer to Rails will quickly discover why it is so talked about. First of all, even though I don’t consider myself anywhere near a decent Rails programmer, I am now at least twice as productive with Ruby on Rails than with ASP.NET and C#. Thanks to the MVC (Model, View, Controller), DRY (Don’t Repeat Yourself) and Convention Over Configuration mindset of Rails. All the data access code is automagically generated for you (without running a code generator), templating is built in and creating AJAX’ed applications is a snap.

Life was good with Rails and the more I used it, the more I liked it. That was until early August of 2006. I was ready to launch version 2.0 of Ajaxwhois. Knowing so many professional Rails hackers, I thought deploying my application to my production server was going to be a breeze. I was wrong. Even though the installation of Linux (Ubuntu Dapper Drake 64 bit), Lighttpd, MySql and Mongrel went well, I experienced weird problems, mainly related to Mongrel. Sometimes, my Mongrel instances would simply die and disappear from the process list for no apparent reason. I didn’t have ANY traffic at this point because I hadn’t done DNS transfers yet. On other occasions, Mongrel went crazy and started peaking the CPU at 99%. I had to manually kill and restart it.

After extensive research and countless “from scratch” reinstalls, I found out that Mongrel was known to not play well with 64 bit Ubuntu (I lost the links to this evidence, unfortunately). Mongrel was patched accordingly, but it didn’t solve my problem. It still crashed many times a day and I just couldn’t figure out what was wrong. I asked my good friends Rich Collins and Adam Thorsen (of Guruza.com) who are both experienced Rails developers and they had no idea either. I was stuck.

I wanted to launch. Badly. I didn’t want to waste anymore time with this so I picked up a Python book and rewrote the whole site one more time, in Python using the Django framework this time. I had never programmed in Python before and much less used Django. However, the switch was easy enough since Ruby and Python are somewhat similar.

My experience with Python and Django was great; it is a combination every web developer should consider. However, I soon missed Ruby and Rails. Ruby supports “real” private/public/protected methods (Python just fakes that with its naming convention) and it’s syntax is more forgiving (the need for () at the end of each method call in Python was killing me). Django is not as straightforward as Rails, and requires more code to get things done. There are also many little things that don’t “feel right” in Django, like the need to manually pass variables to a view. Data access is confusing at best while Rails’ ActiveRecord is god-sent. These little things really add up.

On the flip side, Python is faster than Ruby and less memory hungry. I was also surprised to actually love Python’s significant indentation (see example). But more importantly, Python and Django just worked! I never experienced weird crashes like I did with my Rails stack.

So, why am I back to Rails for my next project? 3 letters: FUN. I find Ruby and Rails to be pleasant to use. The community large, active and very helpful. The number of freely available Rails plugins and the fast evolution of the core code are also welcomed additions. Rails requires less code, less self.__awkward_method_calls(), has built-in AJAX and REST support, and has much more flexible data access and templating engines.

But what about those crashes? What about the speed issue? Well, I don’t have the crashes anymore. Don’t ask me why, I don’t know, but it’s fine now, I swear! Something somewhere got fixed and it seems to have solved the problem. However, speed is still one of the low points of Rails. Using caching and proper code optimization should take you a long way, though. Matz, the author of Ruby, is working hard on a new virtual machine that should make Ruby just as fast, if not faster than Python.

My recommendation is, try both for long enough to figure out what works and what doesn’t for you. If you are a long-time Python user, Django might be more compelling for you, but if you are coming from a Java, Perl or Smalltalk background, Ruby and Rails will most likely be what you’ll end up using. Either way, I don’t think you can go wrong.

PS: I don’t want to blame Mongrel for my Rails problems because I am still not sure who was the guilty party. Mongrel is a wonderful piece of software and I heartily recommend it. Just make sure you watch it closely if you use Ubuntu on a 64 bit machine.



Eric.Zhou 2008-11-21 10:46 鍙戣〃璇勮
]]>
緋葷粺緙栫▼璇█鍜岃剼鏈璦http://www.tkk7.com/rain1102/archive/2008/06/15/208114.htmlEric.ZhouEric.ZhouSun, 15 Jun 2008 09:41:00 GMThttp://www.tkk7.com/rain1102/archive/2008/06/15/208114.htmlhttp://www.tkk7.com/rain1102/comments/208114.htmlhttp://www.tkk7.com/rain1102/archive/2008/06/15/208114.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/208114.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/208114.html 緋葷粺緙栫▼璇█搴旇鐢ㄤ簬濡備笅鐩殑:
1.寮鍙戝鏉傜殑綆楁硶鎴栬呮暟鎹粨鏋?br /> 2.瀹炵幇璁$畻瀵嗛泦鍨嬪簲鐢?br /> 3.鎿嶄綔澶у瀷鏁版嵁闆?br /> 4.瀹炵幇鑹ソ瀹氫箟鐨? 緙撴參鍙樻洿鐨勯渶姹?br /> 5.鏄ぇ鍨嬮」鐩殑涓閮ㄥ垎
鑰岃剼鏈璦搴旇鐢ㄤ簬濡備笅鐩殑:
1.榪炴帴宸叉湁鐨勭粍寤?br /> 2.澶勭悊緇忓父鍙樺寲鐨勫縐嶇被鍨嬬殑瀹炰綋
3.鍏鋒湁鍥懼艦鍖栫敤鎴風晫闈?br /> 4.鎷ユ湁蹇熷彉鍖栫殑鍔熻兘
5.鏄皬鍨嬫垨鑰呬腑鍨嬮」鐩殑涓閮ㄥ垎

Eric.Zhou 2008-06-15 17:41 鍙戣〃璇勮
]]>
瀛︿範Ruby Onehttp://www.tkk7.com/rain1102/archive/2008/04/09/191679.htmlEric.ZhouEric.ZhouWed, 09 Apr 2008 14:05:00 GMThttp://www.tkk7.com/rain1102/archive/2008/04/09/191679.htmlhttp://www.tkk7.com/rain1102/comments/191679.htmlhttp://www.tkk7.com/rain1102/archive/2008/04/09/191679.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/191679.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/191679.html妯″潡瀹氫箟錛歮odule
綾誨畾涔夛細class
鏂規硶瀹氫箟錛歞ef, undef
媯鏌ョ被鍨嬶細defined?
鏉′歡璇彞錛歩f, then, else, elsif, case, when, unless
寰幆璇彞錛歠or, in, while, until, next, break, do, redo, retry, yield
閫昏緫鍒ゆ柇錛歯ot, and, or
閫昏緫鍊煎拰絀哄鹼細true, false, nil
寮傚父澶勭悊錛歳escue, ensure
瀵硅薄寮曠敤錛歴uper, self
鍧楃殑璧峰錛歜egin/end
宓屽叆妯″潡錛欱EGIN, END (require, include)
鏂囦歡鐩稿叧錛歘_FILE__, __LINE__
鏂規硶榪斿洖錛歳eturn
鍒悕錛歛lias

灞閮ㄥ彉閲忥紝鏂規硶鍙傛暟鍜屾柟娉曞悕縐板簲璇ョ敤涓涓皬鍐欏瓧姣嶅紑澶存垨鑰呯敤涓涓笅鍒掔嚎寮澶?
鍏ㄥ眬鍙橀噺鐢ㄧ編鍏冪浣滀負鍓嶇紑$;
瀹炰緥鍙橀噺浣跨敤@寮澶達紱
綾誨彉閲忕敤@@
綾誨悕錛屾ā鍧楀悕鍜屽父閲忓簲璇ョ敤澶у啓瀛楁瘝寮澶?/p>

Ruby紼嬪簭浠g爜鐜板湪鐢?浣嶇殑ACSII鐮佹潵琛ㄧず錛岄氳繃璇█鎵╁睍鏉ユ敮鎸丒UC錛孲JIS鎴朥TF-8絳?浣嶇紪鐮佺郴緇熴俁uby2.0鐗堟湰灝嗘敮鎸?6浣嶇殑Unicode緙栫爜

puts print gets
printf "Number: %4.3f, String:%s", 7.8, "hi!"

鏁版嵁綾誨瀷錛氭暟瀛楋紝瀛楃涓詫紝鏁扮粍錛屽搱甯岃〃錛屽尯闂達紝姝e垯琛ㄨ揪寮?br /> 1..5  ---> 1,2,3,4,5;
1...5 ---> 1,2,3,4

a=1; b=1.0; a==b #true 姣旇緝涓や釜瀵硅薄鐨勫兼槸鍚︾浉絳?br /> a=1; b=1.0; a.eql?(b) #false 姣旇緝涓や釜瀵硅薄鐨勫間互鍙婄被鍨嬫槸鍚︾浉絳?br /> a=1.0; b=1.0; a.equal?(b) #false 姣旇緝涓や釜瀵硅薄鍦ㄥ唴瀛樹腑鐨勫湴鍧鏄惁鐩稿悓
a=1.0; b=a; a.equal?(b) #true
<=> 姣旇緝涓や釜瀵硅薄鐨勫ぇ灝忥紝澶т簬錛岀瓑浜庯紝灝忎簬 鍒嗗埆榪斿洖1錛?錛岋紞1
===鍙寵竟鐨勫璞℃槸鍚﹀湪宸﹁竟鍖洪棿涔嬪唴錛岃繑鍥瀟rue鍜宖alse
puts (0..9) === 3.14 #true
puts ('a'..'f')==='c' #true
=~鐢ㄦ潵姣旇緝鏄惁絎﹀悎涓涓鍒欒〃杈懼紡錛岃繑鍥炴ā寮忓湪瀛楃涓蹭腑琚尮閰嶅埌鐨勪綅緗紝鍚﹀垯榪斿洖nil
!~鏂█涓嶇鍚堜竴涓鍒欒〃杈懼紡錛岃繑鍥瀟rue錛宖alse

break,璺沖嚭褰撳眰寰幆
next,蹇界暐鏈鐨勫驚鐜殑鍓╀笅閮ㄥ垎錛屽紑濮嬩笅涓嬈$殑寰幆
redo,閲嶆柊寮濮嬪驚鐜紝榪樻槸浠庤繖涓嬈″紑濮?br /> retry錛岄噸澶村紑濮嬭繖涓驚鐜綋

times,upto,downto,each.step
3.times{print 'Hi'} #HiHiHi
1.upto(9) {|i| print i if i<7} #123456
9.downto(1){|i| print i if i<7} #654321
(1..9).each{|i| print i if i<7} #123456
0.step(11, 3){|i| print i} #0369

寮傚父澶勭悊begin/end...rescue...ensure...raise  retry鍙互鐢ㄥ湪rescue涓?/p>

attr_writer:motherland
鐩稿綋浜?br /> def motherland=(value)
    return @motherland = value
end

attr_reader:motherland
鐩稿綋浜?br /> def motherland
    return @motherland
end

attr_accessor:motherland 鐩稿綋浜?attr_reader:motherland; attr_writer:motherland



Eric.Zhou 2008-04-09 22:05 鍙戣〃璇勮
]]>
媧誨姩鑴氭墜鏋跺姛鑳藉垪琛?/title><link>http://www.tkk7.com/rain1102/archive/2008/04/08/191475.html</link><dc:creator>Eric.Zhou</dc:creator><author>Eric.Zhou</author><pubDate>Tue, 08 Apr 2008 06:02:00 GMT</pubDate><guid>http://www.tkk7.com/rain1102/archive/2008/04/08/191475.html</guid><wfw:comment>http://www.tkk7.com/rain1102/comments/191475.html</wfw:comment><comments>http://www.tkk7.com/rain1102/archive/2008/04/08/191475.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.tkk7.com/rain1102/comments/commentRss/191475.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/rain1102/services/trackbacks/191475.html</trackback:ping><description><![CDATA[媧誨姩鑴氭墜鏋跺弬鑰冧簡Rails鑷甫鐨勮剼鎵嬫灦錛圫caffold錛夊姛鑳斤紝鎻愪緵浜嗕竴涓洿涓板瘜鐨勯氱敤妯″紡錛岄櫎浜咰RUD錛岃繕鏈夋帓搴忋佹悳绱€佸垎欏電瓑絳夎澶氬姛鑳姐傝繖閲屾槸涓涓?a title="鍔熻兘鍒楄〃" target="_blank">鍔熻兘鍒楄〃</a>銆?br /> <ul> <li>AJAX鍖栫殑琛ㄦ牸鐣岄潰錛屽彲浠ュ垱寤恒佷慨鏀廣佹煡鐪嬪茍鍒犻櫎瀵硅薄銆? <li>鑷姩澶勭悊ActiveRecord鍏寵仈鐨勭紪杈? <li>鎺掑簭銆佹悳绱㈠拰鍒嗛〉 <li>鏀寔RESTful <span id="uam484c" class="caps">API</span>錛堝寘鎷琗ML/YAML/JSON錛? <li>鏀寔鎹㈣偆 <li>鏀寔鎵╁睍 <li>鏀寔澶氱嫻忚鍣紝鍦‵irefox 1+錛?span class="caps">IE 6</span>+鍜孲afari 2+閫氳繃楠岃瘉 <li>涓嶳ails涓鏍烽伒寰?span class="caps">MIT鍗忚</span> License錛屼綘鍙互鍦ㄤ綘鐨勫晢涓氬簲鐢ㄤ腑鑷敱浣跨敤瀹?</li> </ul><img src ="http://www.tkk7.com/rain1102/aggbug/191475.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rain1102/" target="_blank">Eric.Zhou</a> 2008-04-08 14:02 <a href="http://www.tkk7.com/rain1102/archive/2008/04/08/191475.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Ruby on Rails 瀹夎鎵嬭http://www.tkk7.com/rain1102/archive/2008/03/25/188591.htmlEric.ZhouEric.ZhouTue, 25 Mar 2008 13:42:00 GMThttp://www.tkk7.com/rain1102/archive/2008/03/25/188591.htmlhttp://www.tkk7.com/rain1102/comments/188591.htmlhttp://www.tkk7.com/rain1102/archive/2008/03/25/188591.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/188591.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/188591.html     浠?http://www.ruby-lang.org/en/  涓嬭澆 ruby186-26.exe錛屽畨瑁匯uby銆?br />     娣誨姞鐜鍙橀噺 ruby186-26\bin 鍒?path
   
    榪愯 ruby -v 鏄劇ず鐗堟湰鍙鳳紝琛ㄧず瀹夎鎴愬姛銆?br />
瀹夎Rails錛?br />     (1) 榪滅▼瀹夎錛?br />     榪愯 gem install rails --include-dependencies錛屽畨瑁匯ails錛堥渶瑕佽繛鎺ョ綉緇滐級銆?br />    
    (2) 鏈湴瀹夎錛?br />     浠?http://www.rubyonrails.org/  涓嬭澆 rails-2.0.2.gem錛屽畨瑁匯ails銆?br />     榪愯 gem install rails-2.0.2.gem

    榪愯 rails -v 鏄劇ず鐗堟湰鍙鳳紝琛ㄧず瀹夎鎴愬姛銆?br />
浣跨敤錛?br />     榪愯 rails path/to/your/new/application 鍒涘緩涓涓柊鐨勯」鐩?br />     榪愯 ruby path/to/your/new/application/script/server 鍚姩鏈嶅姟銆?br />
    鏌ョ湅http://localhost:3000鎴愬姛
    
    鎵嬪伐瀹夎闈炲父楹葷儲錛屽彲浠ヤ粠 http://instantrails.rubyforge.org/  涓嬭澆InstantRails錛屽叏閮ㄦ悶瀹氥?br />

鐩稿叧鐩綍鍜岃礬寰勫涓嬶細
http://rubyforge.org/frs/?group_id=307  鍘諱笅杞絩ails
http://rubyforge.org/projects/activesupport 鍘諱笅杞絘ctivesupport
http://rubyforge.org/projects/activerecord/  鍘諱笅杞絘ctiverecord
http://rubyforge.org/projects/actionpack 鍘諱笅杞絘ctionpack
http://rubyforge.org/projects/actionmailer  鍘諱笅杞絘ctionmailer
http://rubyforge.org/projects/aws  鍘諱笅杞絘ctionwebservice
http://rubyforge.org/projects/rake  鍘諱笅杞絩ake

濡傛灉鏄崌綰э紝璁板緱鏈鍚庢墽琛?gem cleanup鎶婂師鏉ョ殑鑰佺増鏈竻闄ゃ?br />

Eric.Zhou 2008-03-25 21:42 鍙戣〃璇勮
]]>
RoR涓殑鍒嗛〉http://www.tkk7.com/rain1102/archive/2007/01/15/93996.htmlEric.ZhouEric.ZhouMon, 15 Jan 2007 09:22:00 GMThttp://www.tkk7.com/rain1102/archive/2007/01/15/93996.htmlhttp://www.tkk7.com/rain1102/comments/93996.htmlhttp://www.tkk7.com/rain1102/archive/2007/01/15/93996.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/93996.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/93996.html
銆銆鍦ㄦ帶鍒跺眰錛屽垎欏靛繀欏繪寜濡備笅浠g爜瀹炵幇錛?br />
def user_list
@user_pages, @users = paginate(:users, :order_by =錛?'name')
end

銆銆浠ヤ笂浠g爜閫氳繃paginate鏂規硶璁劇疆鐨勫垎欏靛櫒銆傝繖涓柟娉曟湁涓や釜鍙傛暟錛岀涓涓弬鏁版槸瑕佽鍙栨暟鎹殑琛ㄧ殑鍚嶅瓙錛岀浜屼釜鍙傛暟鏄湪鍙栨暟鎹椂瑕佹帓搴忕殑瀛楁銆傝繖涓柟娉曡繑鍥炰袱涓璞★紝絎竴涓璞user_pages鏄垎欏靛櫒瀵硅薄錛?絎簩涓璞?@users 鏄瘡涓欏電殑璁板綍鏁般傚叾涓瑻users鐢ㄦ潵鍚戣鍥炬彁渚涜鏄劇ず鐨勬暟鎹?鑰孈user_pages璐熻矗浠庤〃涓緱鍒版暟鎹紝鐒跺悗灝嗚繖浜涙暟鎹繚瀛樺湪@users涓?br />
銆銆瑙嗗浘灞傜殑瀹炵幇:

銆銆鍦ㄨ鍥懼眰鐨凴HTML鏂囦歡涓紝@users涓殑鏁版嵁灝嗚灞曠幇緇欑敤鎴楓俻agination_links()鏂規硶鍙互瀹炵幇瀵艱埅鐨勫姛鑳姐備互涓嬫槸鍏蜂綋鐨勫疄鐜頒唬鐮侊細

錛渢able錛?
錛渢r錛烇紲th錛炲鍚嶏紲/th錛烇紲/tr錛?
錛? for user in @users %錛?
錛渢r錛烇紲td錛烇紲%= user.name %錛烇紲/td錛?
錛? end %錛?
錛?table錛?
錛渉r錛?
錛?= pagination_links(@user_pages) %錛?
錛渉r錛?


Eric.Zhou 2007-01-15 17:22 鍙戣〃璇勮
]]>
Ruby鍜孯ails鐨勪竴浜涘ソ緗戠珯http://www.tkk7.com/rain1102/archive/2006/12/31/91152.htmlEric.ZhouEric.ZhouSun, 31 Dec 2006 06:22:00 GMThttp://www.tkk7.com/rain1102/archive/2006/12/31/91152.htmlhttp://www.tkk7.com/rain1102/comments/91152.htmlhttp://www.tkk7.com/rain1102/archive/2006/12/31/91152.html#Feedback0http://www.tkk7.com/rain1102/comments/commentRss/91152.htmlhttp://www.tkk7.com/rain1102/services/trackbacks/91152.html闇瑕佺敤鍒扮殑涓浜涗功
The Ruby Way
Programming Ruby 2nd edition
Agile Web Development with Rails
Best of Ruby Quiz
Rails Recipes
Enterprise Integration with Ruby
Ruby Hacking Guide
Ruby In A Nutshell

http://www.itpub.net/forum61.html
閲屽ぇ澶氭湁涓嬶紝閲嶇偣鎺ㄨ崘
Programming Ruby 2nd edition
Agile Web Development with Rails


涓浜涗笉閿欑殑璁哄潧 鍙婄綉绔?br />鍥藉唴鐨?br />http://railscn.crispynews.com/
http://www.railscn.com
http://chinaonrails.com
http://r4rclub.schtuff.com/
http://forum.javaeye.com
http://rorwiki.hellopen.net

鍥藉鐨?br />http://www.ruby-forum.com/
http://www.rubyonrailsforum.com/rails-code-questions/
http://rubyforge.org/
http://www.rubyonrails.org/
http://www.ruby-lang.org/en/
http://www.webrick.org/
http://www.yaml.org/

blog

<鍗氬>
閾侀亾鎾錛氭湁璇稿瑙嗛鏁欑▼
http://rorcast.blogger2blogger.com/

my4java鐨勬枃瀛楀崥瀹細鏈夊緢澶氭暀紼嬬殑璇戠ǹ銆佺瑪璁扮瓑
http://my4java.itpub.net/

cnruby閬撳枩鎶鏈棩璁幫細浼楀瀹炰緥鏁欑▼
http://www.hhtong.com/blog1/

caphe鐨勫崥瀹?
http://www.tkk7.com/cap

Caiwangqin鐨勫崥瀹?
http://www.uuzone.com/blog/uu_1115110/

涓枃RubyOnRailsWiki
http://rorwiki.hellopen.net/index.p...%A6%96%E9%A1%B5

鍏充簬rails鍜宎jax鐩哥粨鍚?br />http://www.rubynoob.com/

http://inquirylabs.com/blog/

榪欎釜褰撲腑鏈変竴浜涗粙緇?br />http://www.railscn.com/about704.html



Eric.Zhou 2006-12-31 14:22 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 久久国产精品亚洲综合| 亚洲小说区图片区另类春色| 亚洲春色另类小说| 2021在线永久免费视频| 亚洲精品电影在线| 99久久久精品免费观看国产 | 美女视频黄免费亚洲| 24小时日本在线www免费的| 精品亚洲国产成人| 天天干在线免费视频| 亚洲日韩乱码中文字幕| 日本久久久免费高清| 一道本在线免费视频| 国产亚洲一区二区精品| 91大神免费观看| www.亚洲成在线| 免费观看午夜在线欧差毛片| 一级特黄a免费大片| 久久久久亚洲精品成人网小说| 在线观看免费av网站| 在线亚洲高清揄拍自拍一品区| 午夜时刻免费入口| 黄色视频在线免费观看| 亚洲伦理一区二区| 女人被男人躁的女爽免费视频| 免费一级毛suv好看的国产网站 | 99久久亚洲综合精品成人网| 国产免费久久精品99re丫y| 日本亚洲中午字幕乱码| 亚洲中文字幕不卡无码| 91网站免费观看| 日本精品久久久久久久久免费| 国产亚洲精久久久久久无码| 中文字幕乱码免费视频| 国产亚洲精品精品精品| 亚洲AV无码日韩AV无码导航| 成年午夜视频免费观看视频 | 中文字幕影片免费在线观看 | 内射干少妇亚洲69XXX| 免费看美女让人桶尿口| 中文字幕免费在线看电影大全|