Displaying 16 results from an estimated 16 matches for "eggie5".
2007 Oct 06
3
Prototype: resp.getHeader('Location'); redirects browser
Why when I call resp.getHeader(''Location''); after my ajax call does
the browser get redirected to the location header. I just want to get
the value of it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to
2007 Aug 23
6
Calling a method on class creation
I have a model User that has property called status. Status is just a
string that can only be evaluated and not persisted. I.e. it doesn''t
have a field in the user table.
Anyways, I would like a method get_status to be called anytime I
create a new instance of User. For example:
user=User.new
Since I created a new instance of User, I should now have access to
the status property, e.g.:
2007 Nov 08
5
Rails byte-range request support
Hi,
I''m trying to serve the iPhone a video file from my controller using
send_file. However, it appears as thought the iPhone requires byte-
range request support and rails doesn''t seem to support this.
If I give the iPhone a url that points to an actual file (i.e. it''s
served by my webserver nginx, instead of rails) it downloads and plays
it fine.
Here is the proof
2007 Nov 07
2
Setting headers in sent_file response
I''m having trouble playing a video from my site on the iphone using
send_file. It seems that I''m missing the Accept-Ranges header in my
response. How can I set the Accept-Ranges header in my send_file
response?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2007 Dec 18
2
Active Resource and non default model names
I have a model (accessed restfully) named TranscoderQueue, it''s name
is overridden to ''TransocderQueue'' so it is accessed as ''/
transocder_queue'' as opposed to ''/transocder_qeueus''.
class TranscoderQueue < ActiveRecord::Base
belongs_to :campaign, :class_name => "Campaign", :foreign_key =>
"campaign_id"
2007 Nov 08
5
byte-range requests
I''m trying to sent a file to the iphone (which requires byte-range
request support) using the rails send_file method. However, this
fails, I think because of mongrel. I think so because if I send the
iphone a file handled by nginx, it plays it fine. But then when I
serve the file with rails the iphone can''t play it.
Any ideas?
Alex
2007 Aug 25
1
small yaml problem
Rails seems to throw errors with this yaml:
one:
id: 1
_3g2: true
_3gp: false
mp4: false
What''s the deal?
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2007 Sep 21
1
generating nested resource path
I have a nested resourced called attachments:
(routes.rb)
map.resources :content_campaigns do |content_campaigns|
content_campaigns.resources :attachments, :member => { :download
=> :get}
end
But, I can''t seem to generate the new path after I create a new
attachment:
(attachments_controller.rb)
format.xml { head :created, :location =>
attachment_url(@attachment) }
2007 Sep 30
1
to_xml node names with underscores
When I call to_xml on my active record objects, it replaces
underscores with hypens. E.g.:
<categories>
<category>
<content-provider-id type="integer">1</content-provider-id>
<id type="integer">2</id>
<name>Traffic Alerts</name>
</category>
</categories>
When the actual field is content_provider_id. I remember
2008 Feb 05
9
ActiveResource / Creating an API
Hi,
I am currently looking at creating an api for a new RESTful app built
using rails 2.0. The two solutions I have come across seems to be
ActiveResource and ActionWebServices.
Although there seems to be plenty of documentation for the older
ActionWebServices (both online and in books), this does not seem to be
the case for ActiveResource.
Does anyone know of any decent articles / screencasts
2007 Sep 28
2
Rails shouldn't output invalid JSON by default
Please check out this ticket (which would explain almost everything):
http://dev.rubyonrails.org/ticket/8762
So basically, Rails to_json methods produces invalid JSON out of the
box as it doesn''t quote all hash keys. This is valid JSON:
{
"id": 6589,
"code": "SIN",
"name": "Singapore"
}
This is not (Rails'' JSON encoders
2007 Sep 18
10
How do i make rails wait until an ffmpeg call is complete?
In my app i upload a file, convert it with ffmpeg, delete the original
and make a small thumbnail out of the big thumbnail ffmpeg makes.
At the moment it seems like these actions are tripping over each other -
how can i make the app wait until ffmpeg has completed it''s output
before doing the next thing?
--
Posted via http://www.ruby-forum.com/.
2007 Nov 05
0
calling a method after deliver
Hi, I am trying to call a method after message is delivered via
MyMailer.deliver_message. Is the below the same as this?
MyMailer.deliver_message
create_sent_record?
class MyMailer < ActionMailer::Base
def message( subject, body, recps, sent_at =
Time.now)
@subject =subject
@body = body
@recipients = recps
@from =
2007 Nov 15
0
errors starting god
I was able to run god earlier in the day, but now I get this error:
# god load config/mms-service.god
The server is not available (or you do not have permissions to access
it)
Anybody know what this error means?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2007 Dec 01
0
REST API Documentation
I have a REST API and I need documentation for it. Rather then do this
by hand and update it anytime there are changes, I was wondering if
there are any services out there to generate my documentation.
Something like ruby doc but tailored to a rest api.
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2008 Jan 20
0
Deserialize JSON post body
I''m doing an HTTP post to my controller with an xml request body:
curl -u 53b2c:X -H "Content-Type: text/xml" -v -d
"<subscriber><full_name>Alex Egg</full_name><carrier_id>2</
carrier_id><mobile_phone>1234321843</mobile_phone><password>asdf</
password><sub_categories