Displaying 13 results from an estimated 13 matches for "ftjgd9dcuo3jtkoyrctp1ueocmrvltnr".
2007 Feb 20
5
Create a hyphen-separated set of letters derived from a string - How to?
Hi,
This is such a trivial programming issue, but I can''t find a way to
transform, say ''abc'' to ''a-b-c'' without using pattern matching.
Any ideas?
Thanks in Advance,
Richard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post
2008 Nov 21
15
Switching the version of Rails that an app uses
Hi All,
I’ve got a few versions or Rails installed and I''d like to run an App
I’m developing with various versions of Rails. I heard of two ways to
switch the version of Rails that an app uses:
1. Use GitHub as described by http://kylecordes.com/2008/04/30/git-windows-go/
. But that requires using Bash in a Command Window and more steps
than I want to go through.
2. Alter
2010 Mar 20
4
Displaying an image in a Rails form_for
Hi,
I''ve got a public\images\DownArrow.jpg
and app\views\expenses\new.html.erb that want to present this image in
the following context:
<p>
<%= f.label :vendor %><br />
<%= f.text_field :vendor %>
<%= f.image "DownArrow.jpg" %>
<br>
<%= select_tag "test",
options_for_select(@current_vendors.collect {
2010 Mar 22
7
How to reference a select_tag within a form
Hi All,
Inside my app\views\expenses\new.html.erb file, I had the code:
<% form_for(@expense) do |f| %>
[snip]
<p>
<%= f.label :vendor %><br />
<%= f.text_field :vendor %>
<br />
<div id="vendor_droplist>
<%= select_tag "test",
options_for_select(@current_vendors.collect { |v|
v.nickname }),
{:multiple
2010 Jul 16
31
Added associations but don't see generated methods
Hi,
I''ve got a Rails app working that includes two two classes, etc.:
Expense & Vendor. I eventually learned that the mental concept I had
of their relationship should be express in Rails as:
class Expense < ActiveRecord::Base; belongs_to :vendor; end
class Vendor < ActiveRecord::Base; has_many :expenses; end
2010 Mar 12
7
"We're sorry, but something went wrong." from RoR app
Hi All,
"We''re sorry, but something went wrong." is the message I got when I
started up an RoR app in the environment:
Rails 2.3.5
Ruby 1.8.6
WinXP-Pro/SP3
Firefox 3.6
MySQL 5.0.37-community-nt
Mongrel
The app under development was working fine until I (stupidly) thought
I needed to upgrade MySQL to 5.1.44.
I took the precaution of MySQL-dumping
the development db before
2006 Sep 11
1
Testing posting - please ignore
Just testing
--
---
Regards,
Richard
Env.: WinXP-Pro/SP2, MS VisualStudio.NET Eclipse 3.1.2
Ruby 1.8.2-15 Java JDK 1.5.0_06
--~--~---------~--~----~------------~-------~--~----~
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 Feb 23
0
rake db:create:wants LibMySQL.dll for MySQL 5.0.37; where?
Hi All,
I''m running:
WinXP-Pro/SP3
Rails 2.3.5
MySQL 5.0.37-community-nt
I ran rake db:create:all and got something like:
LibMySQL.dll required.
I had a worse symptom previously when, on an earlier post on a related
failure, Sharagoz kindly suggested I drop back to a 5.0 version of
MySQL.
As I prepared this post, I wanted to recall my version. In
particular, I wanted to run
select *
2010 Feb 23
2
Problem: The command "rake db:create:all" crashes
Hi All,
I''m running:
Rails 2.3.5
MySQL 5.1.44
WindowsXP-Pro/SP3
Following Noel Rappin''s book, Pro RoR, I successfully got past the
point of creating my first scaffold:
ruby script/generate scaffold supplier nickname:string qbname:string
That produced the migration, 20100221011210_create_suppliers.rb:
class CreateSuppliers < ActiveRecord::Migration
def self.up
2010 Mar 10
2
Decimal fields generated in Rails 2.3.5 act like strings, sort of
Hi All,
I just created a new CRUD "expense" (using Rails 2.3.5 scaffold) which
included "amount:decimal". When I:
1. populated the amount field of a new expense with 5 characters:
12.50 and
2. saved the new record
I got a display of the new record that showed Amount to be merely
"12".
I clicked Update and put my cursor over the data field for Amount and
got a
2010 Apr 03
2
Specifying a decimal field precision/scale with scaffold requires 2 steps?
Hi,
It appears to me that the command:
ruby script/generate scaffold whatever money_field:decimal(10,2)
will not generate a valid migration.
Therefore it appears to me only two ways to achieve the desired result
is:
1.1 Omit the the precision/scale on the scaffold command
1.2 Edit the migration file by following the "do |t| ... end" with
the command:
change_column :whatever
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 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor
In Expense#new there''s a form with a Vendors-drop-down and a NewVendor-
button.
The latter button brings up Vendor#new.
The Create button in Vendor#new brings up Vendor#show with Edit & Back
links.
I want to append a third link conditionally to Vendor#show: if the
Expense#new form led to the Vendor#show