[Rails] is there any tutorial for pay per click system?

2009-12-03 Thread daociyiyou
is there any rails tutorial for pay per click system? It seems there is no one on google? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

[Rails] Re: is there any tutorial for pay per click system?

2009-12-03 Thread daociyiyou
is there any rails tutorial for pay per click system? It seems there is no one on google? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

[Rails] Re: no way to read image data from database

2009-11-02 Thread daociyiyou
Attachment_fu works fine in :file_system mode, but not in :db_file mode. It seems to upload only about 45 bytes of data instead of the entire image.Either t.binary :data or t.binary :data,:limit = 10.megabyte can not works. anyone can help me? Nearly a week time spent on it.

[Rails] Re: no way to read image data from database

2009-11-02 Thread daociyiyou
I believe many peopel meet this problem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this

[Rails] no way to read image data from database

2009-11-01 Thread daociyiyou
db def self.up create_table :db_files,:force = true do |t| t.binary :data t.timestamps end end db controller def find_db_file project=Project.find_by_id(params[:id]) project_snapshot=project.project_snapshot

[Rails] Re: no way to read image data from database

2009-11-01 Thread daociyiyou
are seeing but... On Sun, Nov 1, 2009 at 11:05 AM, daociyiyou chey...@yahoo.com.cn wrote: db   def self.up    create_table :db_files,:force = true do |t|      t.binary :data      t.timestamps    end  end db--- I bet one of them is due to your not having content_type

[Rails] Re: no way to read image data from database

2009-11-01 Thread daociyiyou
? On Nov 2, 11:30 am, daociyiyou chey...@yahoo.com.cn wrote: hi   content_type and filename fields are in another table called project_snapshots.I do  it according to the attachment_fu plugin struction.I can just not display the image in the databse. On Nov 2, 12:53 am, Gregory Mazurek

[Rails] Re: rails-authorization-plugin

2009-07-01 Thread daociyiyou
Thank you! I am reading it now. On 7月1日, 上午4时23分, Colin Law clan...@googlemail.com wrote: 2009/6/30daociyiyouchey...@yahoo.com.cn: I am sure i have configured the plugin well,but not know how to use it properly. first: set role using has_role or accept role method. second:permit or

[Rails] rails-authorization-plugin

2009-06-30 Thread daociyiyou
I am sure i have configured the plugin well,but not know how to use it properly. first: set role using has_role or accept role method. second:permit or permit? methods is used to check or set role? I think they are used for checking,if true for a specific role,run the codes in the block of the

[Rails] Re: rails-authorization-plugin

2009-06-30 Thread daociyiyou
anyone help? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to

[Rails] Re: rails-authorization-plugin

2009-06-30 Thread daociyiyou
The most funny answer i ever had. Thanks,Colin Law --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from

[Rails] how to get files in s3 directory?

2009-06-22 Thread daociyiyou
how to get files in s3 directory like following? s3://1eM20RW1CJAFGTH5YHs2:ahEbquj3/ w8zuye1zfgk9kblxdz7atshx3jb5...@daociyiyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: how to get files in s3 directory?

2009-06-22 Thread daociyiyou
Thank you! It seems there is no way to access s3 using the ruby or rails regular methods. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Re: redirect_back_or_default not work properly

2009-06-18 Thread daociyiyou
no one meet this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email

[Rails] Re: redirect_back_or_default not work properly

2009-06-18 Thread daociyiyou
Have resolved this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-13 Thread daociyiyou
hi Tom My ftp directory setting is right.ftp api need port to be specified? I got another error ### Net::FTPPermError (500 Illegal PORT command. ): ### My codes is ### Net::FTP.open('showreelfinder.com') do |ftp| ftp.login('heywatch','JRnu4bNtXk') ftp.chdir('thumbnail')

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-13 Thread daociyiyou
can you help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-13 Thread daociyiyou
passive mode daociyiyou wrote: hi Tom My ftp directory setting is right.ftp api need port to be specified? I got another error ### Net::FTPPermError (500 Illegal PORT command. ): ### My codes is ### Net::FTP.open('showreelfinder.com') do |ftp| ftp.login('heywatch

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-13 Thread daociyiyou
not problem with binary mode, but with your file :) tom daociyiyou wrote: Thank you very much! After changed to passive mode,it works for normal image file.But for thumbnail(binary data),i does not.The ftp api does not support binary data writing? I got the error:No such file

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-13 Thread daociyiyou
ftp api itself has binary mode ,but not support the file writingwhich itself is initially binary data? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] SocketError (getaddrinfo: Name or service not known)

2009-05-12 Thread daociyiyou
I want write image(thumbnail is binary data) to ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch directory. But i got error like following: SocketError (getaddrinfo: Name or service not known) My writing codes like this:

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-12 Thread daociyiyou
/heywatch/+encoded_video.title) tom daociyiyou wrote: Thanks. But i got another error: Net::FTPPermError (500 Unknown command. ): So i changed the codes according to my guess: ftp_host=showreelfinder.com ftp=Net::FTP.new(ftp_host,heywatch,JRnu4bNtXl

[Rails] Re: SocketError (getaddrinfo: Name or service not known)

2009-05-12 Thread daociyiyou
to...@meinlschmidt.org wrote: back, your code is wrong ftp = Net::FTP.new(ftp_host) ftp.login('username','password') ftp.chdir('/www.showreelfinder.com/web/site/temp/uploads/heywatch/') ftp.putbinaryfile(thumbnail, encoded_video.title) ftp.close tom daociyiyou wrote: Thanks. But i got another

[Rails] Re: how to ensure

2009-04-16 Thread daociyiyou
I need your help!Thanks! On Apr 16, 11:03 am, daociyiyou chey...@yahoo.com.cn wrote:  how do i get my app database info only after another server has called my app's method and  updated my app's database? Now, i can just get the database info before anther server calls my app's method. def

[Rails] Re: how to ensure

2009-04-16 Thread daociyiyou
, daociyiyou chey...@yahoo.com.cn wrote: I need your help!Thanks! On Apr 16, 11:03 am, daociyiyou chey...@yahoo.com.cn wrote:  how do i get my app database info only after another server has called my app's method and  updated my app's database? Now, i can just get the database info before

[Rails] Re: how to ensure

2009-04-16 Thread daociyiyou
hi,any one help me? On 4月16日, 下午6时00分, daociyiyou chey...@yahoo.com.cn wrote: It seems i have not show the question very clear. While my app codes is accessing the db,anohter server is updating the db. so What i want is not accessing the db until the db is updated.I think there must

[Rails] Re: how to ensure

2009-04-16 Thread daociyiyou
thanks.It seems i can not use active record callback. On 4月16日, 下午8时22分, Andrew Timberlake and...@andrewtimberlake.com wrote: 2009/4/16 daociyiyou chey...@yahoo.com.cn: hi,any one help me? On 4月16日, 下午6时00分, daociyiyou chey...@yahoo.com.cn wrote: It seems i have not show

[Rails] how to get the enclosure' url value when reading the rss feed

2009-04-16 Thread daociyiyou
how to get the enclosure' url value when reading the rss feed? I define a help method to judge if there is a enclosure in a rss item,and use it in a view,the codes are following: module EncodeHelper def enclosure?(item) if item.to_s.scan(enclosure).length 0 return true

[Rails] Re: how to get the enclosure' url value when reading the rss feed

2009-04-16 Thread daociyiyou
I have searched via google,It seems there is not a perfect tutorial abou this On Apr 17, 8:46 am, daociyiyou chey...@yahoo.com.cn wrote: how to get enclosure tag attr value? On Apr 17, 2:03 am, daociyiyou chey...@yahoo.com.cn wrote: how to get the enclosure' url value when reading the rss

[Rails] how to ensure

2009-04-15 Thread daociyiyou
how do i get my app database info only after another server has called my app's method and updated my app's database? Now, i can just get the database info before anther server calls my app's method. def one some code two some code end def two calls another server's methods and sends

[Rails] Re: how to user heywatch

2009-04-14 Thread daociyiyou
what is ping url? how it works? how to use it? anyone can help me? Thanks very much. On 4月14日, 上午11时14分, daociyiyou chey...@yahoo.com.cn wrote: hello: I have deployed a rails app : http://video-encode.herokugarden.com/encode The app uses rss to get raw video link and codes

[Rails] Re: how to user heywatch

2009-04-14 Thread daociyiyou
anyone can help me? On 4月14日, 下午4时47分, daociyiyou chey...@yahoo.com.cn wrote: what is ping url? how it works? how to use it? anyone can help me? Thanks very much. On 4月14日, 上午11时14分, daociyiyou chey...@yahoo.com.cn wrote: hello: I have deployed a rails app : http://video

[Rails] Re: how to user heywatch

2009-04-14 Thread daociyiyou
thanks On 4月14日, 下午7时22分, Phlip phlip2...@gmail.com wrote: daociyiyou wrote: anyone can help me? Post the code you are using to read this RSS feed. The code around this: url=item_array0 Discover.create( :url = url, :download = true, :title = item_array0, :automatic_encode

[Rails] how to user heywatch

2009-04-13 Thread daociyiyou
hello: I have deployed a rails app : http://video-encode.herokugarden.com/encode The app uses rss to get raw video link and codes following to discover- encode- transfer videos. ## url=item_array0 Discover.create( :url =

[Rails] about rss read error---no address associated with hostname

2009-03-17 Thread daociyiyou
I use the rss/2.0 or simple-rss gems to locally access the feed url-http://sports.espn.go.com /espn/rss/news.The code is like following: require 'rubygems' require 'simple-rss' require 'open-uri' rss = SimpleRSS.parse open('http://sports.espn.go.com

[Rails] Re: about rss read error---no address associated with hostname

2009-03-17 Thread daociyiyou
-makerpars... and you can download the pdf for reference :) On Tue, Mar 17, 2009 at 9:54 AM, daociyiyou chey...@yahoo.com.cn wrote: I use the rss/2.0 or simple-rss gems to locally access the feed url-http://sports.espn.go.com /espn/rss/news.The code is like following

[Rails] Re: about rss read error---no address associated with hostname

2009-03-17 Thread daociyiyou
I still get the following error: SocketError in My rssController#index getaddrinfo: no address associated with hostname. ### I have shut down the fire wall when running the app locally. can you help me? --~--~-~--~~~---~--~~ You received

[Rails] how to use observe_field with text_field

2009-03-05 Thread daociyiyou
#view %form_tag :action=some_action do -% table tr td%=text_field user,name-%/td td id=name_response/td %=observe_field :user_name,:update=name_response,:url= {:controller=login,:action=check_name},:with=input_name,:on=blur- % /tr /table %end-% #view the check_name method

[Rails] Re: how to use observe_field with text_field

2009-03-05 Thread daociyiyou
thanks. On 3月6日, 上午11时21分, bill walton bwalton...@gmail.com wrote: Hi, On Thu, 2009-03-05 at 18:49 -0800, daociyiyou wrote: #view %form_tag :action=some_action do -% table tr td%=text_field user,name-%/td td id=name_response/td %=observe_field :user_name,:update

[Rails] how to use the fixed part for the method url_for?

2009-02-01 Thread daociyiyou
If i have the following routes: ### map.connect blog/:controller/:action/:id map.connect product/:controller/:action/:id ## when use url_for or some else to generate the url,how to make sure that url_for use the first route to generate the url blog/articles/ show/1 ? what

[Rails] Re: how to use the fixed part for the method url_for?

2009-02-01 Thread daociyiyou
But how to do for url_for method to generate blog/articles/ show/1? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com

[Rails] Re: about copyright position

2008-12-19 Thread daociyiyou
please help me ,thank you On Dec 19, 2:07 pm, daociyiyou chey...@yahoo.com.cn wrote: On Dec 19, 12:48 pm, daociyiyou chey...@yahoo.com.cn wrote: css class ## .about-copyright2{   border-top:#6a6a6a 1px solid;   width:72%;   text-align:center;   font-size:x-small

[Rails] about copyright position

2008-12-18 Thread daociyiyou
css class ## .about-copyright2{ border-top:#6a6a6a 1px solid; width:72%; text-align:center; font-size:x-small; position:absolute; bottom:-50px; left:11%; } ### The view using this class div class=user-main %=yield-% /div div

[Rails] Re: about copyright position

2008-12-18 Thread daociyiyou
On Dec 19, 12:48 pm, daociyiyou chey...@yahoo.com.cn wrote: css class ## .about-copyright2{   border-top:#6a6a6a 1px solid;   width:72%;   text-align:center;   font-size:x-small;   position:absolute;   bottom:-50px;   left:11%;} ### The view using this class

[Rails] Re: two belongs_to relationship

2008-11-26 Thread daociyiyou
Thank you! On Nov 26, 6:00 pm, Thorsten Müller [EMAIL PROTECTED] wrote: On Nov 26, 8:34 am, daociyiyou [EMAIL PROTECTED] wrote: I have three models:User,Action,Comment.User have has_many relation with the Action,this is true.A user can make many comments for different action,an action

[Rails] two belongs_to relationship

2008-11-25 Thread daociyiyou
I have three models:User,Action,Comment.User have has_many relation with the Action,this is true.A user can make many comments for different action,an action can have many comments belonging to it.So can i use two has many and two belongs_to to set the relationship among the three models like

[Rails] html frame tag not work

2008-11-17 Thread daociyiyou
I want to make a view containing the framesetframe tag to let the part to accommodate enough info.But the rails does not support the tag.So how do i get a element that has a scroll bar? Thank you. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: about private method test

2008-11-16 Thread daociyiyou
Thank you very much! I have understood it very clearly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe

[Rails] Re: about user domain

2008-11-10 Thread daociyiyou
Thank you ! This should be the application internal implement and make me relax much more.But i have another question,how do i generate urls for diffrent domains and make them to be mapped to the same controller and action? Use the route setting and do something with the server?I ever used the

[Rails] about user domain

2008-11-06 Thread daociyiyou
and customized contents displaying.For example:if a registered user's name is daociyiyou,he will have his site url like: daociyiyou.com. My question is:different registered users have different domains,but these different domains use the same controller and actions to access their common and customized

[Rails] Re: about user domain

2008-11-06 Thread daociyiyou
anyone can tell me the key points about this problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe

[Rails] Re: about test database

2008-10-31 Thread daociyiyou
On Oct 31, 4:31 pm, Frederick Cheung [EMAIL PROTECTED] wrote: On Oct 31, 2:09 am, daociyiyou [EMAIL PROTECTED] wrote: Sort of. It is stored in the test database, but the entire test runs   within a transaction, which is rolled back at the end of the test. Fred But rolled back

[Rails] about test database

2008-10-30 Thread daociyiyou
i have a conclusion to make sure,that is : when testing codes, only the fixtures data are stored in the test database table after running the test and the model saved during runing test method is not stored in the test database table? For example: # def test_save user=User.new(...)

[Rails] Re: about test database

2008-10-30 Thread daociyiyou
Sort of. It is stored in the test database, but the entire test runs   within a transaction, which is rolled back at the end of the test. Fred But rolled back at the end of this test method or the entire controller test? You means I need not consider if the user is saved in the test

[Rails] Re: about test database

2008-10-30 Thread daociyiyou
anyone help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[Rails] array in the link

2008-10-26 Thread daociyiyou
I have an array in an view link submitted to an action.This array contains the objects which have not any relation each other,they also have no model relation.The link look like this : ### %=link_remote_to agree,:url={:action=agree,:id=[object1,object2],...}-%

[Rails] Re: about local time

2008-10-21 Thread daociyiyou
any one help me? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[Rails] about local time

2008-10-20 Thread daociyiyou
I want to read a database column value to use in my app.That is t.timestamp.I use it like this: %=user.created_at-%,but the displayed time is based on utc while what i want it to be is chinese BeiJing time.How do i manage this? set config.time_zone? The stored time data value is different from

[Rails] how to make an ajax call to redirect

2008-10-16 Thread daociyiyou
I have an ajax call method like following: ## def find_created_actions unless @if_login flash[:login]=请登录或注册 redirect_to(:controller=login,:action=login) end if @if_login @[EMAIL PROTECTED] render