This is the webpage: http://projects.exactlyoneturtle.com/date_picker/ I have downloaded and installed it. But how do I use in view page? This is the usual view with ordinary datetime_select: <p><label for="product_date_available">Date available</label><br/> <%= datetime_select ''product'', ''date_available'' %></p> So I have table named ''product'' with one of the column named ''date_available''. How do I use date_picker rather than datetime_select? The author give html page not rhtml page. Thanks.
Hi ! 2006/3/31, Akbar <akbarhome@gmail.com>:> This is the webpage: > http://projects.exactlyoneturtle.com/date_picker/ > > I have downloaded and installed it. But how do I use in view page? > > This is the usual view with ordinary datetime_select: > <p><label for="product_date_available">Date available</label><br/> > <%= datetime_select ''product'', ''date_available'' %></p> > > So I have table named ''product'' with one of the column named > ''date_available''. How do I use date_picker rather than > datetime_select? > > The author give html page not rhtml page.You''ll need to copy the helper. This should really be packaged as a plugin, but it''s not at the moment. Anyway, copy the helper to your application''s lib/. Then, you can use this: <%= label ''Sale Starts On'', :product, :sale_starts_on %> <%= date_picker_field :product, :sale_starts_on %> Hope that helps ! -- Fran?ois Beausoleil http://blog.teksol.info/
On 4/1/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote:> Hi ! > > > You''ll need to copy the helper. This should really be packaged as a > plugin, but it''s not at the moment. Anyway, copy the helper to your > application''s lib/. Then, you can use this: > > <%= label ''Sale Starts On'', :product, :sale_starts_on %> > <%= date_picker_field :product, :sale_starts_on %> >Not work. The interesting is rails does not want to render anything below date_picker_field line. When I click Choose Date, it just go to the current page add with # in the end. You mean product is product table and sale_starts_on is a column of the product table with type date, right????
Sorry, solve it my self. Forgot to put this in the layout view: <%= stylesheet_link_tag ''scaffold'', ''depot'', ''admin'', ''date-picker'', :media => "all" %> <%= javascript_include_tag ''date-picker'' %> On 4/1/06, Akbar <akbarhome@gmail.com> wrote:> On 4/1/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote: > > Hi ! > > > > > > You''ll need to copy the helper. This should really be packaged as a > > plugin, but it''s not at the moment. Anyway, copy the helper to your > > application''s lib/. Then, you can use this: > > > > <%= label ''Sale Starts On'', :product, :sale_starts_on %> > > <%= date_picker_field :product, :sale_starts_on %> > > > > Not work. The interesting is rails does not want to render anything > below date_picker_field line. When I click Choose Date, it just go to > the current page add with # in the end. You mean product is product > table and sale_starts_on is a column of the product table with type > date, right???? >
It is very weird. Anything below this line is not rendered: <%= date_picker_field ''product'', ''date_available'' %></p> For example this is my code: <p><label for="product_title">Title</label><br/> <%= text_field ''product'', ''title'' %></p> <p><label for="product_date_available">Date available</label><br/> <%= date_picker_field ''product'', ''date_available'' %></p> <p><label for="product_description">Description</label><br/> <%= text_area ''product'', ''description'' %></p> <p><label for="product_image_url">Image url</label><br/> <%= text_field ''product'', ''image_url'' %></p> Product description and product image url do not show up. Any idea? On 4/1/06, Akbar <akbarhome@gmail.com> wrote:> Sorry, solve it my self. Forgot to put this in the layout view: > <%= stylesheet_link_tag ''scaffold'', ''depot'', ''admin'', ''date-picker'', > :media => "all" %> > <%= javascript_include_tag ''date-picker'' %> > > > On 4/1/06, Akbar <akbarhome@gmail.com> wrote: > > On 4/1/06, Francois Beausoleil <francois.beausoleil@gmail.com> wrote: > > > Hi ! > > > > > > > > > You''ll need to copy the helper. This should really be packaged as a > > > plugin, but it''s not at the moment. Anyway, copy the helper to your > > > application''s lib/. Then, you can use this: > > > > > > <%= label ''Sale Starts On'', :product, :sale_starts_on %> > > > <%= date_picker_field :product, :sale_starts_on %> > > > > > > > Not work. The interesting is rails does not want to render anything > > below date_picker_field line. When I click Choose Date, it just go to > > the current page add with # in the end. You mean product is product > > table and sale_starts_on is a column of the product table with type > > date, right???? > > >
Hello, I''m trying to implement a search feature in a project I''m working on. Here is the gist of it. The project is basically a classified site which allows people to post a classified ad in a category and specify the zip code. I would like to let people search classifieds that are local to them (defined as within 15 miles of their zip). So, would it be possible to use Ferret to provide searching of the classifieds on a local basis? Before, with mysql fulltext search I could do a join between the zip table and the classifieds table, but I found the results to not be great. Also, it seems that ferret stores the index file locally. What happens if I add extra web servers and use load balancing? What happens to the index in this case? Thanks, Carl
If you have more than one machine, you should also consider http://hyperestraier.sourceforge.net/, which is written in C, but has ruby-bindings and search is accessible via http and it has a rails plugin On 4/18/06, Carl Lerche <carl.lerche@verizon.net> wrote:> > Hello, > > I''m trying to implement a search feature in a project I''m working on. > Here is the gist of it. The project is basically a classified site > which allows people to post a classified ad in a category and specify > the zip code. I would like to let people search classifieds that are > local to them (defined as within 15 miles of their zip). So, would it > be possible to use Ferret to provide searching of the classifieds on > a local basis? Before, with mysql fulltext search I could do a join > between the zip table and the classifieds table, but I found the > results to not be great. > > Also, it seems that ferret stores the index file locally. What > happens if I add extra web servers and use load balancing? What > happens to the index in this case? > > Thanks, > Carl > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060419/cc38eed3/attachment.html