similar to: Globalize app example anywhere?

Displaying 20 results from an estimated 20000 matches similar to: "Globalize app example anywhere?"

2006 Mar 09
7
How to restrict access to admin part of the page?
Hi! What is the easiest way to restrict access to some part of the page? In php i just put .htaccess and .htpasswd files in /admin folder and it worked. Now i''ve got one admin folder for controllers, one for views, public folder and i''m not really sure if it''s still possible. So what is the easiest way? I don''t have any user logging features on my site,
2006 Mar 08
3
attribute or instance method or what?
Hi! Uhm are attributes just something like additional members of a class, other than those that come from the names of columns in the table? I''ve got images table, which has ''name'' column. I''ve added support for creating thumbnails out of uploaded pictures and i''d like to have an easy way of accessing them in my views. How to do it? I.e. my image
2006 Mar 08
3
Many renders in one view?
Hi! This was probably asked many times, but i can''t find it anywhere. How to render in my view many actions (sometimes from different controllers)? So i.e. I will have user status/login form at the top, form for creating/editing some data on the left and a list of these data elements on the right and some other things at the bottom? Can i put some of this stuff to the layout? So i
2006 Apr 21
1
Which internationalization plugin to choose?
Hi, I need to create rather simple page (gallery + news), but it has to be in 3 different languages (polish, english, german). Which plugin do you recommend? How to store translated data in the database - in a single table with separate field for every language or in separate table for every language? -- Posted via http://www.ruby-forum.com/.
2010 Jul 08
1
[Rails3] Issue in modifying locale and redisplaying page
In a test app, I have a drop-down selection to change the language of the site. I use an Ajax request to an action in which the locale is changed, and the it''s redirected to the home page unfortunately, the locale seems to be changed but the home page doesn''t reflect the new language .. application_controller.rb .. before_filter :set_locale def set_locale I18n.locale =
2006 Mar 14
3
How to write ! version of non ! method?
Hi! How to write i.e. array.join! based on array.join method? -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
3
How to save parent and child objects in a single action?
Hi! I''m struggling with it for a week. I posted a few similar posts that cleared up few things (thanks Mark!), but i still don''t know how to do it properly. What i''m trying to do is to create parent object and its many children (images - i tried using file_column, but it''s a topic for another post)using data from a single form. I''ve got a working
2006 Mar 22
4
How to write this SQL query?
Hi! Is there rails version of "where column in (value1, value2, ...)"? I know i could do OR many times, but this way is shorter. I''m ruby/rails newbie, so i have a problem with converting the hash, which i''m receving from the search form into the string for :conditions in find method. Could i instead of creating one, complicated (for me) query do something like
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to get it. I''m going to have a page where you can upload x amount of images at once. Lets say 10 images need to be uploaded, all with a caption. I''d like to have a browse button to choose the file, then the caption. Now, if I put 10 of them in one form, fill them all out and submit, I get
2006 Mar 13
6
Specifying none/single/many conditions at the same time
Hi! It''s rather ruby question than rails... I have a single ''list'' action where i call paginate method. I can receive none, 1 or 2 variables that specify conditions for paginate method. How to write the code so i can call paginate without conditions if all conditions variable are nil, with a single condition if one of conditions variables is not empty and with 2 if
2006 Feb 05
0
[GLOBALIZE] Trouble getting example on wiki working
Hi, I decided to integrate globalize into my app yesterday but I''ve run into trouble. I originally decided to try a db translation on one of my models so I followed the wiki example and modified where appropriate. When I tried to create an empty Album via the console I get the following error: http://www.rafb.net/paste/results/opZ13I27.html I tried to investigate and from what I
2006 Feb 11
1
problem with globalize
Hi, Somehow the date translation example in globalize doesn''t work for me. Loading development environment. >> Locale.set("es-ES") => #<Globalize::Locale:0x254df78 @code="es-ES", @language=nil, @country=nil> >> Time.now.localize("%d %B %Y") => "11 February 2006" >> Any ideas?? Thanks! Jeroen
2006 Apr 20
2
Globalize : how to detect if a translated text is available ?
Hi all, I was wondering how one can detect if a translated text is available when using the globalize plugin. If this is possible , then I would like to make the following : For example, in your view you have : <%@menu.each { | item | %> <%=item.t%> <%}%> Now what I would like to happen is , when the menu item has no translation available , and when a admin is logged in
2006 Mar 09
2
How to keep formatting of text in textarea?
Hi! I''ve got a form for creating news and i''d like to keep formatting of the text in the textarea - if user presses enter twice, or presses space ten times it should be visible when editing or showing the news. Probably i should add before_save filter and some regexps for adding html tags, but i know almost nothing about regexp. Maybe there''s a simpler way also.
2006 Jul 03
0
Problem with routes
Hi! I''ve got small problem with routes and globalize plugin. Here''s my routes.rb file: map.connect '':locale/:controller/:action/:id'' map.connect '''', :controller => ''product'', :action => ''index'' map.connect ''admin'', :controller => ''admin/products'', :action =>
2007 Nov 14
2
Globalize and acts_as_versioned
The subject says it all: Has anyone had any experience with using globalize and acts_as_versioned (or equivalent) together. That is, I would like the version control to take the locales into account, the en-US translation could be on version 7 while the fr-FR version is 3. Am thinking about extending these plugins but maybe someone has already done this? Tanks in advance. Regards Erik Lindblad
2006 May 25
7
Grouping controllers
I''m grouping controllers to avoid cluttering the top-level namespace. First, I used script/generate Admin::Customers new edit show list and then I used script/generate Admin::Providers new edit show list. The generator created the subfolders correctly: I have an admin folder and inside there''s customer_controller.rb and provider_controller.rb. I have the same structure in
2006 Mar 13
3
Translate to one language: Globalize is overkill?
Hi, I am developing a Rails application which should be in ONE language (not English). Globalize seems overkill for this purpose (do you agree?). So I''m trying some of the approaches on the wiki. In particular: http://wiki.rubyonrails.org/rails/pages/OverridingRailsMessagesInAnotherLanguage This *does* override the month names, but does *not* override the error messages. I''m
2005 Dec 21
10
Globalize plugin
Is there any working example on using the Globalize plugin? It could help alot Thanks in advance -- Alexander Antonakakis email: alexis-+Saq9+MPrF0@public.gmane.org
2006 Mar 23
3
How to redisplay submitted data on validation error?
Hi! If i have an object it''s easy. But i''m making a simple contact form and i check if email address is correct. If it''s not i redisplay the form with the info that there was an error (should i use redirect_to or render :action? what''s the difference?), but all previously submitted data is lost. I tried creating variables using names of the form fields, but