Displaying 15 results from an estimated 15 matches for "craigwh".
2010 Apr 13
5
params[hash] and link_to.... easy question... but I am stupid :)
routes.rb
map.connect '':controller/:action/:id/:draw_id'', :controller =>
"admin", :action => "edit_position"
In a view I have:
<%= link_to "#{@draw.positions[0].team}", { :controller
=> :admin, :action => :edit_position,
:id
=>@draw.positions[0].id, :draw_id =>
2008 May 28
2
functional testing joins table problem
I have models/controllers
Class Facility
has_many :facilities_services, :dependent => :delete_all
Class Service
has_many :facilities_services, :dependent => :delete_all
Class FacilitiesServices
belongs_to :facility
belongs_to :service
so in my test/functional/facilities_controller_test.rb, I have
post :destroy, :id => 5
which tosses an error...
2008 Apr 02
9
Problem getting the most recent has_many associated object
I can''t get my view to display the most recent parameters from an
associated object in a view... here is a birds-eye of my app:
I have two models, Ferms and Kinetics. Ferm has_many :kinetics,
Kinetic belongs_to :ferm. Kinetic has the fields ferm_id, brix and
temp.
In my ferms/index view I have a table listing the attributes of each
ferm instance. I would like to display the most recent
2008 May 30
4
deprecation warnings
I''m still using 1.2.6 and have an eye on upgrading to 2.0 so I monitor
the logs for deprecation warnings. I thought I was clean and
log/development.log shows nothing when doing ''grep deprec
log/development.log'' but in testing, one of my testing controllers
throws a bunch of these on screen...
2009 Jan 01
2
Ruby on rails API website suggestion
I would like to request a feature.. like: http://rubyonrails.org/function
and it
will search inside http://api.rubyonrails.org for the function and
show it.
Like PHP has.. http://php.net/basename
Example: http://rubyonrails.org/truncate and it will points to
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001541
That woul be cool.
Thanks
2009 Jan 01
2
Ruby on rails API website suggestion
I would like to request a feature.. like: http://rubyonrails.org/function
and it
will search inside http://api.rubyonrails.org for the function and
show it.
Like PHP has.. http://php.net/basename
Example: http://rubyonrails.org/truncate and it will points to
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M001541
That woul be cool.
Thanks
2007 Mar 09
3
Password protecting access to script/console ?
Sorry if this is asked and answered before, is there away to password
protected access to script/console ?
I''ve seen a few posts on how to protect/encrypt the db passwords in
database.yml, but that still leaves unprotected access to pretty much
the same data via the console.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received
2008 Sep 27
3
make a system call and proceed without waiting for result?
This is probably a general ruby question: in one of my models i need to
make loads (up to 600 or so) of system calls with the curl command.
It''s a fire-and-forget kind of deal - i don''t care, at that particular
moment, whether the calls were successful or not and i certainly don''t
want to keep the user waiting for the html responses to come back.
Is it possible, with a
2011 Dec 17
39
Stack Level Too Deep Error (can't seem to figure it out)
Hi all,
I am running into a weird issue where my application is giving me a
stack level too deep error. I can''t seem to find where my code is
throwing this error. On the machine I developed this code on, this
error does not show up when I run rails s but when I move the code to
another system to run it this error shows up.
The system that this code runs fine on is a mac os x machine
2006 Nov 02
4
application controller security
Shouldn''t everything in the application controller be protected by
default?
I just realized that my app can be called like this:
www.myapp.com/application/method and it actually tries to run that
method inside my application controller.
Is everyone else just adding "protected" at the top?
Thanks,
Chad
--~--~---------~--~----~------------~-------~--~----~
You received this
2008 Jun 19
3
LDAP Authentication fails with ñ character in password.
Hi Guys,
I''ve got a rails application that uses activeldap to authenticate
users. Its been working great for about 6 months now, but a user from
mexico started using it recently, but can''t seem to login. I''ve
narrowed it down to the fact that his password contains a ñ character
in it. This problem is also present in a test user account I''ve setup.
ActiveLDAP
2010 Apr 14
3
PGError: duplicate key
I''m running a rails 2.3.5 / ruby 1.8.7 / postgresql 8.4.2 app and have
just run into a curious problem.
I have several tables that are initialized with data from csv files
and I''ve noticed that, when I try to add new data to any of these
tables via Table.new I get a PGError on duplicate key.
For example:
MIGRATION:
class CreateNumbers < ActiveRecord::Migration
def self.up
2011 Sep 11
3
bundle install question
Having a problem...
I am working on a project where I am using bundle & Gemfile and it''s
working OK. The gems are all installed and a few git based gems are in
my ~/.bundler/ruby/1.8 directory which is OK I guess.
When I did an svn commit and checked it out on another user''s account, I
then ran ''bundle install'' from his account and even though all of the
2008 Jun 28
14
Date Field convert to Seconds since Epoch
Hi, I was wandering if anyone could help me with this problem:
Right now I am using a field in my database which is of type
''Date'' (in the form dd-mm-yyyy). I would like to convert this value
(for example 26-06-08) into a number of seconds since epoch or into
another form so I can compare it with todays date (from Date.now) so
that I can tell the difference between the two dates
2008 Jul 16
2
Error when running my unit test...
Hi Rails team
Learning ROR, and is doing the chapter with test..... feel like
skipping this, but....
(using NetBeans IDE 6.1)
I have created this story_test.rb, and when I run the ''rake test:units
(selected from the GUI), I get this error:
(in /data/NewOrder/Projects/ROR/shovell)
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke environment