Displaying 16 results from an estimated 16 matches for "blogyingfeng".
2006 May 22
6
which kind of deployment has the best performance
In the following deployment of web app on ONE pc-based server,running
linux,which can support the most amount of concurrent users as well as
the shortest latency?
1 apache+mongrel
2 apache+mongrel_cluster
3 lighthttpd+mongrel
4 lighthttpd+mongrel_cluster
5 lighthttpd+fastcgi
Thanks
charlie
--
Posted via http://www.ruby-forum.com/.
2006 May 08
4
Gettext not worked in firefox,but done well under IE
Anyone who has met such a kind of problem? I am adding i18n
characteristics to my webapp using gettext,it works under IE,while not
under firefox.
here is my codes:
po:
po\zh_CN\myapp.po
after rake makemo, i have got:
locale\zh_CN\LC_MESSAGES\myapp.mo
require ''gettext/rails''
class ApplicationController < ActionController::Base
init_gettext "myapp"
end
Then I use
2006 May 09
5
How to use gettext in plugins?
I use rails-engine as a plugin of the application and I want to localize
the validate message from the plugin:
validates_length_of :login, :within => 3..40, :on => :create, :message
=> N_("%{fn} is too short (min is %d characters)")
It can not display the according language,where should i set it?
I have tried to add
require ''gettext/rails''
2006 Apr 17
5
Strange question on file_column
I have met a very strange problem on file_column usage.
After I have added
file_column :image
to the model,everything is ok.
But after I added more:
file_column :image, :magick => {:versions => {
:thumb => {:size => "50*50"},
:medium => {:size => "640*480>"}}}
I can not even start the whole website! Here is the
2006 May 08
2
How to set the default language in GetText?
How to set the default language in GetText?
The default language of GetText is en,and I want to change it to another
language,and also keep the ability to change to any other languages by
just click the according href.
Currently I use:
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html;
2006 Apr 27
3
How to create multiple selects with related content?
How to create such a multiple select box:
the first box lists the countries,
the second lists the states related to the country in the first select
automaticly
the third lists the cities related to the state in the second select
automaticly
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 May 10
0
how to implement chained select box without ajax?
Former post focused on the chained select box with ajax select,but how
to do that without ajax using rails?
This following url can performance well:
www.bigbold.com/snippets/posts/show/1916
but it can only work under firefox,while not worked in ie
because it use the HTMLSelectElement.prototype,while ie does not support
i am still working to modify the source of the above url,but not
successful
2006 May 12
0
Thread question
In the posts of http://www.ruby-forum.com/topic/63984 i have got the
thread question,and the enviroment is webrick. And according to Ray''s
suggestion,I change the value of allow_concurrency in the base.rb to
true,and then webrick can work,although it will brings lots of other
error,it can at least to debug what i want.
Now, I change my enviroment to Apache+scgi to a multithreaded
2006 Apr 07
0
How to combine rjs with ActiveView::Helper?
Suppose in controller:
class ArticlesController < ApplicationController
def search
...
render :update do|page|
page.replace_html ''panel_tab_searchresults'',:partial => ''article'',
:object =>@articles
end
end
And i want to add ajax styled Paginator to the view,i have got the
method and i can work well directly used in view:
2006 Apr 10
1
How to set foreignkey in such a situation?
Table articles has column: author,body,etc
Table users has column: login_name,email,etc
articles belongs_to user
users has many articles
foreign_key author references users(login_name)
Therefore in Article.rb:
belongs_to:article_user,
:class_name=>"User",
:foreign_key=>"author"
and what''s going on? how the rails find the reference
2006 Apr 13
1
How to implement this kind of autocomplete?
The field is used for tag name input,and multiple tag names can be
inputed.
The traditional textfield_autocomplete will not work after select the
one from the pop menu,how to continue with the autocomplete if i want to
go on with the field inputing?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 14
1
How to upload file together with other form data?
I have the need to create such an item in the articles database:
The article item has fields such as:title,body,etc,and also,it has an
imgUrl field which indicates the image coresponding to the article.
And now it is necessary to create the article item with all the fields
filled at one time,then I have to submit the data of the fields except
for the imgUrl and the data of a file upload
2006 Apr 29
1
Webrick can not support such a request/response?
The following procedures:
1 Browser send a http request to controller A and wait for response
2 controller A send a http request to controller B and wait for response
3 Browser will not get the response unless controller A got response
from controller B
btw there exist only one pc for developing.
Webrick can not support such a kind of request/response?
>From the log I traced i found that the
2006 Apr 30
2
Rss feed items disappear using feedtools?
I have met a problem on Feedtools and felt very confused about it:
The feed that I generated using feedtools can not be read correctedly by
feedtools,while rss from other websites can be read.
Still,the code for rss generating:
def userrss
@user = User.find_by_id(params[:id])
@articles = @user.articles(:all,:order => ''updated_at desc'',:limit
=> 15)
2006 Apr 21
3
polymorphic,has_many through can not work?
Josh Susser tells in his blog that the opposite direction of polymorphic
will get into trouble together with has_many through.
This is the url:
http://blog.hasmanythrough.com/articles/2006/04/03/polymorphic-through
I do that according to Josh Susser''s procedure:
class Tagging < ActiveRecord::Base
belongs_to :tag
belongs_to :taggable, :polymorphic => true
belongs_to
2006 Apr 29
3
Feedtools question
I use feedtools to generate the feeds and read them,and now they can not
work well:
This is the code for feed generating:
class FeedsController < ApplicationController
def userrss
@user = User.find_by_id(params[:id])
@articles = @user.articles(:all,:order => ''updated_at desc'')
@headers["Content-Type"] = "application/xml; charset=utf-8"