[Rails] Re: is there any tutorial for pay per click system?
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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] is there any tutorial for pay per click system?
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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: no way to read image data from database
Thanks! My server do not approve the file system store,that is why using the db_file. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: no way to read image data from database
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 group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: no way to read image data from database
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. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: no way to read image data from database
it seems ---<%=image_tag(url_for (:controller=>:projects,:action=>:find_db_file,:id=>p.id))-%>--- does not display the image but the image's alt words.when i right- click the alt words to check the image,i get the the url for the find_db_file action.Is this problem related with the database? On Nov 2, 11:30 am, daociyiyou 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 wrote: > > > I don't know exactly what errors you are seeing but... > > > On Sun, Nov 1, 2009 at 11:05 AM, daociyiyou 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 and filename in > > your table. > > > > controller > > > def find_db_file > > > project=Project.find_by_id(params[:id]) > > > project_snapshot=project.project_snapshot > > > send_data(project_snapshot.db_file.data, > > > :type => project_snapshot.content_type, > > > :filename => project_snapshot.filename, > > > :disposition => 'inline') > > > end > > > controller > > > > view--- > > > <%for p in @projects -%> > > > <%=image_tag(url_for > > > (:controller=>:projects,:action=>:find_db_file,:id=>p.id))-%> > > > <%end-%> > > > view--- > > > > I try my best to display the image data in the database,but fail.It > > > seems everything is right.Even try from mysql to sqlite not works.This > > > really let me down. > > > --www.abetaday.com --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: no way to read image data from database
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 wrote: > I don't know exactly what errors you are seeing but... > > On Sun, Nov 1, 2009 at 11:05 AM, daociyiyou 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 and filename in > your table. > > > > > controller > > def find_db_file > > project=Project.find_by_id(params[:id]) > > project_snapshot=project.project_snapshot > > send_data(project_snapshot.db_file.data, > > :type => project_snapshot.content_type, > > :filename => project_snapshot.filename, > > :disposition => 'inline') > > end > > controller > > > view--- > > <%for p in @projects -%> > > <%=image_tag(url_for > > (:controller=>:projects,:action=>:find_db_file,:id=>p.id))-%> > > <%end-%> > > view--- > > > I try my best to display the image data in the database,but fail.It > > seems everything is right.Even try from mysql to sqlite not works.This > > really let me down. > > --www.abetaday.com --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] no way to read image data from database
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 send_data(project_snapshot.db_file.data, :type => project_snapshot.content_type, :filename => project_snapshot.filename, :disposition => 'inline') end controller view--- <%for p in @projects -%> <%=image_tag(url_for (:controller=>:projects,:action=>:find_db_file,:id=>p.id))-%> <%end-%> view--- I try my best to display the image data in the database,but fail.It seems everything is right.Even try from mysql to sqlite not works.This really let me down. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: rails-authorization-plugin
Thank you! I am reading it now. On 7月1日, 上午4时23分, Colin Law wrote: > 2009/6/30daociyiyou: > > > > > 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 method,if not,redirect to access denied > > page,right? If what i think is right,what is has_role? method? > > The rails-authorization-plugin doc does not show themselves very > > clear and there is not tutorial by google. > > I still don't know about this plugin I am afraid but have you seen the > instructions > athttp://github.com/DocSavage/rails-authorization-plugin/tree/master/ > > Colin --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: rails-authorization-plugin
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 this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: rails-authorization-plugin
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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] rails-authorization-plugin
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 method,if not,redirect to access denied page,right? If what i think is right,what is has_role? method? The rails-authorization-plugin doc does not show themselves very clear and there is not tutorial by 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-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to get files in s3 directory?
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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to get files in s3 directory?
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 to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: redirect_back_or_default not work properly
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 to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: redirect_back_or_default not work properly
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 to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] redirect_back_or_default not work properly
I use rails2.3 and restful_authentication-plugin.I use the redirect_back_or_default action like this redirect_back_or_default ('/') ,that is-it assumes not login now,if login directly,redirect to homepage,if not,redirect back to the previous page.But redirect_back_or_default action always redirects to the homepage despite of the latter situtaion:previous page. I know the fact that if access denys,the store_location should be called by login-required action. But it seems does not works actually. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
hi tom I have resolved the problem by writing the binary data in the local file and transfer it to the ftp. On 5月14日, 上午2时31分, Tom Z Meinlschmidt wrote: > "I got the error:No such file or directory" > > it's 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 or > > directory > > > On 5月14日, 上午12时13分, Tom Z Meinlschmidt wrote: > >> try to set 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','JRnu4bNtXk') > >>> ftp.chdir('thumbnail') > >>> ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > >>> ### > >>> I have tried my best.My server forbids ftp access or my computer > >>> occupied the 21 port? > >>> Ftp really make me like a idiot. > >>> === > >> -- > >> === > >> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > >> - experienced RoR/PHP freelancer, available for hire > > >>www.meinlschmidt.comwww.maxwellrender.czwww.lightgems.cz > >> === > > -- > === > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
ftp api itself has binary mode ,but not support the file writing which itself is initially binary data? not support binary data writing? I got the error:No such file or directory On 5月14日, 上午2时31分, Tom Z Meinlschmidt wrote: > "I got the error:No such file or directory" > > it's 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 or > > directory > > > On 5月14日, 上午12时13分, Tom Z Meinlschmidt wrote: > >> try to set 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','JRnu4bNtXk') > >>> ftp.chdir('thumbnail') > >>> ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > >>> ### > >>> I have tried my best.My server forbids ftp access or my computer > >>> occupied the 21 port? > >>> Ftp really make me like a idiot. > >>> === > >> -- > >> === > >> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > >> - experienced RoR/PHP freelancer, available for hire > > >>www.meinlschmidt.comwww.maxwellrender.czwww.lightgems.cz > >> === > > -- > === > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
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 or directory On 5月14日, 上午12时13分, Tom Z Meinlschmidt wrote: > try to set 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','JRnu4bNtXk') > > ftp.chdir('thumbnail') > > ftp.putbinaryfile('public/images/rails.png',encoded_video.title) > > ### > > > I have tried my best.My server forbids ftp access or my computer > > occupied the 21 port? > > Ftp really make me like a idiot. > > > === > > -- > === > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > >www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
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') ftp.putbinaryfile('public/images/rails.png',encoded_video.title) ### I have tried my best.My server forbids ftp access or my computer occupied the 21 port? Ftp really make me like a idiot. === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
Thanks. I have changed the wrong codes but got the third error: ## Net::FTPPermError (550 Failed to change directory. ) # My ftp complete directory is ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/ On 5月13日, 上午12时29分, Tom Z Meinlschmidt 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 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") > > ftp.login > > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > >www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > ftp.close > > > > > I still get the error: > > > > > Net::FTPPermError (500 Unknown command. ): > > > > I want write the binary data(thumbnail) to the ftp address ("ftp:// > > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > > heywatch/"+encoded_video.title),the encoded_video.title file does not > > exist on ftp server. > > so how do i manage? > > -- > === > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > >www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
I have changed to ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/ web/site/temp/uploads/heywatch/"+encoded_video.title) and still got that error. Then i changed to ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/web/site/temp/ uploads/heywatch/"+encoded_video.title+".jpg") The same error happend. On 5月13日, 上午12时25分, Tom Z Meinlschmidt wrote: > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > change to > > ftp.putbinaryfile(thumbnail,"/www.showreelfinder.com/web/site/temp/uploads/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") > > ftp.login > > ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ > >www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) > > ftp.close > > > > > I still get the error: > > > > > Net::FTPPermError (500 Unknown command. ): > > > > I want write the binary data(thumbnail) to the ftp address ("ftp:// > > showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ > > heywatch/"+encoded_video.title),the encoded_video.title file does not > > exist on ftp server. > > so how do i manage? > > -- > === > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > - experienced RoR/PHP freelancer, available for hire > >www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > === --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: SocketError (getaddrinfo: Name or service not known)
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") ftp.login ftp.putbinaryfile(thumbnail,"ftp://showreelfinder.com/ www.showreelfinder.com/web/site/temp/uploads/heywatch/"+encoded_video.title) ftp.close I still get the error: Net::FTPPermError (500 Unknown command. ): I want write the binary data(thumbnail) to the ftp address ("ftp:// showreelfinder.com/www.showreelfinder.com/web/site/temp/uploads/ heywatch/"+encoded_video.title),the encoded_video.title file does not exist on ftp server. so how do i manage? --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] SocketError (getaddrinfo: Name or service not known)
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: ftp_host="ftp://showreelfinder.com"; ftp=Net::FTP.new(ftp_host,"heywatch","JRnu4bNtXl") ftp.login ftp.putbinaryfile(thumbnail,"www.showreelfinder.com/web/site/temp/ uploads /heywatch"+encoded_video.title)#thumbnail is binary data ftp.close ### puttextfile(localfile, remotefile = File.basename(localfile)) {| line| ...},the localfile params can not be binary data? or remotefile must exist on ftp server? Thanks! --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to get the enclosure' url value when reading the rss feed
I have searched via google,It seems there is not a perfect tutorial abou this On Apr 17, 8:46 am, daociyiyou wrote: > how to get enclosure tag attr value? > > On Apr 17, 2:03 am, daociyiyou wrote: > > > 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(" 0 > > return true > > else > > return false > > end > > end > > end > > # > > the view codes: > > <%if enclosure?(item)-%> > > > > Download: > > > > <%=item.enclosure.url-%> > > > > > > <%end-%> > > ## > > I got nothing about enclosure's url value and display,but indeed,there > > are enclosure tag in the rss page source code (http://drop.io/ > > eupdibcj58n5ywbpuzwa/0d231f619d5e84fd1f4c3ab90465915f5e5e665f/ > > showreelfinder.rss). > > How to manage it? Thanks! --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to get the enclosure' url value when reading the rss feed
how to get enclosure tag attr value? On Apr 17, 2:03 am, daociyiyou wrote: > 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(" 0 > return true > else > return false > end > end > end > # > the view codes: > <%if enclosure?(item)-%> > > Download: > > <%=item.enclosure.url-%> > > > <%end-%> > ## > I got nothing about enclosure's url value and display,but indeed,there > are enclosure tag in the rss page source code (http://drop.io/ > eupdibcj58n5ywbpuzwa/0d231f619d5e84fd1f4c3ab90465915f5e5e665f/ > showreelfinder.rss). > How to manage it? Thanks! --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to get the enclosure' url value when reading the rss feed
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(" 0 return true else return false end end end # the view codes: <%if enclosure?(item)-%> Download: <%=item.enclosure.url-%> <%end-%> ## I got nothing about enclosure's url value and display,but indeed,there are enclosure tag in the rss page source code (http://drop.io/ eupdibcj58n5ywbpuzwa/0d231f619d5e84fd1f4c3ab90465915f5e5e665f/ showreelfinder.rss). How to manage it? Thanks! --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to ensure
thanks.It seems i can not use active record callback. On 4月16日, 下午8时22分, Andrew Timberlake wrote: > 2009/4/16 daociyiyou : > > > > > > > hi,any one help me? > > > On 4月16日, 下午6时00分, daociyiyou 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 be a ruby or rails method to do it, but can not find it. > >> Thanks! > > >> On Apr 16, 2:12 pm, daociyiyou wrote: > > >> > I need your help!Thanks! > > >> > On Apr 16, 11:03 am, daociyiyou 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 one > >> > > some code > >> > > two > >> > > some code > >> > > end > > >> > > def two > >> > > calls another server's methods and sends my app ping url(http:// > >> > > myhost/.../three) that will be automaticlly called by that server > >> > > after executing the two method > >> > > end > > >> > > def three > >> > > another server calls this method and updates database > >> > > end > > Because of the way Rails is usually deployed, this will be very difficult. > When Rails is first called and the code starts to execute, it is in instance > #1 > It then runs through the code and calls a method that invokes the > remote service. > (now you want it to wait) > When the remote service calls back, because instance #1 is busy, it > will invoke the method on instance #2 which has no knowledge of > instance #1 or it's waiting. > > Two quick ways I can think of to solve this. > 1. Don't let the remote service update the database, get it to return > the data and you update the database within the same method call so > you're always in control > 2. If that's not possible, return from the method and use AJAX or a > page refresh to check if the remote service has done what it should > and display the results after that. > > Andrew > Timberlakehttp://ramblingsonrails.comhttp://www.linkedin.com/in/andrewtimberlake > > "I have never let my schooling interfere with my education" - Mark Twain --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to ensure
hi,any one help me? On 4月16日, 下午6时00分, daociyiyou 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 be a ruby or rails method to do it, but can not find it. > Thanks! > > On Apr 16, 2:12 pm, daociyiyou wrote: > > > I need your help!Thanks! > > > On Apr 16, 11:03 am, daociyiyou 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 one > > > some code > > > two > > > some code > > > end > > > > def two > > > calls another server's methods and sends my app ping url(http:// > > > myhost/.../three) that will be automaticlly called by that server > > > after executing the two method > > > end > > > > def three > > > another server calls this method and updates database > > > end --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to ensure
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 be a ruby or rails method to do it, but can not find it. Thanks! On Apr 16, 2:12 pm, daociyiyou wrote: > I need your help!Thanks! > > On Apr 16, 11:03 am, daociyiyou 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 one > > some code > > two > > some code > > end > > > def two > > calls another server's methods and sends my app ping url(http:// > > myhost/.../three) that will be automaticlly called by that server > > after executing the two method > > end > > > def three > > another server calls this method and updates database > > end --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to ensure
I need your help!Thanks! On Apr 16, 11:03 am, daociyiyou 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 one > some code > two > some code > end > > def two > calls another server's methods and sends my app ping url(http:// > myhost/.../three) that will be automaticlly called by that server > after executing the two method > end > > def three > another server calls this method and updates database > end --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to ensure
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 my app ping url(http:// myhost/.../three) that will be automaticlly called by that server after executing the two method end def three another server calls this method and updates database end --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to user heywatch
thanks On 4月14日, 下午7时22分, Phlip 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 => true, > >>> :format_id => format_hash[:if_flv], > >>> :ftp_directive => "") > > And your question is not entirely about Rails itself. Please study other > successful questions here... --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to user heywatch
anyone can help me? On 4月14日, 下午4时47分, daociyiyou 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 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 following to > > discover- encode- transfer videos. > > ## > > url=item_array0 > > Discover.create( :url => url, > > :download => true, > > :title => item_array0, > > :automatic_encode => true, > > :format_id => format_hash[:if_flv], > > :ftp_directive => "") > > # > > But after running these codes, i need to know the success or fail info > > to take steps.If fails,execute one fail-related method,if > > success,execute one suc-related method. > > 1 So what is ping url? how it works? how to use it? > > 2 Can you give me a way to get the suc/fail info after discover encode > > transfer a video?. > > 3 Can you give me a tutorial about how to use heywatch instead of > > hewwatch itself's > > I have read the heyewatch.com again and again,but can not resolve my > > problem.Thank you very much --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to user heywatch
what is ping url? how it works? how to use it? anyone can help me? Thanks very much. On 4月14日, 上午11时14分, daociyiyou 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 following to > discover- encode- transfer videos. > ## > url=item_array0 > Discover.create( :url => url, > :download => true, > :title => item_array0, > :automatic_encode => true, > :format_id => format_hash[:if_flv], > :ftp_directive => "") > # > But after running these codes, i need to know the success or fail info > to take steps.If fails,execute one fail-related method,if > success,execute one suc-related method. > 1 So what is ping url? how it works? how to use it? > 2 Can you give me a way to get the suc/fail info after discover encode > transfer a video?. > 3 Can you give me a tutorial about how to use heywatch instead of > hewwatch itself's > I have read the heyewatch.com again and again,but can not resolve my > problem.Thank you very much --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to user heywatch
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 => url, :download => true, :title => item_array0, :automatic_encode => true, :format_id => format_hash[:if_flv], :ftp_directive => ””) # But after running these codes, i need to know the success or fail info to take steps.If fails,execute one fail-related method,if success,execute one suc-related method. 1 So what is ping url? how it works? how to use it? 2 Can you give me a way to get the suc/fail info after discover encode transfer a video?. 3 Can you give me a tutorial about how to use heywatch instead of hewwatch itself's I have read the heyewatch.com again and again,but can not resolve my problem.Thank you very much --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about rss read error---no address associated with hostname
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 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about rss read error---no address associated with hostname
thank you! Perhaps i should require all the rss related library.But is it because i run the app locally instead of on the server? On 3月17日, 下午3时57分, Sumanth Krishna wrote: > Hi, Refer to this > post!http://sumanthtechsavvy.blogspot.com/2008/08/ror-course-rss-makerpars... > and you can download the pdf for reference :) > > > > On Tue, Mar 17, 2009 at 9:54 AM, daociyiyou 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: > > > >require 'rubygems' > >require 'simple-rss' > >require 'open-uri' > > >rss = SimpleRSS.parse open('http://sports.espn.go.com /espn/rss/ > > news') > >puts("---Channel---#{rss.channel.title}") > > > > > But when i run the code locally,it appear an error: > > > > > no address associated with hostname > > ### > > > I have tried other rss feed url offered on site > >http://sports.espn.go.com/espn/news/story?page=rssinfo,butthe same > > error still happens. > > -- > -- > Thanks & Regards, > Sumanth Krishna. A > +358 40 3276564 > > Blogs: > TwinclingCommunity: > > http://sumanthtechsavvy.blogspot.com/ > http://www.twincling.org/node/227 > > http://yourway2health.blogspot.com/ >http://www.osef.twincling.org --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about rss read error---no address associated with hostname
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 /espn/rss/ news') puts("---Channel---#{rss.channel.title}") But when i run the code locally,it appear an error: no address associated with hostname ### I have tried other rss feed url offered on site http://sports.espn.go.com/espn/news/story?page=rssinfo,but the same error still happens. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to use observe_field with text_field
thanks. On 3月6日, 上午11时21分, bill walton wrote: > Hi, > > On Thu, 2009-03-05 at 18:49 -0800, daociyiyou wrote: > > #view > > <%form_tag :action=>"some_action" do -%> > > > > > ><%=text_field "user","name"-%> > > > ><%=observe_field :user_name,:update=>"name_response",:url=> > > You're using form_tag which means that the params hash is not bound to > an object. Both your text_field syntax and your observe_field syntax > assume otherwise. Make them match. Also, you're headed for nothing but > trouble trying to use Ajax on tables. Microsoft controls how tables > work. And they don't work well with Ajanx. > > HTH, > Bill --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to use observe_field with text_field
#view <%form_tag :action=>"some_action" do -%> <%=text_field "user","name"-%> <%=observe_field :user_name,:update=>"name_response",:url=> {:controller=>"login",:action=>"check_name"},:with=>"input_name",:on=>"blur"- %> <%end-%> #view the check_name method just renders a partial to response the ajax. the observe_field works properly when it is used for select ,but not for text_filed.i can not see any event to be invoked and not be able to debug.i have searched the forum to get answer,but seems not to find it about it.thanks. --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: how to use the fixed part for the method url_for?
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 To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to use the fixed part for the method url_for?
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 to add to the url_for(:controller=>"articles",:action=>"show",:id=>"1") ? like this? url_for (:controller=>"articles",:action=>"show",:id=>"1",:anchor=>"blog") --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about copyright position
please help me ,thank you On Dec 19, 2:07 pm, daociyiyou wrote: > On Dec 19, 12:48 pm, daociyiyou 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 > > > > > > <%=yield-%> > > > > > > gy...@126.com > > ©2008 > > > > ## > > > The tag has dynamic content,so when the > > content in this tag changes,i want the tag to be left at the bottom of the dynamic content.The css > > class giving above is unable to realize the position requirement,how > > do i manage? > > Thank you ! > > 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about copyright position
On Dec 19, 12:48 pm, daociyiyou 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 > > > <%=yield-%> > > > gy...@126.com > ©2008 > > ## > > The tag has dynamic content,so when the > content in this tag changes,i want the tag to be left at the bottom of the dynamic content.The css > class giving above is unable to realize the position requirement,how > do i manage? > Thank you ! 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about copyright position
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 <%=yield-%> gy...@126.com ©2008 ## The tag has dynamic content,so when the content in this tag changes,i want the tagto be left at the bottom of the dynamic content.The css class giving above is unable to realize the position requirement,how do i manage? Thank you ! --~--~-~--~~~---~--~~ 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 rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: two belongs_to relationship
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 can have many comments belonging to it.So > > can i usetwohas many andtwobelongs_toto set the relationship > > among the three models like following? > > has_many :comments in User model > > has_many :comments in Action model > >belongs_to:user > >belongs_to:action in the Comment model. > > > That is the Comment hastwoforeign keys. > > Sure, that's no problem. The Comments belong to a User and an Action > That's a quite common thing, lots of comments, blog entries or similar > things belong to Users and any kind of List, Group or whatever. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] two belongs_to relationship
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 following? has_many :comments in User model has_many :comments in Action model belongs_to :user belongs_to :action in the Comment model. That is the Comment has two foreign keys. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] using javascript to accomplish the ajax for will_paginate
To use the ajax replacing some html element's content for my pagination,I user some js codes like following ,but pagination still work like a normal call,not ajax. How do i manage? > > document.observe("dom:loaded", function() { >// pagination is the class will_paginate wraps around the links >$$('.pagination').each(function(pagination) { > // let's put the observer on the div element and not all the > links, your browser will thank you > pagination.observe('click', function(e) { >var clicked = $(e.target); >// time to see if the clicked item was indeed one of the links >if(clicked.match('a')) { > // if it was, stop the default page refresh and fire an ajax > request instead > // let's not forget a RESTful design wants use to use GET > instead of the default POST method > e.stop(); > /new Ajax.Updater('element_id',clicked.href,{method:'get'}); >} > }) >}); > > } > --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] html tag not work
I want to make a view containing the 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 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about private method test
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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about private method test
For the methods defined as private,we need to test it? For the reason that the private methods are used within the public methods,so we need not to test the private methods as long as the public methods are tested? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about user domain
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 route ,but not for this problem.Can i manage it like this? On Nov 10, 6:53 pm, DHH <[EMAIL PROTECTED]> wrote: > > 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 contents.How do i manage this? use the > > rails route to deploy? but how to deploy? In addition,do i have to do > > somthing with the server setting?Thank you for your help. > > Use the domain to lookup the account model and base everything off > that. For example: > > class ApplicationController < ActionController::Base > before_filter :set_application > > private > def set_application > @application = Application.find_by_domain(request.domain) > end > end > > class ArticlesController < ApplicationController > def index > @articles = @application.articles > end > > def show > @article = @application.articles.find(params[:id]) > end > end --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about user domain
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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about user domain
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 from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about user domain
I have an application which has the common content sharing and customized content for the registered users,the registered user use his control panel to make his customized part for the app.When anyone browse this registered user's site using the user's domain,the site has app's common 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 contents.How do i manage this? use the rails route to deploy? but how to deploy? In addition,do i have to do somthing with the server setting?Thank you for your 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about test database
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 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 database table in the following test methods because the user > > is not in the database at that time? > > If the user is still in the database in the following test methods.i > > need to consider it because of my application’s logic. > > Take a look in your app's test.log and you'll see for yourself. > > Fred Thank you ,i have found the following words:[4;36;1mSQL (0.032000) [0m[0;1mROLLBACK [0m --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about test database
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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about test database
> > 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 database table in the following test methods because the user is not in the database at that time? If the user is still in the database in the following test methods.i need to consider it because of my application’s logic. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about test database
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(...) user.save end ## After running the test method,the user is not stored in the test database table? right? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] array in the link
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],...}-%> ### In the action,how do i parse the params[:id] ?,object1=params[:id][0] and object2=params[:id][1]? It is wrong.I check the development log,id was submitted like this : "2/5".So who can 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] irb command window
how to exit from the rails irb command line? ctr+c not work for this. --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] Re: about local time
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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] about local time
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 the displayed time data value? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---
[Rails] how to make an ajax call to redirect
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 :partial=>"created_actions",:object=>@user_cactions end end ### I hope when some condition met,the call will let some partial replace the html element's content,this works now.When the condition is not met,i hope redirect to another controller's action,not replace something.but in fact,that action's template replace the html element's content,this is not the result i want.How do i manage this? --~--~-~--~~~---~--~~ 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 PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---