Displaying 19 results from an estimated 19 matches for "sandilands".
2006 Jun 12
2
Validating a non-object attribute in a form via checkbox?
...tribute of the Advertisement model. I
could check that the user has ticked the box in my controller but
would like to bundle this up with the validation process.
How to ensure that the checkbox is ticked before the ad object is
saved as part of the model validation?
Any clues appreciated
Richard Sandilands
2006 Jul 25
2
Shovel/TextDrive error: missing SSHAgent.socket
Hi there
When running the initial ''rake remote:exec ACTION=setup_lighty''
command I get this error:
''No such file or directory - /tmp/501/nl.uu.phil.SSHAgent.socket''
Any clues would be appreciated.
Richard Sandilands
2006 Aug 06
2
assert_difference gives undefined method error in unit tests
Hi there
Am hitting undefined method errors for ''assert_difference'' in my unit
tests under Rails 1.1.4
What could I be missing?
Richard Sandilands
2006 Aug 02
3
Data relationships for e-commerce: users, orders, addresses
...billing addresses
in the scheme (schema?) of things?
I have a copy of the ecommerce Rails pdf by Ben Curtis which is very
helpful on other aspects of the various data relationships, but I''m
hooked up on the relationship between addresses, orders and users.
Any clues appreciated.
Richard Sandilands
2006 Jul 21
3
Credit card processing through Australian gateways (eway etc)
...on credit card processing in a Rails app
through Australian gateways such as eway?
I''m aware of Payment and ActiveMerchant, but neither support
Australian gateways.
It''s a little beyond me right now to hack these to work with eway.
Any clues would be appreciated here.
Richard Sandilands
2006 Aug 08
4
Creating a child simultaneously with parent via form
Hi there
I''ve got a user model and an address model; a user has_many addresses.
A user object can be created via an html form which also allows for an
initial address to be created.
I''ve got a controller method working to save both objects via the
form, but I suspect I can achieve this in a more rails-esque manner.
Here is my controller method:
def signup
@user =
2007 Jan 14
2
rspec and set_table_name?
Hi there
I have a Value class in my Rails app; however ''values'' is a reserved
word in MySQL so in my value.rb file, I''ve declared set_table_name as
''vals''.
However, in setting up my specs for this model, I''m hitting errors
that seem to be resulting from rspec not seeing the set_table_name
declaration in my model file.
For instance,
1999 Jun 10
1
on-access virusscanning on shares
Is there anyone who has (successfully) implemented a method of
on-access virusscanning of files on a samba share?
For Linux, I only know of Sophos and McAfee virusscanners but neither
of them can scan files as they are written or read. Is there possibly
a hook of some sort in samba for this?
Michel.
--
Michel van der Laan - michel@nijenrode.nl
http://www.nijenrode.nl/~michel
2005 Sep 21
0
Basic pagination question
...using the paginate helper.
After reading the Rails docs, I''m still struggling to work out how, in
my ''list'' view, to paginate these records. I guess there''s some stuff
in the wiki on pagination, but it''s down at present.
Any clues appreciated.
Richard Sandilands
2006 Aug 07
1
''Remember me'' in acts_as_authenticated troubles
...y
the first 60 characters of the remember_token string in the database,
whereas the string in the db is 75 characters long.
I can see in my dev log that login_from_cookie is trying to find the
user but using a truncated string to do so.
Any clues how to rememdy this would be appreciated.
Richard Sandilands
2006 Aug 10
0
Consolidating error_messages_for for multiple objects
Hi there
I have a form that saves a user and an address, which are seperate objects.
A user has_many addresses.
How to display error messages for the adddress object which gets saved
via the same html form?
I''m getting all my validation errors for the user object, but no
detailed messages for the address object despite putting
error_messages_for :address in my view.
2006 Aug 17
2
Weird issue with params from form for one user
Hi there
I have an online survey app built in Rails.
I''ve just encountered an odd error where only one user is hitting
application errors. All other users are fine.
>From the log, it seems that no form params are being sent back from a
form, which is comprised of radio buttons.
None of the params from the radio buttons are getting back to the
controller. But the controller name and
2006 Nov 04
0
Check_box woes
I have a User model and an Address model.
A user has_many addresses, and an address belongs_to a user.
An address object for a user could be a billing, shipping or marketing address.
The way I''m tracking this is via the user attributes:
billing_adress_id, marketing_address_id and shipping_address_id in the
user table, which holds the relevant address id.
But in my form that allows a
2006 Nov 04
0
Minimagick issue writing resized file
Hi there
I have a helper method in my Rails app that uses Minimagick as a plugin.
All is fine except for the write step where I attempt to write the
resized file to another directory.
I get the error: "undefined method `to_str'' for #<Array:0x25221e8>"
Here''s my resizing method:
def display_thumb(product_id)
# glob through images/books/thumbs dir to find
2006 Nov 04
0
Functional test issue for testing newbie
Hi there
I''m having difficulty succesfully updating attributes via a post
request in a functional test.
Here''s some pastes:
######################################
# account_controller.rb
def edit_details
@user = User.find(self.current_user.id)
return unless request.post?
if @user.update_attributes(params[:user])
flash[:notice_good] = ''Your account details
2006 May 17
0
Problem with ''require xmlsimple'' in vendor code
Hi there
I''m trying to "require ''xmlsimple''" in some code that lives in vendor/
I''ve installed the xml-simple gem, and can confirm this at the command line
with ''gem list --local'' which shows I have v.1.0.8 of the gem.
However, when I start up lighttpd I get this:
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
2006 May 22
0
RubyGem version error when running rake
All of a sudden I''m getting the following error when running any rake tasks:
"RubyGem version error: activesupport(1.3.1.4342 not = 1.3.1)"
It started happening after doing an update of my gems and installing
the Capistrano gem.
Any clues? I''ve googled around with no success.
Richard S
2006 Nov 04
0
Ez_where question
Hi there
I''m playing with the ez_where plugin but am having trouble formulating a query.
Let''s say that if my params[:search_terms] come back as "Ruby Rails",
then I want to search for all books that have Ruby and/or Rails in the
title.
So how best to set up my ez_where conditions so that book.title is
LIKE %Ruby% and also LIKE %Rails% ?
Any clues appreciated.
2006 Nov 04
0
Model.delete_all vs Model.destroy_all in a habtm
Hi there
I have an habtm association between 2 Models.
I regularly have to truncate the table on one side of the relationship
and repopulate the table with a fresh csv file.
I notice that f I do Model.delete_all, none of the records in my habtm
join table get deleted, whereas if I use destroy_all they do.
However, the overhead of using destroy_all is too great. For the
amount of records I have