Displaying 20 results from an estimated 80000 matches similar to: "Change default routing"
2011 Aug 12
8
Need some help with regular expression
I need to validate a string from a user (a location for use with
geotagging) that is. I want to make sure that the user specify a city
and a country in my inp ... So i wrote this =>
validates :usri_location,
:presence => true,
:format => {:with => /^[a-zA-Z]+{\,\s}+[a-zA-Z]/i},
:on => :create
I want to make sure that the user writes city,
2010 Jan 04
2
to_parm and how it can be used in a helper
is there a way to pass the data returned by the to_parm function in a
helper?
i followed the info provided at
http://www.jroller.com/obie/entry/seo_optimization_of_urls_in and am
able to successfully get the correct urls, now i want to be able to get
the same (id-whatever) text and pass it to a helper function for further
processing.
Any ideas as to how this can be achieved?
--
Posted via
2010 Jun 02
5
user routing versus admin routing strategies?
In an app where ordinary users are limited to viewing and editing their
own "stuff", but someone with admin privs can view and edit anybody''s
stuff, what''s the right strategy for routing?
At first blush, I''d think that an ordinary user (e.g. with id 565)
should see something like:
http://example.com/mystuff.html
... where the controller assumes
2011 May 20
5
views w locale default template
[RAILS3]
I hesitate on how handling the locale view templates to default to
one language only ..
sending admin emails will go only to one locale ''en_GB''
should I set it up into the template name and set I18n.locale to
''en_GB''
membership_renew.en_GB.html.erb
OR
whatever locale is used , if I have :
membership_renew.html
it will be the default ?
--
2010 Apr 22
3
HOW TO Track How Many Recipients Open Your Mail IN RAILS?
HOW TO Track How Many Recipients Open Your Mail IN RAILS?
please help me PROVIDE SOLUTIONS AND STEPS OR ELSE ANY PLUGIN
--
Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To
2010 Apr 27
4
Translated (language-aware) routes in Rails application
Hi,
I''d like to have translated languate-aware routes in my application,
like:
/projects/5/permissions => locale "PL"
/projekty/5/pozwolenia => locale "PL"
Is there any way to achieve it with RESTful routes? I have done it
manually with named routes, but it''s overwhelming with over 300
routes :D Also tried namespace (yeah, didn''t work) and
2010 Apr 24
1
List time zones?
Is there a way to list the time zones that rails makes available (it
seems to function only on cities)?
I figured out how to get that list at the command line in rake but i
can''t seem to get access to the list of available ones from within a
rails app.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on
2010 Apr 20
5
Spring Cleaning
Right now in my view, I have a whole HUGE clump of
<% if current_user %> and then <% if current_admin %> and then <% if
current_teacher %> and then all that other stuff in my view.
I have a ginourmous chunk of if and else statements in my views... is
there a way to make it prettier? The if and else''s almost all have the
same functions, expect for some minor changes.
2010 Aug 23
11
Rails 2.3.8 or Rails 3 ?
Hi,
If I''m going to start developing a new rails based web application,
should I go for Rails 3 or Rails 2.3.8 ? why this and not the other ?
Thank you.
Dani
--
Posted via http://www.ruby-forum.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
2010 Apr 29
10
How to install rails gems 2.3.5 on windows
Hi,
When I try to add generator to controller, I got error as "Missing the
Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your
RAILS_GEM_VERSION setting in config/environment.rb for the Rails version
you do have installed, or comment out RAILS_GEM_VERSION to use the
latest version installed."
Can somebody please let me know how to install rails gem 2.3.5
successfully on a
2010 Apr 23
4
New to rails - apparently need patch to use PostgreSQL
Help please. My first attempt at Rails, I''m trying to use PostgreSQL
and I''m seeing this error. I''m also new to PostgreSQL, but the
default encoding in PostgreSQL appears to be SQL_ASCII. I''m not sure
if I should try and get the patch or try and change the PostgreSQL
template. Sorry I''m so confused. FWIW, I''ve been a .NET MSSQL
developer
2010 Apr 20
13
why is ActiveRecord tying to select nonex ID column?
I''ve loaded (and updated) thousands of these MeteredUsage records. In
the middle of a run, I suddenly get:
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ''id'' in
''where clause'': UPDATE `metered_usages` SET `cost` = 12603.46 WHERE `id`
= NULL
I can''t see anything that''s different about this particular record
compared to
2010 May 17
6
validates_timeliness plugin installation
I''m trying to install the validates_timeliness plugin:
on Ubuntu lucid in my rails project directory:
sudo ./script/plugin install git://github.com/adzap/validates_timeliness.git
./script/plugin: command not found
on windows (as admin) in my rails project directory:
ruby script/plugin install git://github.com/adzap/validates_timeliness.git
creates the "validates_timeliness"
2010 May 18
4
When I do a migration, the changes are make in the test db
When I do a migration, the changes are make in the test database. Does
anyone know the reason?
In the config/environment.rb file, I have this: ENV[''RAILS_ENV''] ||=
''production''
And in the db/ folder, it creates a file named test.sqlite3
When I did the migrations, RoR used the test database, but when I want
to make something in the application, the migrations
2010 May 05
6
form remote tag :before=> function problem
Hi I have a strange problem, I am using the below code
form_remote_tag :url => ''/abc/test'',:before => "return hello();",
:update=>''test_categories'' ,:complete => "Element.hide(''spinner'')",
:loading => "Element.show(''spinner'')" do
I am using :before=> function to validate the
2010 Jul 06
4
Simple routing problem
I''ve got the following in config\routes.rb:
map.resources :users
In app\views\shared\_menu.erb, I''ve got:
Please sign in <%= link_to
"here", :controller=>"user", :action=>"sign_in" -%>
In app\controllers\users_controller.rb
def sign_in
end
When I run the application, I crash with:
Routing Error
No route matches
2010 Apr 24
5
About your application's environment URL not found
Hi
I am a newbie (which you probably guessed from the subject) and have
just installed ruby 1.8.7, rails 2.3.5 and apache 2.2.12 on ubuntu 9.10.
I have created a rails app and edited my apache config as shown below.
The Rails "Welcome aboard" page displays, but when I click on "About
your application''s environment" I get
"Not Found
The requested URL
2012 Nov 30
4
Tokeninput incremental search not working
Rails 3.1.3
After watching
http://railscasts.com/episodes/258-token-fields?autoplay=true
I have installed the similar functionality to my app.
However,
def index
@cities = City.all
...
does in fact give the list of all cities in the text field, but
def index
@cities = City.where("name like ?", "%#{params[:q]}%")
...
does NOT
2010 Dec 14
5
Build associated model confusion
I''m new to Rails3, and I''m just trying to get one last thing to work
before I call it a night. The situation is the following (please if
the code is horrible, just let me know, still learning):
I want to log a dive. I might have a new location on that dive at
which point I have to create a new Location, and then create the dive.
A dive has_one location. A location has_many
2006 Mar 24
4
Parsing Filemaker 6 XML into something I can use
Hi
One of our customers has a Filemaker database which needs to be
accessed for some data. Using the Web Companion, I can query the
database for an XML version of the data. I need to be able to push
this data into an array of hashes, so I can access it in a more
convenient way. Filemaker is able to provide me with 2 XML formats
(DSO-XML and FMP-XML):
***********
DSO-XML
***********