Displaying 18 results from an estimated 18 matches for "iphan".
Did you mean:
phan
2006 Mar 07
2
webrick RoutingError
...lem of rails version? I am trying out act_as_tree in
the model definition.
The complete error:
Processing Base#index (for 127.0.0.1 at Tue Mar 07 19:16:58 CET 2006)
Parameters: {}
ActionController::RoutingError (Recognition failed for
"/keywordeditor"):
/home/sun-000/SwissProt/iphan/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/routing.rb:444:in
`recognition_failed''
/home/sun-000/SwissProt/iphan/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/routing.rb:434:in
`recognize!''
/home/sun-000/SwissProt/iphan/lib/ruby/gems/1.8...
2006 Aug 10
6
save without commit ?
How do I get ''save'' to execute without commit?
I have tried:
ActiveRecord::Base.connection.begin_db_transaction
# do some stuff that doesn''t issue a database COMMIT statement
# then:
@myObject.save
# this issues a COMMIT but it shouldn''t! Shouldn''t it wait until I''ve
called:
ActiveRecord::Base.connection.commit_db_transaction
?
what am
2006 May 10
8
dynamic setting of username and password in database.yml
Hello
I''ve now read a lot about application-level authentication in Rails, but
I need to do database-level authentication.
The reason is that my database needs to have the current_user (database
current_user, not current_user defined in an ActiveRecord Model) set to
execute triggers for automatically updating audit tables. So it is not
enough to have a session check against a User
2006 Jun 01
2
update_all broken in postgres?
Hi
has anyone managed to use update_all with rails on postgres?
In my setup, it does not work:
>> @keyword.update_all(myupdates)
NoMethodError: undefined method `update_all'' for #<Keyword:0xb7ac4670>
from
/home/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1786:in
`method_missing''
from (irb):14
I checked that the base.rb
2006 Jun 01
4
how can I control when to commit a transaction?
hello
it seems like this question has appeared a few times with no answer:
how do you get rails to issue ''write'' statements (ie ''CREATE/UPDATE'') to
the database without committing each time?
I tried setting
ActiveRecord::Base.connection.begin_db_transaction
before calling any action on my object, but as soon as
myObject.save
or
myObject.update
is called,
2006 Jun 01
4
Ruby on Rails strange issue
Hello,
I just installed Ruby on Rails and created the new repository.
I wanted to use Ruby on Rails with FCGI
The repository was created in /path/to/public_html
ls /path/to/public_html/ :
app cgi-bin config doc log public README script
tmp
asd components db lib logo.jpg Rakefile README_LOGIN test
vendor
I installed fcgi support for ruby on rails and
2006 Mar 08
2
where is version1.1
installed latest rails from gems.rubyonrails.org
it says its installing rails-1.0.0.3801
how do I get rails-1.1 ?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 08
3
Namespace & Organisation Conventions
Hi All
I wanted a little advice on the convention for namespace usage and
organisation of code.
I originally used PHP and often had an "admin" backend that performed the
various admin tasks with users, and data
Then I had a front-end often situated at the root that had user services.
I''m trying to emulate this in Rails but feel I''m missing a significant point
here and
2006 Apr 07
2
errors.add_to_base
What are the limitations on using:
errors.add_to_base
to display errors in views?
I have tried for days to add errors from my object.rb and they never get
displayed.
class Keyword < ActiveRecord::Base
validates_presence_of(:name, :message => "Name is required.")
validates_uniqueness_of(:name, :message => "This name is already in
use. Please try
2006 May 03
2
render partial collection
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>
2006 May 03
0
render partial collection passing property
my view contains a call to a partial:
<%= render(:partial => ''item_list'', :collection => @keyword.synonyms,
:locals => { :action_delete => "removesynonym", and_some_other_stuff
})
%>
_item_list.rhtml contains:
<%= link_to (
image_tag(''/images/deletebutton.png''),
{ :action => action_delete,
:id =>
2006 May 31
0
how to disable callback
How do I locally disable a callback from being performed?
My class has
class Keyword < ActiveRecord::Base
after_update :switch_versioned
private
# Callback used to warn the user that an updated record
# has not been saved in the version table
def switch_versioned
logger.debug "coucou"
self.versioned= false
end
But another class has a
2006 May 31
0
restrict callback to fields
please can some kind soul point me to the right track.
how can I express:
"do something when any field of this class is updated except field X"
I need to do anything that would behave like
after_update :do_something #unless the updated field is field X
that is: after_update is called every time a set_ method is called,
except set_x
Is that at all possible?
Isabelle
--
Posted
2006 Apr 28
2
cannot kill infinite loop. please help
an error in my rails code caused the framework to send an infinite
number of SQL calls to the database. I killed the webrick server,
restarted postgres, deleted the /tmp file in my rails application,
deleted the bad code, restarted firefox, restarted the webrick server.
All to no avail.
As soon as I try loading my application, the infinite recursion starts
again.
I can no longer work. This
2006 Mar 08
0
acts_as_tree circular reference
my application is using acts_as_tree to create a directed graph.
Everyone would work fine, except that nothing prevents the user to
create a circular reference:
>> item.parent=child
>> item.save
=> true
>> child.parent=item
>> child.save
=> true
I checked in the database, and there it is: an item that has as parent
its own child!
item.parent_id = child_id
I
2006 Mar 28
1
stylesheet_link_tag and apache2
On apache2, my rails application cannot access my stylesheet.
<%= stylesheet_link_tag ''my_railsblog_stylesheet'' %>
however, all is fine if I run my application on webrick!
why? Am I doing something wrong with my apache configuration:
# My Apache configuration
<VirtualHost 10.0.0.14:8091>
ServerName 10.0.0.14:8091
DocumentRoot /home/ac/railsblog/public/
2006 Apr 05
4
validation on before_add callback
problem: validation error is not functionning in callback
callback for many-to-many association:
# keyword.rb
:before_add => :reject_self_related
def reject_self_related(related_keyword)
if (related_keyword == self)
# this does not work:
errors.add(:name, "Relating a keyword to itself is
forbidden!")
raise "Relating a keyword to itself is
2006 Apr 07
6
validation nightmare
Please help, I am really at a loss at how validation is supposed to work
in rails.
Model contains
acts_as_tree
I want to force my NEW objects to have a parent
I do NOT want existing object to have a parent
so I only want to have parent_id on create, NOT on update.
I am trying this:
def validate_on_create
validates_presence_of :parent_id, :message => "You must specify a