Displaying 8 results from an estimated 8 matches for "xjnniw0eocmrvltnr".
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
2008 Aug 22
2
How to find/open Spec::Expectations and Spec::Matchers
Hi,
Then RSpec 1.4 recommends, in the webpage http://rspec.info/documentation/expectations.html,
referencing the subject items.
I''m running ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] over
WinXP-Pro/SP2.
I believe I installed RSpec with a Ruby gem. At least, I think that''s
confirmed because I have a lot of stuff in the directory K:\_Utilities
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 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 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 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
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
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