sharath chander punthambekar
2010-Sep-28 07:12 UTC
Re: Digest for rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org - 25 Messages in 11 Topics
Hello ROR users: I would like to start a new discussion on the "Future of MySQL with Oracle" I feel this issue has a critical impact on opensource developers like you & me. We need to explore the option of developing SQLLIte3 to the level of MySql if required. Any update on "Letter to the EC opposing Oracle''s acquisition of MySQL" by KEI? http://keionline.org/ec-mysql Regards Sharath sharath.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On Mon, Sep 27, 2010 at 6:39 PM, <rubyonrails-talk+noreply-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bnoreply@googlegroups.com>> wrote:> Today''s Topic Summary > > Group: http://groups.google.com/group/rubyonrails-talk/topics > > - design decision<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_0>[2 Updates] > - STI, xml/xslt, or ? for many custom forms/templates<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_1>[1 Update] > - problem in using xsendfile apche+mongrel<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_2>[6 Updates] > - Rails 3 - Creating a comment and then returning the Partial with JUST > the new comment<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_3>[2 Updates] > - Rails 3 + jQuery ; How to show error messages<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_4>[1 Update] > - Question about securing videos<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_5>[3 Updates] > - rails3 validate email format<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_6>[6 Updates] > - Freelancers: small site implementation<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_7>[1 Update] > - rails3 customized error message<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_8>[1 Update] > - Changing app from Rails 3 RC to final<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_9>[1 Update] > - Multipe Combo box Query System<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_group_thread_10>[1 Update] > > Topic: design decision<http://groups.google.com/group/rubyonrails-talk/t/f257c10a4b2267c4> > > ssmithstone <stephen.smithstone-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 05:29AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Trying to make my controllers as skinny as possible , so come across a > design issue if I want to send out an email when a model is created > would I put this functionality on the after_create method or inside of > the controller after the #save method > > > > > Ar Chron <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 03:03PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > If I understand the requirement, then the creation of an e-mail is the > business of the model. > > Controller should be deciding "After creation of model X, what view > does > the user see? To the index view, the show view of the model just > created, or back to the view the user was at before creating the > model?" > > -- > Posted via http://www.ruby-forum.com/. > > > > Topic: STI, xml/xslt, or ? for many custom forms/templates<http://groups.google.com/group/rubyonrails-talk/t/f86966d051b4339> > > AppleII717 <salex-ee4meeAH724@public.gmane.org> Sep 27 06:00AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > I''m considering porting an application to RoR. The application is > basically a "Order Entry" type system for the Interior Designer > vertical market. The existing application has a table with over 400 > column! (not my design!). The majority of these columns are > measurements and descriptions for a certain types of product > categories (e.g., "Draperies","Sheer Draperies", > "Upholstery","Pillows","Lampshades", etc) > > Each one of these categories (25+) has a custom form that display the > measurement attributes for that category. To make things worse, > there''s a lot of javascript that enables/disables/shows/hides areas/ > fields. There is some sharing of attributes (width, height, length, > size, for example). I can cut down the javascript by creating more > categories - for instance there are 3 types of "Sheer Draperies". > > I alway though that these "Category Details" didn''t need to be stored > individually in a record, but serialized in a "Details" fields. Now > the basic question is what would be the best approach? > > I''ve never done xml/xslt type forms and don''t know how difficult that > would be. > > I''ve experimented with what could be considered "Tableless STI" and it > works, but with a few gotcha''s. For instance: > > class Detail < ActiveRecord::Base > def self.columns > @columns ||= []; > end > ... rest of tableless stuff > #common attributes > column :type, :string > column :category, :string > column :workroom_material_reference, :text > column :description, :string > .... > end > > > class Carpet < Detail > column :style, :string > column :quanity, :integer > column :yards, :float > end > > The tableless approach would not allow me to create a new Carpet > without first doing Detail.new. There were other problems that I > hacked around, like defining def self.new_category(category) that > creates new ActiveRecord objects for both the basic attributes and the > category attributes. Maybe if I used a real table, some of those > problems would go away. > > That approach is livable, but was wondering if I am totally missing a > better approach? > > Anyway, I know I am still going to have a couple hundred date elements > to deal with and a bunch of partials. > > Anyone want to point me in a different direction? > > Steve Alex > > > > Topic: problem in using xsendfile apche+mongrel<http://groups.google.com/group/rubyonrails-talk/t/41967531a6301f89> > > Amit Tomar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 10:00AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Hii All, i loaded mod_xsendfile.so in apche , i added few line in > httpd.conf files > > LoadModule xsendfile_module modules/mod_xsendfile.so > > XSendFile on > > XSendFileAllowAbove on > > <VirtualHost * localhost:80> > ServerName src > > DocumentRoot C:/InstantRails-2.0-win/rails_apps/src/public/ > > ProxyPass / http://localhost:3000/ > > ProxyPassReverse / http://localhost:3000/ > > </VirtualHost > > > now in my rails application i have a streams controller and inside > streams controller i have a function named download ,code for code > download is below > > def download > > @stream = Stream.find(params[:id]) > > filename = "#{@stream.location}" > > response.headers[''Content-Type''] = "application/force-download" > > response.headers[''Content-Disposition''] = "attachment; > filename=\"#{File.basename(filename)}\"" > > response.headers["X-Sendfile"] = @stream.location > > response.headers[''Content-length''] = File.size(filename) > > render :nothing => true > > end > > Problem is my rails application still handling this request but i would > like apache to handle this request ,can anyone tell me how i configure > apche to handle this request?? > -- > Posted via http://www.ruby-forum.com/. > > > > > Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 03:34AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > > > Problem is my rails application still handling this request but i > would > > like apache to handle this request ,can anyone tell me how i > configure > > apche to handle this request?? > > So what happens when you hit that controller ? (and did you notice > that rails'' send_file method has an x_sendfile option) > > Fred > > > > > Amit Tomar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 01:28PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Frederick Cheung wrote: > > > So what happens when you hit that controller ? (and did you notice > > that rails'' send_file method has an x_sendfile option) > > > Fred > > Fred thanks for responding > Actully when i downloding files,mongrel rendering things, > > Processing StreamsController#download (for 127.0.0.1 at 2010-09-27 > 16:50:47) [GET] > Parameters: {"id"=>"6655"} > ?[4;36;1mSQL (0.0ms)?[0m ?[0;1mSET NAMES ''utf8''?[0m > ?[4;35;1mSQL (0.0ms)?[0m ?[0mSET SQL_AUTO_IS_NULL=0?[0m > ?[4;36;1mStream Columns (0.0ms)?[0m ?[0;1mSHOW FIELDS FROM > `streams`?[0m > ?[4;35;1mStream Load (0.0ms)?[0m ?[0mSELECT * FROM `streams` WHERE > (`streams`.`id` = 6655) ?[0 > Completed in 78ms (View: 0, DB: 0) | 200 OK > [http://src/streams/download/6655] > > It is when i am trying to download 2.2GB of file ,file is downloaded > completely,but my worry is why mongrel is rendering things if apache is > > handling download > -- > Posted via http://www.ruby-forum.com/. > > > > > Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 05:29AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > > > It is when i am trying to download 2.2GB of file ,file is downloaded > > completely,but my worry is why mongrel is rendering things if apache > is > > handling download > > That looks entirely normal to me - your rails code does need to be > invoked at some point in order for it to tell apache which file to > send. > > Fred > > > > > Amit Tomar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 02:36PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Frederick Cheung wrote: > > invoked at some point in order for it to tell apache which file to > > send. > > > Fred > > But Fred lot of experts are saying ,mongerl doesn''t render anything > while apche handle the request and one more thing how do i make sure > apache is handling is request?? > -- > Posted via http://www.ruby-forum.com/. > > > > > Michael Schuerig <michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org> Sep 27 02:52PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > On Monday 27 September 2010, Amit Tomar wrote: > > > But Fred lot of experts are saying ,mongerl doesn''t render anything > > while apche handle the request and one more thing how do i make sure > > apache is handling is request?? > > Amir, I''m not sure, but you might be misunderstanding what xsendfile is > > for and how it works. This mechanism is not intended to serve > "ordinary" > static files located in the public directory of an application. Rather, > > it is a way for your controller to hand off serving a file to Apache > instead of doing it from within Rails. > > So, your controller *has* to be involved. It''s the job of the > controller > action to decide which file to return in the response and then call > send_file with that file as a parameter. In the production environment, > > this has the effect that the Rails process does not respond with the > file itself. Instead, Rails sets a special header which in turn is > picked up by Apache (or nginx, lighttpd) and interpreted in such a way > that it now serves the named file. > > Michael > > -- > Michael Schuerig > mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org > http://www.schuerig.de/michael/ > > > > Topic: Rails 3 - Creating a comment and then returning the Partial with > JUST the new comment<http://groups.google.com/group/rubyonrails-talk/t/6c7a13d86a40cf70> > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:10AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Have you tried passing in locals for the partial? > > Not sure how Rails 3 does it, but Rails 2 its > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > {:comment => @comment))%> > > -sunny > http://ezror.com > -- > Posted via http://www.ruby-forum.com/. > > > > > radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 08:45AM -0400 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > @sunny @comment does not exists inside the create action, and he needs > to > iterate over a collection , @comments > > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > {:comments =>fill the comments collection...))%> > > > or > > > @comment = lots of stuff going on here but it works... > @comments = fill the comments collection.. > if @comment.save > flash[:notice] = "Successfully created comment." > respond_to do |format| > format.js > end > end > > then > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > {:comments => @comments))%> > > > @comments does not exists inside the response from create.js.erb so you > have > to build it there or in the controller''s create action before the > respond_to > block > > > you can check my example > > http://github.com/rbritom/Simple_polymorphic_nested_comments > > > > Topic: Rails 3 + jQuery ; How to show error messages<http://groups.google.com/group/rubyonrails-talk/t/a4d06aee3a377278> > > mrpink <sonke-BUxYPcb8F0Brl1BoWd1lEg@public.gmane.org> Sep 27 05:44AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Hi guys, > > can anyone explain how to show error_messages_on (like back in Rails > 2 , without Ajax) fields that didnt'' pass the validation the jquery > way. > > I googled for about 2 hours now and found nothing. Jquery works fine > and adds the content to my table, but im totally stuck with the whole > error/validation thing. > > My form looks like this: > > <%= form_for Translation.new , :remote => true do |f| %> > <table> > <tr> > <td> > <%= f.label :locale %><br /> > <%= f.text_field :locale %> > > </td> > <td> > <%= f.label :key %><br /> > <%= f.text_field :key %> > </td> > </tr> > <tr> > <td> > <%= f.label :value %><br /> > <%= f.text_area :value , :rows => 3%> > </td> > <td> > <%= f.label :interpolations %><br /> > <%= f.text_area :interpolations, :rows => 3 %> > </td> > </tr> > <tr> > <td> > <%= f.label :is_proc %><br /> > <%= f.check_box :is_proc %> > </td> > <td></td> > </tr> > </table> > <p><%= f.submit t(''translation.create'') %></p> > <% end %> > > Create action like this: > def create > if @translation.save > flash[:notice] = "Successfully created translation." > respond_to do |format| > format.html { redirect_to @translation } > format.js > end > else > respond_to do |format| > format.html { render :action => ''new''} > # show what went wrong with jquery > end > end > end > > and create.js.erb > /* Insert a notice between the last comment and the comment form */ > $("#translation-notice").html(''<div class="flash notice"><%> escape_javascript(flash.delete(:notice)) %></div>''); > > /* Add the new comment to the bottom of the comments list */ > $("#translations").prepend("<%> escape_javascript(render(@translation)) %>"); > > /* Highlight the new comment */ > $("#translation-<%= @translation.id %>").effect("highlight", {}, > 3000); > > /* Reset the comment form */ > $("#new_translation")[0].reset(); > > Adding validated data works but please give me hint with error > validation thing. > > thanks > > > > Topic: Question about securing videos<http://groups.google.com/group/rubyonrails-talk/t/d1e17bf9ee0a24ab> > > egervari <ken.egervari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 26 02:43PM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Assuming you want to stream some flv videos, what is the best way to > secure them via authentication while also embedding them in some kind > of web flash player? > > > > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:22AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > I''m having the same trouble with securing my videos for my latest app. > A > simple before_filter can stop the user from accessing the page, but > once > the video streams via a web player, the user can easily steal it. > > Only solution I can think of is to use amazon s3''s url expiration, but > that gets overly complicated. > > -sunny > http://ezror.com > -- > Posted via http://www.ruby-forum.com/. > > > > > Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Sep 27 08:23AM -0400 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Here''s a good walk-through explaining some solutions to this problem. > Basically, you create a view that streams the file to the visitor with > send_file from a protected location -- not the usual public/system > space enjoyed by a normal Paperclip install. > > > http://everydayrails.com/2010/07/08/authenticated-attachments-paperclip-rails.html > > Walter > > On Sep 27, 2010, at 5:22 AM, Sunny Ezror wrote: > > > > > Topic: rails3 validate email format<http://groups.google.com/group/rubyonrails-talk/t/eb10cc19689b3ea0> > > Ugis Ozols <ugis.ozolss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 02:01AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > I''m using this: > > :format => { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i } > > > > > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:19AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > I use whatever that comes with restful_authentication scaffold > generator > and for the most part it works fine for me: > /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i > > If you want to learn more about this or more control over it, I suggest > > you read http://www.regular-expressions.info/email.html > > -sunny > http://ezror.com > -- > Posted via http://www.ruby-forum.com/. > > > > > "Felix Schäfer" <schaefer-SjIeUF6ADzXby3iVrkZq2A@public.gmane.org> Sep 27 11:51AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Am 26.09.2010 um 18:54 schrieb Nadal: > > > I am working on a rails3 project. Is there a tool to validate the > > format of email address. It does not have to be fancy regex. Just a > > few simple validations. However I don''t want to reinvent the wheel? > > Using a regex to validate an email format is in most cases a bad idea, > the 2 proposed regexes won''t for example recognize quoted local parts, which > are valid (e.g. "foo@bar"@rails.info is a valid address). There''s a > validate_email_format_of plugin on github[1] which works fine on rails2, I > think there is a branch/fork for rails3 somewhere too. Another method would > be to just drop an EmailValidator into your lib so that you can reuse it at > other places in your rails app, have a look at [2] (yes, it still is a regex > and only matches what the RFC refers to as "addr-spec" as opposed to a > "full" address, but a not-so-bad one). > > Anyway, I''m a little surprised that rails3 having gone from TMail to > Mail hasn''t added a validator that would re-use the one already present in > Mail… > > Regards, > > Felix > > > [1] http://github.com/alexdunae/validates_email_format_of > [2] http://lindsaar.net/2010/1/31/validates_rails_3_awesome_is_true > > > > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 12:57PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Felix, I believe it does. In fact I did a quick check of both .info and > > .me and they worked fine. > > -sunny > http://ezror.com > > Felix Schäfer wrote: > > -- > Posted via http://www.ruby-forum.com/. > > > > > "Felix Schäfer" <schaefer-SjIeUF6ADzXby3iVrkZq2A@public.gmane.org> Sep 27 01:07PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Am 27.09.2010 um 12:57 schrieb Sunny Ezror: > > > Felix, I believe it does. In fact I did a quick check of both .info > and > > .me and they worked fine. > > The point being the localpart "foo@bar" (and yes, the quotes are part > of the localpart) in "foo@bar"@rails.info, not the TLD. > > Oh, and you should use \A and \z (string delimiters) over ^ and $ (line > delimiters), as your regex will also validate strings of the form: > foo-+RB1Aph5k6s@public.gmane.org\nSome-funky-DB-buster . > > Best, > > Felix > > > > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 01:13PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Ah yes you''re right about "foo@bar"@rails.info > > -sunny > http://ezror.com > > Felix Schäfer wrote: > > -- > Posted via http://www.ruby-forum.com/. > > > > Topic: Freelancers: small site implementation<http://groups.google.com/group/rubyonrails-talk/t/22a12ca516f8c770> > > Didde Brockman <didde-ntJxCBzZx0j2eFz/2MeuCQ@public.gmane.org> Sep 27 12:56PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Hi everyone, > > We''re looking for an independent, driven and capable freelancer willing > to help implement a small site using RoR. A CMS is required and among the > candidates we like Typus the most, but can be flexible in this matter. You > will be provided with complete front-end code (XHTML and CSS) as well as > designs outlining the site''s wireframe. > > Contact me directly if you think this might be interesting! We''re based > in Sweden, but welcome anyone from US/EU to get in touch for further details > and planning. > > Many thanks. > > > /didde > > -- > Didde Brockman, Illianced > http://www.illianced.com/ > > > > Topic: rails3 customized error message<http://groups.google.com/group/rubyonrails-talk/t/e87999a36a4a84c4> > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:31AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Try this: > > > http://stackoverflow.com/questions/3755128/rails-3-custom-error-message-in-validation > > I haven''t played around with it, but object.errors[attribute] << > error_message should probably be changed to just error_message. > > Let me know how it goes. > > -sunny > http://ezror.com > -- > Posted via http://www.ruby-forum.com/. > > > > Topic: Changing app from Rails 3 RC to final<http://groups.google.com/group/rubyonrails-talk/t/8222744f509a0720> > > Sunny Ezror <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:15AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > If you''ve the newer Rails version already installed, its really as > simple as that. If not install that and you''re all set to go. > > -sunny > http://ezror.com > -- > Posted via http://www.ruby-forum.com/. > > > > Topic: Multipe Combo box Query System<http://groups.google.com/group/rubyonrails-talk/t/fa31517837e40272> > > PalaniKannan K <kpalanikannan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 10:05AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8mo6ZU.en.&am=!Y-v-bx6-hLCxhZ4C2vD2RvIMWwP5I-ggKFo_CVzYW09Bn2cnKOJE&fri#12b53507c98db387_digest_top> > > Dear Jeff, > > Thank you very much... Excellent. > > > -- > With Regards > Palani Kannan. K > > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- With Best Regards Sharath *sing as if no one is listening* ***dance as if no one is watching* ***love as you''ve never loved before* ***live as if heaven is here on earth* -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Sep-28 08:41 UTC
Re: Digest for rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org - 25 Messages in 11 Topics
On Sep 28, 8:12 am, sharath chander punthambekar <sharath.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello ROR users: > > I would like to start a new discussion on the "Future of MySQL with Oracle" > > I feel this issue has a critical impact on opensource developers like you & > me. > We need to explore the option of developing SQLLIte3 to the level of MySql > if required. >Far more logical would be to explore one of the mysql forks out there (eg maria db whose lead developer is MySQL original founder). There''s also plenty of other opensource DBs out there, eg postgres> Any update on "Letter to the EC opposing Oracle''s acquisition of MySQL" by > KEI?http://keionline.org/ec-mysqlToo late for that. The various competition authorities approved it. Fred> > Regards > Sharath > sharath.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > On Mon, Sep 27, 2010 at 6:39 PM, > <rubyonrails-talk+noreply-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bnoreply@googl egroups.com> > > > > > > > wrote: > > Today''s Topic Summary > > > Group:http://groups.google.com/group/rubyonrails-talk/topics > > > - design decision<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[2 Updates] > > - STI, xml/xslt, or ? for many custom forms/templates<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > - problem in using xsendfile apche+mongrel<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[6 Updates] > > - Rails 3 - Creating a comment and then returning the Partial with JUST > > the new comment<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[2 Updates] > > - Rails 3 + jQuery ; How to show error messages<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > - Question about securing videos<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[3 Updates] > > - rails3 validate email format<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[6 Updates] > > - Freelancers: small site implementation<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > - rails3 customized error message<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > - Changing app from Rails 3 RC to final<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > - Multipe Combo box Query System<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...>[1 Update] > > > Topic: design decision<http://groups.google.com/group/rubyonrails-talk/t/f257c10a4b2267c4> > > > ssmithstone <stephen.smithst...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 05:29AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Trying to make my controllers as skinny as possible , so come across a > > design issue if I want to send out an email when a model is created > > would I put this functionality on the after_create method or inside of > > the controller after the #save method > > > Ar Chron <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 03:03PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > If I understand the requirement, then the creation of an e-mail is the > > business of the model. > > > Controller should be deciding "After creation of model X, what view > > does > > the user see? To the index view, the show view of the model just > > created, or back to the view the user was at before creating the > > model?" > > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Topic: STI, xml/xslt, or ? for many custom forms/templates<http://groups.google.com/group/rubyonrails-talk/t/f86966d051b4339> > > > AppleII717 <sa...-ee4meeAH724@public.gmane.org> Sep 27 06:00AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > I''m considering porting an application to RoR. The application is > > basically a "Order Entry" type system for the Interior Designer > > vertical market. The existing application has a table with over 400 > > column! (not my design!). The majority of these columns are > > measurements and descriptions for a certain types of product > > categories (e.g., "Draperies","Sheer Draperies", > > "Upholstery","Pillows","Lampshades", etc) > > > Each one of these categories (25+) has a custom form that display the > > measurement attributes for that category. To make things worse, > > there''s a lot of javascript that enables/disables/shows/hides areas/ > > fields. There is some sharing of attributes (width, height, length, > > size, for example). I can cut down the javascript by creating more > > categories - for instance there are 3 types of "Sheer Draperies". > > > I alway though that these "Category Details" didn''t need to be stored > > individually in a record, but serialized in a "Details" fields. Now > > the basic question is what would be the best approach? > > > I''ve never done xml/xslt type forms and don''t know how difficult that > > would be. > > > I''ve experimented with what could be considered "Tableless STI" and it > > works, but with a few gotcha''s. For instance: > > > class Detail < ActiveRecord::Base > > def self.columns > > @columns ||= []; > > end > > ... rest of tableless stuff > > #common attributes > > column :type, :string > > column :category, :string > > column :workroom_material_reference, :text > > column :description, :string > > .... > > end > > > class Carpet < Detail > > column :style, :string > > column :quanity, :integer > > column :yards, :float > > end > > > The tableless approach would not allow me to create a new Carpet > > without first doing Detail.new. There were other problems that I > > hacked around, like defining def self.new_category(category) that > > creates new ActiveRecord objects for both the basic attributes and the > > category attributes. Maybe if I used a real table, some of those > > problems would go away. > > > That approach is livable, but was wondering if I am totally missing a > > better approach? > > > Anyway, I know I am still going to have a couple hundred date elements > > to deal with and a bunch of partials. > > > Anyone want to point me in a different direction? > > > Steve Alex > > > Topic: problem in using xsendfile apche+mongrel<http://groups.google.com/group/rubyonrails-talk/t/41967531a6301f89> > > > Amit Tomar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 10:00AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Hii All, i loaded mod_xsendfile.so in apche , i added few line in > > httpd.conf files > > > LoadModule xsendfile_module modules/mod_xsendfile.so > > > XSendFile on > > > XSendFileAllowAbove on > > > <VirtualHost * localhost:80> > > ServerName src > > > DocumentRoot C:/InstantRails-2.0-win/rails_apps/src/public/ > > > ProxyPass /http://localhost:3000/ > > > ProxyPassReverse /http://localhost:3000/ > > > </VirtualHost > > > > now in my rails application i have a streams controller and inside > > streams controller i have a function named download ,code for code > > download is below > > > def download > > > @stream = Stream.find(params[:id]) > > > filename = "#...@stream.location}" > > > response.headers[''Content-Type''] = "application/force-download" > > > response.headers[''Content-Disposition''] = "attachment; > > filename=\"#{File.basename(filename)}\"" > > > response.headers["X-Sendfile"] = @stream.location > > > response.headers[''Content-length''] = File.size(filename) > > > render :nothing => true > > > end > > > Problem is my rails application still handling this request but i would > > like apache to handle this request ,can anyone tell me how i configure > > apche to handle this request?? > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 03:34AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > > Problem is my rails application still handling this request but i > > would > > > like apache to handle this request ,can anyone tell me how i > > configure > > > apche to handle this request?? > > > So what happens when you hit that controller ? (and did you notice > > that rails'' send_file method has an x_sendfile option) > > > Fred > > > Amit Tomar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 01:28PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Frederick Cheung wrote: > > > > So what happens when you hit that controller ? (and did you notice > > > that rails'' send_file method has an x_sendfile option) > > > > Fred > > > Fred thanks for responding > > Actully when i downloding files,mongrel rendering things, > > > Processing StreamsController#download (for 127.0.0.1 at 2010-09-27 > > 16:50:47) [GET] > > Parameters: {"id"=>"6655"} > > ?[4;36;1mSQL (0.0ms)?[0m ?[0;1mSET NAMES ''utf8''?[0m > > ?[4;35;1mSQL (0.0ms)?[0m ?[0mSET SQL_AUTO_IS_NULL=0?[0m > > ?[4;36;1mStream Columns (0.0ms)?[0m ?[0;1mSHOW FIELDS FROM > > `streams`?[0m > > ?[4;35;1mStream Load (0.0ms)?[0m ?[0mSELECT * FROM `streams` WHERE > > (`streams`.`id` = 6655) ?[0 > > Completed in 78ms (View: 0, DB: 0) | 200 OK > > [http://src/streams/download/6655] > > > It is when i am trying to download 2.2GB of file ,file is downloaded > > completely,but my worry is why mongrel is rendering things if apache is > > > handling download > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 05:29AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > > It is when i am trying to download 2.2GB of file ,file is downloaded > > > completely,but my worry is why mongrel is rendering things if apache > > is > > > handling download > > > That looks entirely normal to me - your rails code does need to be > > invoked at some point in order for it to tell apache which file to > > send. > > > Fred > > > Amit Tomar <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 02:36PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Frederick Cheung wrote: > > > invoked at some point in order for it to tell apache which file to > > > send. > > > > Fred > > > But Fred lot of experts are saying ,mongerl doesn''t render anything > > while apche handle the request and one more thing how do i make sure > > apache is handling is request?? > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Michael Schuerig <mich...-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org> Sep 27 02:52PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > On Monday 27 September 2010, Amit Tomar wrote: > > > > But Fred lot of experts are saying ,mongerl doesn''t render anything > > > while apche handle the request and one more thing how do i make sure > > > apache is handling is request?? > > > Amir, I''m not sure, but you might be misunderstanding what xsendfile is > > > for and how it works. This mechanism is not intended to serve > > "ordinary" > > static files located in the public directory of an application. Rather, > > > it is a way for your controller to hand off serving a file to Apache > > instead of doing it from within Rails. > > > So, your controller *has* to be involved. It''s the job of the > > controller > > action to decide which file to return in the response and then call > > send_file with that file as a parameter. In the production environment, > > > this has the effect that the Rails process does not respond with the > > file itself. Instead, Rails sets a special header which in turn is > > picked up by Apache (or nginx, lighttpd) and interpreted in such a way > > that it now serves the named file. > > > Michael > > > -- > > Michael Schuerig > > mailto:mich...-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org > > http://www.schuerig.de/michael/ > > > Topic: Rails 3 - Creating a comment and then returning the Partial with > > JUST the new comment<http://groups.google.com/group/rubyonrails-talk/t/6c7a13d86a40cf70> > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:10AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Have you tried passing in locals for the partial? > > > Not sure how Rails 3 does it, but Rails 2 its > > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > > {:comment => @comment))%> > > > -sunny > > http://ezror.com > > -- > > Posted viahttp://www.ruby-forum.com/. > > > radhames brito <rbri...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 08:45AM -0400 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > @sunny @comment does not exists inside the create action, and he needs > > to > > iterate over a collection , @comments > > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > > {:comments =>fill the comments collection...))%> > > > or > > > @comment = lots of stuff going on here but it works... > > @comments = fill the comments collection.. > > if @comment.save > > flash[:notice] = "Successfully created comment." > > respond_to do |format| > > format.js > > end > > end > > > then > > > <%=escape_javascript(render :partial =>"comments/comment", :locals => > > {:comments => @comments))%> > > > @comments does not exists inside the response from create.js.erb so you > > have > > to build it there or in the controller''s create action before the > > respond_to > > block > > > you can check my example > > > http://github.com/rbritom/Simple_polymorphic_nested_comments > > > Topic: Rails 3 + jQuery ; How to show error messages<http://groups.google.com/group/rubyonrails-talk/t/a4d06aee3a377278> > > > mrpink <so...-BUxYPcb8F0Brl1BoWd1lEg@public.gmane.org> Sep 27 05:44AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Hi guys, > > > can anyone explain how to show error_messages_on (like back in Rails > > 2 , without Ajax) fields that didnt'' pass the validation the jquery > > way. > > > I googled for about 2 hours now and found nothing. Jquery works fine > > and adds the content to my table, but im totally stuck with the whole > > error/validation thing. > > > My form looks like this: > > > <%= form_for Translation.new , :remote => true do |f| %> > > <table> > > <tr> > > <td> > > <%= f.label :locale %><br /> > > <%= f.text_field :locale %> > > > </td> > > <td> > > <%= f.label :key %><br /> > > <%= f.text_field :key %> > > </td> > > </tr> > > <tr> > > <td> > > <%= f.label :value %><br /> > > <%= f.text_area :value , :rows => 3%> > > </td> > > <td> > > <%= f.label :interpolations %><br /> > > <%= f.text_area :interpolations, :rows => 3 %> > > </td> > > </tr> > > <tr> > > <td> > > <%= f.label :is_proc %><br /> > > <%= f.check_box :is_proc %> > > </td> > > <td></td> > > </tr> > > </table> > > <p><%= f.submit t(''translation.create'') %></p> > > <% end %> > > > Create action like this: > > def create > > if @translation.save > > flash[:notice] = "Successfully created translation." > > respond_to do |format| > > format.html { redirect_to @translation } > > format.js > > end > > else > > respond_to do |format| > > format.html { render :action => ''new''} > > # show what went wrong with jquery > > end > > end > > end > > > and create.js.erb > > /* Insert a notice between the last comment and the comment form */ > > $("#translation-notice").html(''<div class="flash notice"><%> > escape_javascript(flash.delete(:notice)) %></div>''); > > > /* Add the new comment to the bottom of the comments list */ > > $("#translations").prepend("<%> > escape_javascript(render(@translation)) %>"); > > > /* Highlight the new comment */ > > $("#translation-<%= @translation.id %>").effect("highlight", {}, > > 3000); > > > /* Reset the comment form */ > > $("#new_translation")[0].reset(); > > > Adding validated data works but please give me hint with error > > validation thing. > > > thanks > > > Topic: Question about securing videos<http://groups.google.com/group/rubyonrails-talk/t/d1e17bf9ee0a24ab> > > > egervari <ken.egerv...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 26 02:43PM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Assuming you want to stream some flv videos, what is the best way to > > secure them via authentication while also embedding them in some kind > > of web flash player? > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:22AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > I''m having the same trouble with securing my videos for my latest app. > > A > > simple before_filter can stop the user from accessing the page, but > > once > > the video streams via a web player, the user can easily steal it. > > > Only solution I can think of is to use amazon s3''s url expiration, but > > that gets overly complicated. > > > -sunny > > http://ezror.com > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> Sep 27 08:23AM -0400 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Here''s a good walk-through explaining some solutions to this problem. > > Basically, you create a view that streams the file to the visitor with > > send_file from a protected location -- not the usual public/system > > space enjoyed by a normal Paperclip install. > > > http://everydayrails.com/2010/07/08/authenticated-attachments-papercl... > > > Walter > > > On Sep 27, 2010, at 5:22 AM, Sunny Ezror wrote: > > > Topic: rails3 validate email format<http://groups.google.com/group/rubyonrails-talk/t/eb10cc19689b3ea0> > > > Ugis Ozols <ugis.ozo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 02:01AM -0700 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > I''m using this: > > > :format => { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i } > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:19AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > I use whatever that comes with restful_authentication scaffold > > generator > > and for the most part it works fine for me: > > /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i > > > If you want to learn more about this or more control over it, I suggest > > > you readhttp://www.regular-expressions.info/email.html > > > -sunny > > http://ezror.com > > -- > > Posted viahttp://www.ruby-forum.com/. > > > "Felix Schäfer" <schae...-SjIeUF6ADzXby3iVrkZq2A@public.gmane.org> Sep 27 11:51AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Am 26.09.2010 um 18:54 schrieb Nadal: > > > > I am working on a rails3 project. Is there a tool to validate the > > > format of email address. It does not have to be fancy regex. Just a > > > few simple validations. However I don''t want to reinvent the wheel? > > > Using a regex to validate an email format is in most cases a bad idea, > > the 2 proposed regexes won''t for example recognize quoted local parts, which > > are valid (e.g. "foo@bar"@rails.info is a valid address). There''s a > > validate_email_format_of plugin on github[1] which works fine on rails2, I > > think there is a branch/fork for rails3 somewhere too. Another method would > > be to just drop an EmailValidator into your lib so that you can reuse it at > > other places in your rails app, have a look at [2] (yes, it still is a regex > > and only matches what the RFC refers to as "addr-spec" as opposed to a > > "full" address, but a not-so-bad one). > > > Anyway, I''m a little surprised that rails3 having gone from TMail to > > Mail hasn''t added a validator that would re-use the one already present in > > Mail… > > > Regards, > > > Felix > > > [1]http://github.com/alexdunae/validates_email_format_of > > [2]http://lindsaar.net/2010/1/31/validates_rails_3_awesome_is_true > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 12:57PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Felix, I believe it does. In fact I did a quick check of both .info and > > > .me and they worked fine. > > > -sunny > > http://ezror.com > > > Felix Schäfer wrote: > > > -- > > Posted viahttp://www.ruby-forum.com/. > > > "Felix Schäfer" <schae...-SjIeUF6ADzXby3iVrkZq2A@public.gmane.org> Sep 27 01:07PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Am 27.09.2010 um 12:57 schrieb Sunny Ezror: > > > > Felix, I believe it does. In fact I did a quick check of both .info > > and > > > .me and they worked fine. > > > The point being the localpart "foo@bar" (and yes, the quotes are part > > of the localpart) in "foo@bar"@rails.info, not the TLD. > > > Oh, and you should use \A and \z (string delimiters) over ^ and $ (line > > delimiters), as your regex will also validate strings of the form: > > f...-+RB1Aph5k6s@public.gmane.org\nSome-funky-DB-buster . > > > Best, > > > Felix > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 01:13PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Ah yes you''re right about "foo@bar"@rails.info > > > -sunny > > http://ezror.com > > > Felix Schäfer wrote: > > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Topic: Freelancers: small site implementation<http://groups.google.com/group/rubyonrails-talk/t/22a12ca516f8c770> > > > Didde Brockman <di...-ntJxCBzZx0j2eFz/2MeuCQ@public.gmane.org> Sep 27 12:56PM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Hi everyone, > > > We''re looking for an independent, driven and capable freelancer willing > > to help implement a small site using RoR. A CMS is required and among the > > candidates we like Typus the most, but can be flexible in this matter. You > > will be provided with complete front-end code (XHTML and CSS) as well as > > designs outlining the site''s wireframe. > > > Contact me directly if you think this might be interesting! We''re based > > in Sweden, but welcome anyone from US/EU to get in touch for further details > > and planning. > > > Many thanks. > > > /didde > > > -- > > Didde Brockman, Illianced > > http://www.illianced.com/ > > > Topic: rails3 customized error message<http://groups.google.com/group/rubyonrails-talk/t/e87999a36a4a84c4> > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:31AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Try this: > > > http://stackoverflow.com/questions/3755128/rails-3-custom-error-messa... > > > I haven''t played around with it, but object.errors[attribute] << > > error_message should probably be changed to just error_message. > > > Let me know how it goes. > > > -sunny > > http://ezror.com > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Topic: Changing app from Rails 3 RC to final<http://groups.google.com/group/rubyonrails-talk/t/8222744f509a0720> > > > Sunny Ezror <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> Sep 27 11:15AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > If you''ve the newer Rails version already installed, its really as > > simple as that. If not install that and you''re all set to go. > > > -sunny > > http://ezror.com > > -- > > Posted viahttp://www.ruby-forum.com/. > > > Topic: Multipe Combo box Query System<http://groups.google.com/group/rubyonrails-talk/t/fa31517837e40272> > > > PalaniKannan K <kpalanikan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sep 27 10:05AM +0200 ^<https://mail.google.com/mail/?ui=2&view=js&name=main,tlist&ver=PLpFW8...> > > > Dear Jeff, > > > Thank you very much... Excellent. > > > -- > > With Regards > > Palani Kannan. K > > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > With Best Regards > > Sharath > *sing as if no one is listening* > ***dance as if no one is watching* > ***love as you''ve never loved before* > ***live as if heaven is here on earth*-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.