Displaying 8 results from an estimated 8 matches for "the_id".
Did you mean:
the_sid
2006 Jul 12
7
Failure in comparisons
I''m basically a Ruby noobie.
At the moment I''m having a fair bit of trouble trying to figure out
what''s going wrong here (partial template):
<%=
@project = Project.find(@the_id)
if current_user.userid == @project.client
hidden_field ''messages'', ''recipient'', ''value'' =>
@project.project_manager
else
hidden_field ''messages'', ''recipient'', ''value''...
2007 Sep 06
2
Wordpress Javascript Index Loop
I want to use javascript to display the categories that the post is
filed under when a icon/image is clicked. The list of categories
should expand at the bottom of the post under the icon(s).
This works great on the single post page, but the index (main) page
lists 10 posts, and it will only work on the first post. No matter
what post icon is clicked the first post expands. I think I
understand
2004 Nov 22
0
Can''t set then read id on AR class in 0.8.5
...hild it can''t get the ID of the parent to insert into the foreign key
field. I''ve worked around this by saving the parent record before I
try to save any children. However I was very confused for a while that
I couldn''t read back the id I had set. Perhaps something like:
the_id = read_attribute(self.class.primary_key)
the_id unless new_record? and the_id.nil?
Would work better??
Chris
2006 Sep 26
9
Encrypt URL Params, such as the id
Is there any easy way to encrypt the URL params that is seen in the URL.
I dont feel comfortable exposing the id of the models to the external
user.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Feb 26
2
How to capture the last DB insertion id ??
Hi all,
I''ve got a model - Images - and when I insert a new image into that
db,table I would like to grab hold of the last insertion id of that
row/record and then process it further and save reworked version back
into the db.table again.
Example: a new image gets inserted as a db.table.row with ID =
12345678 (id = primary key)
The ID (12345678) is then retrieved and processed
2007 Mar 04
4
Rails functional testing and Mocha
...by billing the customer twice I
get a failure too:
#<Mock:0x11e5312>.bill - expected calls: 1, actual calls: 2
Implementation wise it looks like this:
A intermediary class AnyInstanceWithID. A method is defined on Class
that provides you with instances of it
def any_instance_with_id the_id
@AnyInstances = {} unless defined? @AnyInstances
@AnyInstances[the_id] ||= AnyInstanceWithID.new()
end
AnyInstanceWithID is a sort of proxy thing on which you set
expectations. It keeps them until it can set them on the real
things. It looks very much like Mocha::Mock (there'...
2006 Jul 17
2
after_save deletes is an exception is raised?
Does after_save in a model delete if an exception is raised in there?
I simply did
def after_save
raise ''hmmm''
end
and it raised the exception but there was nothing in the database. I
removed that entire method and its in the database. Is this correct?
Thank You,
Ben Johnson
E: bjohnson@contuitive.com
-------------- next part --------------
An HTML attachment was
2011 May 23
3
Passing a period as part of an id in show action
...do the following in a RESTful manner:
I have a web service that accepts an id to deliver a particular
record. Unfortunately, the id that the client will have is not the
usual database sequence number. This mostly works, though, and the
url
looks something like:
http://myservice.com/controller/the_id.xml
That is handled by the "show" action.
Unfortunately, some of the ids that will be passed contain special
characters. I can require that they be encrypted, but the period
seems
to be having a problem. In other words, if the id is "the+id. value",
the url should be:
htt...