[Rails] can www.example.com/...#!... always use controller=redirect

2010-06-26 Thread Jian Lin
In Ruby on Rails routing (using route.rb), can it say, for any URL having the form: www.example.com/ ... #! ... then use controller `redirect` ? This is so that in AJAX, some page can tag the `#!` at the end of URL so that the real content of interest is the part after the `#!` -- Posted v

[Rails] a few steps for a database with polymorphic association?

2010-06-15 Thread Jian Lin
I thought it could be created in a few steps but it can't yet: rails poly cd poly ruby script/generate scaffold animal name:string obj_type:string obj_id:integer rake:migrate ruby script/generate scaffold human name:string passportNumber:string rake:migrate ruby scr

[Rails] map.connect will not create connect_path and connect_url?

2010-06-12 Thread Jian Lin
In Ruby on Rails, routes.rb, if we create a "named route" map.something ":a/:b", :controller => 'foobar' it will also create "something_path" and "something_url" which are two methods usable in the controller and in the view. Does "map.connect" create something like that too? Otherwise, isn'

[Rails] How not to include the same javascript files more than once?

2010-06-12 Thread Jian Lin
In Ruby on Rails, if a partial (such as _msgbox.html.erb) need to use Javascript by javascript_include_tag :defaults but then, the page layout or other view may also have that same line, so the same javascript files will be included multiple time? Is there a way to tell Rails just to include

[Rails] How come need to get MySQL to work in a strange way?

2010-06-10 Thread Jian Lin
The following is an error for using RoR with MySQL: C:\ror\shov17>rake db:migrate (in C:/ror/shov17) !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted! 193: %1 is not a valid Win32 application. - c:/ruby/

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javasc

2010-06-06 Thread Jian Lin
Marnen Laibow-Koser wrote: > > Or...hmm. Check out CoffeeScript; it's a bit like Haml for JS. if only there is a Ruby to JS converter. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javasc

2010-06-06 Thread Jian Lin
Marnen Laibow-Koser wrote: > Jian Lin wrote: >> Marnen Laibow-Koser wrote: >> >>>> JS Minifier when there are 5 lines of code? >>> >>> If there are only 5 lines of code, why do you need private comments in >>> the first place? >> &g

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javasc

2010-06-06 Thread Jian Lin
Marnen Laibow-Koser wrote: >> JS Minifier when there are 5 lines of code? > > If there are only 5 lines of code, why do you need private comments in > the first place? Do you often see other people's way of doing things needing to abide to your rule book? Such as: if there are only n lines of

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javasc

2010-06-06 Thread Jian Lin
Marnen Laibow-Koser wrote: >> 1) -# to add comment but not to show it to the public > > Use a JS minifier. > >> 2) using if else to output something based on some condition >> 3) using loop > > Use JavaScript control structures for these, not Ruby control > structures. > >> 4) providing value

[Rails] test db is same as dev db and ask for sure: Yes/No?

2010-06-05 Thread Jian Lin
Is it feasible that when running unit test or functional test, when it detects that the "test" db is the same as the development db, then give a warning: are you sure? the whole db will be wiped cleaned - Yes/No. Because some people who are new to Rails and even experienced people may make a simp

[Rails] Re: Can Rails cache a Controller "as long as code not change

2010-06-05 Thread Jian Lin
Marnen Laibow-Koser wrote: >> foo.js?1273424325 >> >> which is to use the cached version as long as there is no code change, >> but recompile it when there is code change? > > Because it's a different kind of caching. JavaScript caching simply > involves using the browser cache for included f

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javasc

2010-06-05 Thread Jian Lin
Marnen Laibow-Koser wrote: > > If you think you need Ruby in your JS, you've got a design problem. Fix > it. i can think of a few cases where Ruby might be wanted inside of Javascript output: 1) -# to add comment but not to show it to the public 2) using if else to output something based on s

[Rails] Can Rails cache a Controller "as long as code not changed"?

2010-06-04 Thread Jian Lin
At work, we have a situation where when script/server is run, then all the controller code is cached. This is to speed up the development server. But that will mean that whenever we change the controller code, we need to restart the server. So we can turn off the caching of controller code a

[Rails] Re: What kind of Ruby / Erb is allowed inside HAML's :javascript

2010-06-03 Thread Jian Lin
Jian Lin wrote: > but it seems the only thing allowed is > > :javascript > $('#aDiv').html('#{a_ruby_variable}'; correction: (missing the ending paren) :javascript $('#aDiv').html('#{a_ruby_variable}'); -- Posted via http:/

[Rails] What kind of Ruby / Erb is allowed inside HAML's :javascript

2010-06-03 Thread Jian Lin
It seems that inside of HAML's :javascript filter, no Ruby code is allowed, not even a comment. So this is NOT allowed: :javascript - 1.upto(10) do |i| :javascript -# just a comment not to show to public (somebody said there is not way to hide comment like that inside a :javascript filter.

[Rails] cookie has key/value pairs and lost order after JSON decode

2010-05-28 Thread Jian Lin
If a cookie has several items, and is encoded as JSON text as the value of the cookie, the order is actually apparent in the cookie's text But if JSON.decode is used: ActiveSupport::JSON.decode(cookies['item_list']) and the result is actually in a hash, then the ordering is lost... Is it true

[Rails] RJS suitable for doing interactivities within a webpage?

2010-05-26 Thread Jian Lin
RJS is very good for sending Javascript code back to the browser saying "Your AJAX is successful and by the way you can update the UI to signal to the user using the following Javascript I am going to send you." How about other webpage interactivities, dynamic HTML, is RJS suited for doing that as

[Rails] Two RJS visual effects will happen at the same time?

2010-05-24 Thread Jian Lin
I was going to change the background of a div from white to red and then from red back to white, so this is used in an RJS file: page[:vote_score].visual_effect :highlight, :startcolor => '#ff', :endcolor => '#ff' page[:vote_score].visual_effect :highlight, :startcolor => '#ff', :

[Rails] Can RoR handle AJAX Response by Static Javascript code?

2010-05-24 Thread Jian Lin
So it looks like on RoR, when Ajax (using form_remote_tag) returns a success code, Javascript is also returned to handle the visual effects. using Fiddler, I do see the following response: try { Element.update("vote_score", "Score 58"); $("vote_score").visualEffect("highlight"); }

[Rails] does changing to_param() have any side effect?

2010-05-24 Thread Jian Lin
In some book, it is recommended that to_param is changed to class Story < ActiveRecord::Base def to_param "#{id}-#{name.gsub(/\W/, '-').downcase}" end end so that the URL is http://www.mysite.com/stories/1-css-technique-blog instead of http://www.mysite.co

[Rails] Re: Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?

2010-05-23 Thread Jian Lin
Rick Denatale wrote: > That's actually not the whole story, and excerpt from the output of > gem help install: > > Description: > The install command installs local or remote gem into a gem > repository. > > For gems with executables ruby installs a wrapper file into the > executable

[Rails] Re: why story.votes return Array, but story.votes.create works?

2010-05-23 Thread Jian Lin
Frederick Cheung wrote: > On May 23, 7:10�am, Jian Lin wrote: > >> >> So clearly, s.votes is an empty Array object. >> > > Actually it's not. It's an AssociationProxy object pretending to be an > instance of Array > > Fred not like this?

[Rails] why story.votes return Array, but story.votes.create works?

2010-05-22 Thread Jian Lin
In Ruby on Rails, say a Story object can "has_many" Vote objects (a story is voted "hot" by many users). So when we do a s = Story.find(:first) "s" is a Story object, and say s.votes returns "[]" and s.votes.class returns "Array" So clearly, s.votes is an empty Array object. A

[Rails] Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?

2010-05-22 Thread Jian Lin
pepe wrote: > Just in case it applies here is an extract from the Pickaxe book > (Second edition, page 217): > > "Threre's a subtlety when it comes to installing different versions of > the same application with RubyGems. Even though RubyGems keeps > separate versions of the application's library

[Rails] What happens when Rails 1.3.5 is installed on top of 2.3.5?

2010-05-21 Thread Jian Lin
On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using rails -v) and then I used gem install to install about 20 things, and maybe there was a line on the instructions that was there in the past that says gem install rails -v=1.3.5 and I ran it anyways, thinking that maybe 1.3.5

[Rails] Re: Re: to "loop through" the instance variables of ActiveRecord?

2010-05-13 Thread Jian Lin
Jian Lin wrote: > yes, column_names gave a better order: > > C:\Software Projects\ror\shov10>ruby script/console > Loading development environment (Rails 2.3.5) >>> Story.column_names > => ["id", "name", "link", "created_at&

[Rails] Re: Re: to "loop through" the instance variables of ActiveRecord?

2010-05-13 Thread Jian Lin
Philip Hallstrom wrote: >> also, the use of i[0], i[1] seems a little less structured than if >> i.attr_name, i.attr_value can be used. > > look into "s.attributes.each_pair |k,v|" > > >> the row == 1 situation also seems like somewhat not adhering to DRY. > > You could consider using Story.c

[Rails] Re: to "loop through" the instance variables of ActiveRecord?

2010-05-13 Thread Jian Lin
Philip Hallstrom wrote: >><%= "#{h i}\n" %> >> <% end %> >> <%= "\n" %> >> <% end %> > > @stories.attributes > > http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002348 > > -philip Great thanks. So I have come up something like this: the row == 1 check is to print the head

[Rails] to "loop through" the instance variables of ActiveRecord?

2010-05-13 Thread Jian Lin
to wrap each instance variable of an ActiveRecord object between "" and "", is there a way to "loop through" them, at least in the debug mode, no matter there is getter methods to get them or not, or at least the ones with the getter methods? Such as <% @stories.each do |s| %> <%= "" %> <% s.

[Rails] Re: Is there a way not to break 3 lines of code into 3 <% %> ?

2010-05-13 Thread Jian Lin
Jian Lin wrote: > using join looks like will create only n + 1 string objects... > ah, on second thought, doesn't the join() method actually will create n string objects too? (the next one longer than a previous one), so it would be creating 2n string objects too. -- Post

[Rails] Re: Is there a way not to break 3 lines of code into 3 <% %> ?

2010-05-13 Thread Jian Lin
Philip Hallstrom wrote: > In the above case you could do this... > > <%= @stories.map {|s| content_tag(:div, h(s.inspect)) }.join %> i was at first worried that if the print out is long, like a few hundred lines, then it can create many string objects. using join looks like will create only n

[Rails] Is there a way not to break 3 lines of code into 3 <% %> ?

2010-05-13 Thread Jian Lin
In the view code, say it is <% @stories.each do |s| %> <%= "#{h s.inspect}" %> <% end %> it would be breaking the code into 3 <% %> and <%= %> is there a way to just have one <% %> or <%= %> so as to keep the code more flowing together? -- Posted via http://www.ruby-forum.com/. -- You r

[Rails] Re: Re: Easy way to make Rails use MySQL on Windows?

2010-05-13 Thread Jian Lin
Jette Chan wrote: > OK. Now I know... > I thought t you can see "1 gem installed" > So, it means you've already finished install mysql gem now. > And the following errors come from when installation the documentation. > > Actually you already can use this gem now. but when i use http://localhost

[Rails] Re: Easy way to make Rails use MySQL on Windows?

2010-05-13 Thread Jian Lin
Jette Chan wrote: > Yes, gem install mysql is needed. > But, I'm not sure what do you mean lots of errors. > Maybe you should post your errors here. sure, a sample run is: C:\Software Projects\ror\shov6>gem install mysql Successfully installed mysql-2.8.1-x86-mingw32 1 gem installed Installing ri

[Rails] Easy way to make Rails use MySQL on Windows?

2010-05-13 Thread Jian Lin
I set up Rails from scratch using the methods on: http://rubyonrails.org/download and also: gem install sqlite3-ruby download sqlite3.dll into c:\ruby\bin change config/database.yml adapter lines for dev, test, prod all to sqlite3 so sqlite3 can be used now... but what if i also installed MySQ

[Rails] Re: way to divide long article and store in database

2009-05-31 Thread Jian Lin
Jonathan Rochkind wrote: > Jian Lin wrote: >> I wonder if a Ruby on Rails developer has encounter this before: suppose >> it is a long article (say 100,000 words), and I need to write a Ruby >> file to display page 1, 2, or page 38 of the article, by >> >> displa

[Rails] way to divide long article and store in database

2009-05-31 Thread Jian Lin
I wonder if a Ruby on Rails developer has encounter this before: suppose it is a long article (say 100,000 words), and I need to write a Ruby file to display page 1, 2, or page 38 of the article, by display.html.erb?page=38 but the number of words for each page can change over time (for example,

[Rails] Re: why does this comment create a compile error

2009-05-27 Thread Jian Lin
pepe wrote: > I've run into the same problem several times before and never thought > too much of it, just made the correct change to be able to compile and > kept going. Now that I think about it I might have an answer. > > The ruby code is just what it is between <% and %>. Those 'delimiters' >

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Jian Lin
hm... you know what, my coworker had this one line: and the page would still validate perfectly as XHTML, but IE will render it differently from FF. FF will take it as a closing div. IE will not take it as a closing div. so I will have perfectly validated code that behaves differently on tw

[Rails] Re: a way that helper functions not produce XHTML but HTML?

2009-05-27 Thread Jian Lin
Lee Smith wrote: > Trying to change the way Rails lays down a stylesheet include is > really a waste of time. This HTML vs XHTML syntax only matters if > you're validating...otherwise, the browser renders it as HTML. > > Don't waste your time and definitely update your browser. i think there ar

[Rails] Re: do you think we should make <%= # comment %> not cause

2009-05-26 Thread Jian Lin
Salil Gaikwad wrote: > I Commented code in erb in following ways > > <%# This is Comment %> > > <%# > This is Comment > %> > > <%#= This is Comment %> > > <%#= > This is Comment > %> i see. that's smart. then we don't need <%= #comment %> to work. but if it can, i think it might be go

[Rails] library for URL parameters adding, removing, or replacing?

2009-05-26 Thread Jian Lin
i think PHP doesn't have such simple functions yet... does Ruby have it? if in PHP, when we add a param to the URL $redirectURL = $printPageURL . "?mode=1"; it works if $printPageURL is "http://www.somesite.com/print.php";, but if $printPageURL is changed in the global file to "http://www.some

[Rails] do we usually use Iconv to do translate to various encodings

2009-05-11 Thread Jian Lin
I wonder if we usually use Iconv to translate to various encoding? For example: Iconv.conv("UTF-8", "BIG-5", content) or Iconv.conv("UTF-8", "CP950", content) or do we usually use other packages? One reason is that BIG-5 can cause an exception while CP950 won't on some content, and both of

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Michael Schuerig wrote: > On Sunday 10 May 2009, Jian Lin wrote: >> so how to do inserts in bulk? by using >> >> Phrase.connection.execute("insert into phrases(s,frequency,length) >> values('#{phrase}',#{frequencies[phrase]},#{lengths[phrase]})")

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Frederick Cheung wrote: > On May 10, 10:41�am, Jian Lin > wrote: >> it actually force write to the physical disc? > It's never that simple (and yes under the appropriate circumstances > the drive is supposed to flush to the actual disk). For example > there's a c

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Jian Lin wrote: > Save and destroy are automatically wrapped in a transaction > > so i think create is also invoking a save... i just read from Learning Rails the book (p.50 if remembered correctly) that create is 3 operations in one: it has a new, an assignment of values, and a

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > Aha It looks like ActiveRecord has an enormous overhead in > creating/saving records. > > If you change the inserts to this > > puts Benchmark.measure { > Phrase.transaction do >all_phrases.each do |phrase| > Phrase.connection.execute("insert into phrases(s

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > > "Starting inserting records" > 31.996000 0.639000 32.635000 ( 35.356000) > 3 > > For 3 inserts with all indexes: > > "Starting inserting records" > 32.795000 0.982000 33.777000 ( 37.103000) > 3 > > I Don't know if it is the hash lookup code or Active

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > Jian Lin wrote: >> ok, the following code with 6000 records insert will take 13.3 seconds >> to finish (just for the db portion). if i change 6000 to 3 then it >> will take 67 seconds. >> > > OK, I created the table and the index and

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
ok, the following code with 6000 records insert will take 13.3 seconds to finish (just for the db portion). if i change 6000 to 3 then it will take 67 seconds. it is being run using ruby script/runner foo.rb code: srand(123)

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > Jian Lin wrote: >> >> but it is still the same: it took 75 seconds... > > That's because it's still really the same code! > >> i wanted the length, which is the count of word because in the future i >> might want to do query

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Michael Schuerig wrote: > On Sunday 10 May 2009, Jian Lin wrote: >> end > Consider > > Phrase.transaction do > frequencies.each do |phrase, freq| > Phrase.create!(:s => phrase, :frequency => freq) > end > end > > Hash#each passes keys and v

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > > I'm not sure how you get 34000 records from 6000 words. Surely you > should get less not more. > >> it would run for at least a minute... that's kind of weird... >> > > Are you sure it is just the above code that is taking a minute and not > the bit of code that counts

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Jian Lin wrote: > i was doing it like this: > > > all_phrases = frequencies.keys > Phrase.transaction do > all_phrases.each do |phrase| > recordPhrase = Phrase.new(:s => phrase, :frequency => > frequencies[phrase], :length => lengths[phrase]) > rec

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Gary Doades wrote: > If you have made the change to count up words first and then *insert* > all the (word,count) records into the database in a *single* transaction > then it ought to take less than a second. I would expect that the total > number of (word,count) records is in the order or hundr

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-10 Thread Jian Lin
Colin Law wrote: > Have you made the suggested change to count the words in the document > first > then update the db, so that you are not updating each record in the > database > many times (presumably hundreds of times for common words)? This will > change the number of db accesses from the t

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
Phlip wrote: > Jian Lin wrote: > >> so i re-ran the test and it worked quite quickly... down to 1 minute or >> so instead of 30 minutes... (for several pages)... and the db size is >> only 2.5MB (i created another rails project to start anew). So >> if we are j

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
Gary Doades wrote: > Jian Lin wrote: >> in RAM as much as possible? > The database can be cached in ram by most database engines. However, > most database engines will also make sure that every transaction > (insert, update, delete) is committed to disk by forcing a write to t

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
great... will try it out now. actually, i was thinking, that the computer sometimes has 1GB free RAM or 3GB free RAM (of the 4GB of RAM). how come the OS doesn't automatically create a cache for the 45MB db file? If the OS creates the cache, everything happens in memory, and it should be qui

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
Colin Law wrote: > Is this a test or a real requirement? If it is a real requirement then > count the words in memory first and then update the db so each record is > only written once. > > Colin > > 2009/5/9 Jian Lin it is a real requirement... so how do i update t

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
Colin Law wrote: > Would not the index make the lookup faster but the write slower? Is it > that > the cacheing would mean that the lookup would be pretty quick anyway, > even > without an index? > > Colin > > 2009/5/9 Gary Doades yeah, seems like the search will be a lot faster with the i

[Rails] Re: updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
Gary Doades wrote: > I'm glad you said it was a test because it wouldn't be nice to do that > for real. > > It looks like you've got at least 12000 transactions in there (select + > update). Any indexes would make it worse. > > I'm guessing that this would take around 5 minutes on decent single

[Rails] Re: How many RoR engineers use Mac / Linux / Windows?

2009-05-09 Thread Jian Lin
is it true that surveymonkey.com won't show the survey answers to general users who voted? (unless the survey creator is not using a basic account)... so the result so far is: Mac: 10 Linux:9 Windows: 4 Other:1 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] updating the db 6000 times will take few minutes ?

2009-05-09 Thread Jian Lin
i am writing a test program for ActiveRecord, and it reads a document which is like 6000 words long. And then i just tally up the words by recordWord = Word.find_by_s(word); if (recordWord.nil?) recordWord = Word.new recordWord.s = word end if recordWord.count.nil?

[Rails] want to put processing logic in Controller but no strip_tags

2009-05-09 Thread Jian Lin
I want to put the processing logic in the controller... and it has a strip_tags call... and the controller portion will say the function doesn't exist. so is there a way to call strip_tags from the controller? (instead of from view). -- Posted via http://www.ruby-forum.com/. --~--~-~-

[Rails] Re: <% %> is not exactly the same as

2009-05-09 Thread Jian Lin
Alberto Santini wrote: > Jian Lin wrote: >> actually... sometimes i want to output multiple things inside of <% %>, >> or put everything inside a loop and inside a <% %>, so that's why the >> question of <% puts 123 %> > > I think yo

[Rails] Re: does somebody use XCode on Mac for RoR instead of TextM

2009-05-09 Thread Jian Lin
by the way, i was using Notepad++ a lot on the PC, and almost want to just use that for anything... but it seems to have no way to open up a folder like TextMate does... so it is a bit inconvenient for RoR development. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~---

[Rails] Re: <% %> is not exactly the same as

2009-05-09 Thread Jian Lin
Rob Lacey wrote: > <%= "blah" %> > > is what you are looking for actually... sometimes i want to output multiple things inside of <% %>, or put everything inside a loop and inside a <% %>, so that's why the question of <% puts 123 %> -- Posted via http://www.ruby-forum.com/. --~--~--

[Rails] Re: does somebody use XCode on Mac for RoR instead of TextMate?

2009-05-09 Thread Jian Lin
Conrad Taylor wrote: > > Jian, I use Xcode sometimes when I'm doing MacRuby development with > Monaco font and a size of 14pt. Xcode allows you to change the font > size as > do most applications that allow you enter text. so there is no need to spend 39 euro to buy TextMate? I was wondering

[Rails] Re: <% %> is not exactly the same as

2009-05-09 Thread Jian Lin
Jian Lin wrote: > it seems that <% %> is not exactly the same as in which, > > > PHP's > > > will add to the output > > but > > ERB's > <% puts "something" %> > > will not? actually, i found that <% puts 123 %

[Rails] does somebody use XCode on Mac for RoR instead of TextMate?

2009-05-09 Thread Jian Lin
does somebody use XCode on Mac for RoR instead of TextMate? I wonder how is it compared to TextMate... TextMate uses the default font of Monaco... the Xcode screenshot on Wikipedia uses Courier... I wonder if Xcode looks as good as TextMate when the font is changed to Monaco as well? Thank you

[Rails] How many RoR engineers use Mac / Linux / Windows?

2009-05-09 Thread Jian Lin
I wonder if most of the people using RoR is using it on Mac? How about we make a tally here... we can enter our platform here and see what other engineers are using: http://www.surveymonkey.com/s.aspx?sm=Xjv89bNS9fvJGoi_2bnsNimg_3d_3d thanks. -- Posted via http://www.ruby-forum.com/. --~--~-

[Rails] <% %> is not exactly the same as

2009-05-08 Thread Jian Lin
it seems that <% %> is not exactly the same as in which, PHP's will add to the output but ERB's <% puts "something" %> will not? Does someone know if JSP and ASP behave like ERB or PHP and can make a summary of their likes and differences? Thank you. -- Posted via http://www.ruby-foru