Displaying 9 results from an estimated 9 matches for "tamosuna".
Did you mean:
tamosunas
2007 Nov 29
4
collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"
I have a Project that has_many Tasks. Tasks belongs to a Project. When
I try the following:
project = Project.new
project.tasks.build
I get:
>> s = Project.new
=> #<Project:0x25f9e28 @attributes={"name"=>"", "end_at"=>nil,
"updated_at"=>nil, "published_at"=>nil, "user_id"=>nil,
2009 Jun 05
15
Rails Code Indentation
Hi All,
Rails code must be readable, formatted and well indented.
I wanted to do indent code in my previous projects.
Is there any built in rails plugin/gem that can help me to
indent my existing code.
Any ideas will be really appreciated !
NOTE: Please don''t suggest editor plugins.
Thanks & Regards,
Sandip R~
--
Ruby on Rails Developer
http://sandip.sosblog.com
2007 Feb 26
2
boolean db fields set to false fail validation with validates_presence_of?
I have a model that contains a :boolean field. In my view, I have a
simple select of Yes or No, which equates to true or false,
respectively. If I choose yes and save, everything works great. If I
choose no, my model fails validation as I have this set as a required
field using validates_presence_of. I have checked the log and it''s
definitely set to false, why would this fail validation?
2007 May 11
5
options_for_select - how to set the selected value?
Ok, this should be simple but I am finding it''s not and previous
postings don''t seem to shed too much light on this.
I have a select_tag with 4 values pulled in via a helper:
def filter_hours
filter_hours = [
["1 hour", 1],
["24 hours", 24],
["7 days", 168],
["14 days", 336],
]
end
The select_tag looks
2007 Feb 26
24
Ruby/rails port of Cocoon/hibernate
Hi,
I''m currently running an apache/jboss cocoon/flow/hibernate/ajax
paypal (directpayment) project and am looking into the possibility of
porting it across to ruby/rails. For that reason I would like to know
the following:
1. Can I call my java classes or would I be looking at a complete
rewrite in ruby?
2. How effective is ruby in terms of seperation of concerns regarding
design from
2007 Aug 26
0
form_for not translating into the same controller/action
I have a form_for tag in my view:
<%form_form :network, :controller => :network, :action => :create do |
form|%>
which is translating into the following when I view the source:
<form action="/network/my_networks" method="post">
Why would this be happening?
Thanks,
Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message
2007 Feb 27
1
Trying to retrieve a model from the session that uses acts_as_attachment - segmentation fault in mongrel
I am using acts_as_attachement on my Photo model to upload a photo. I
have a wizard-like set of pages that the user can step through. Rather
than save the photo to the db/filesystem I want to save it to the
session until the user hits save.
Saving to the session appears to work fine, however, when I try to
retrieve anything from the session afterwards, I get:
2007 Mar 23
0
Error - Conflicting types for parameter containers
...I hit
submit, I get the following error, anyone run into this error before?
Thanks,
Scott
Conflicting types for parameter containers. Expected an instance of
Hash, but found an instance of String. This can be caused by passing
Array and Hash based paramters qs[]=value&qs[key]=value.
/Users/stamosunas/workspaces/ruby/mgs/config/../vendor/rails/
actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:204:in
`type_conflict!''
/Users/stamosunas/workspaces/ruby/mgs/config/../vendor/rails/
actionpack/lib/action_controller/cgi_ext/cgi_methods.rb:168:in
`container''
/Users/stamosunas/w...
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
...ge if not found:
def photo_filename
retval = "/images/no_image.gif"
unless not photo.nil? then
retval = photo.public_filename
end
retval
end
For some reason, Product.photo_filename keeps returning my $HOME
directory:
No such file or directory - "/Users/stamosunas"
The whole trace is below... it seems to be in the attachment_fu code
itself where there is a problem:
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/
lib/ruby/gems/1.8/gems/RubyInline-3.6.3/lib/inline.rb:75:in `mkdir''
/Applications/Locomotive2/Bundles/stand...