Displaying 20 results from an estimated 3000 matches similar to: "Rails table pluralizing Issue"
2006 Apr 12
9
Showing Images from a file store
Hi all.
I am wrting a small content management tool for my company and was
trying to display some images from our file store shown below.
<td> <img src="\\xx.xx.xxx.xx\xx\xx\xxx\abc.gif"/>
The app was displaying the image when it is under the \public\images
directory.
Is there anything special we need to do to get a file from outside the
root of the application?
Any help
2006 Jan 18
6
Mention about an open source image editor
Some days back there was a mention about an open source image editor
that people uses for application layout designing. I have forgotten
about the name of that software.
Can someone send me the link?
Silvy Mathews
2006 Jan 04
3
PDF Form Reader using rails/ruby
Can someone guide me the best possible way to read a PDF form fields. I
have seen some references to the PDFWriter but not the reader. Any help
appreciated.
Thanks
Silvy Mathews
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060104/641bd399/attachment.html
2006 Feb 02
4
Doubts on validation
Hi All,
View
********
<tr>
<td><b>Student: </b></td>
<td><%= text_field "student", "fname", "size" => 40, "maxlength"
=> 40 %></td>
</tr>
<tr>
<td><b>Program: </b></td>
<td><select id="student_program_id"
2006 Jan 27
2
Trying to understand the difference between similar iterators
What''s the difference between these two?
Objective:
Trying to display the addresses of the students that has "has_many"
relations with addresses
<td><% @student.addresses.each {|address| "Address:
#{address.addr1}<br/>"} %> </td> ****** did not work
<% end %>
This code worked:
<td><% @student.addresses.each do |address|%>
2006 Jan 09
3
Design Question
I am sure some of you can give me an insight into this. This is more
towards the database design for the scenario below:
Say for example,
I have a person table and this person can have different address types.
One could be Home and the other could be say Office.
Should be model this
Table people
id
fname
lname
Table addresses
id
person_id
addr1
addr2
....
or
Table people
id
fname
lname
2006 Jan 18
5
Inserting the parent Id to the child table
Hi All,
I need your suggestions for the following. I am still learning RoR and
pardon my ignorance.
I have say two tables.
Table A : students
Table B : addresses
Table B has student_id as the foreign key to Table A
If I am displaying the list of students and wanted to get individual
students addresses based on their id, is the only option is to get the
id from students controller method list
2006 Jan 28
2
Trying to understand the difference between similariterators
No I have tried that. It gives me just this output #
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Pat Maddox
Sent: Friday, January 27, 2006 2:48 PM
To: rails@lists.rubyonrails.org
Subject: Re: [Rails] Trying to understand the difference between
similariterators
Well first of all, when you''re iterating
2006 Jan 26
1
Explanation on Activerecord Associations
A while back, I had some doubts on the use of associations. I still
haven''t got a satisfactory guidance so that I can spring ahead with the
project. I am trying to understand from a ruby point of view on doing
things. Basically I have a controller that gives me a list of students.
And each student may have say home address and mailing address. Hence I
can model as shown below. How do I
2007 Nov 21
7
describe AddressesController, "handling GET /addresses" do
Hello,
I''m working with scaffold generated controller test code for handling GET
requests. Address is the model being tested. Address belongs_to Company,
Company has_many addresses.
In my addresses_controller I have:
before_filter :get_company
def index
@addresses = @company.addresses.find(:all)
respond_to do |format|
format.html # index.html.erb
format.xml {
2006 Jan 15
2
scaffold suddenly pluralizing names
I haven''t updated rails today and all of a sudden scaffold is
pluralizing my names
ruby script/generate scaffold Admin::Category
produces
class Admin::CategoriesController < ApplicationController
Do I really want "CategoriesController" instead of "CategoryController"?
Thanks,
Peter
2006 Mar 29
4
Scaffold generator: create vs. new
Can anyone supply me with a simple, succinct explanation of what the
difference is between the "new" controller and the "create" controller
that the scaffold generator produces?
I run:
> script/generate scaffold modelname controllername
And now I need to do some work inside the controllername.rb file. For
example, pulling a list from another database table to supply
2005 Dec 22
3
RoR presentations
Hi,
I was wondering is there any editor that can do autocompletion as shown
in the tutorials on the RoR website in the windows or linux environment.
If not do any one has sharable macros that comes with textpad or any
other editors.
Silvy Mathews
2006 Feb 03
6
Saving a User Object while in the Address Controller
Hi,
My saves are failing me and I can''t figure out why.
I am trying to save an address id to a user object just after I create
the address.
This isn''t the exact code, but it shows what I am trying to do.
class AddressesController < ApplicationController
def create
@address = Address.new(params[:address])
saved_address = @address.save
@user =
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The
problem that I am having is that when I create a blob field in my
migration file like so:
t.column "data", :binary, :limit => 15.megabytes, :null => false
rails changes it to this in the schema:
t.column "data", :binary, :default => "", :null => false
not only is this not what I wanted
2006 Jan 25
4
html special char conversion
I''ve stucked to such problem:
I have html entities in database, after using scaffold I''ve got these
chars not converted (I have strictly " and & in page source). It is what
I need, but after making ./script/generate scaffold modelname
controllername (recreating controller) I''ve got all special chars
converted into entities like (" and others). How can
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core
produced by the multiple delete on a HABTM relationship. I have
confirmed that my plug-in is being included into the base during
runtime however the code does not seem to be overridding the base
class.
module ActiveRecord
module Associations
module ClassMethods
def has_and_belongs_to_many(association_id, options =
2006 Feb 28
10
Scaffold command, how and what may be wrong?
hi everyone. I am learning RoR and just recently purchase the agile wed
dev on rails. i am still at the beginning of the book trying to create
the scaffold for the depot_development database. Everytime i run the
generate scaffold products admin, i recieve the "before building the
scaffold, try to create a table for model products" etc...
a few questions:
1. How does ruby know that
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working
on and am really happy with the way it''s going. Unfortunately, all my
attempts at writing functional tests for them fail. Trying to duplicate
my normal controller tests I have:
require File.dirname(__FILE__) + ''/../test_helper''
require File.dirname(__FILE__) +
2006 May 18
6
Newbie:problem when using validates*
Hi,
I have performed the cookbook tutorial. Before tailoring the views and
controllers, when I put in the model recipe.rb:
validates_uniqueness_of :title
validates_length_of :title, :within => 1...20
And I tried to introduce some new recipe without the above conditions I
got the message:
---------------------------------------------------
New recipe
1 error prohibited this category from