Hi.
I'm trying to get streaming to work on a rails 3.1 app with ruby 1.9.2. The
action sends a big XML file.
The file looks like:
<% @files do |f| -%>
<%= render_file_source_xml(f).html_safe -%>
<% end %>
I would like the render_file_source_xml call to be streamed as it's
processed. Is it po
Hey!
I'm working with an app where migrating to ruby 1.9.2 is currently not an
option, so I can not use Rails 3.1 streaming.
One of the features is sending large XML and CSV files. In Rails 3.0 I used
the self.response_body {} hack which worked pretty OK.
This stopped working in Rails 3.1.
Ho
Hi!
After upgrading to Rails3 and the latest plugins, two of the plugins:
delayed_job and oauth_plugin don't work.
They display a similar problem, I am not able to use methods they
provide. In delayed_job's case I can't use Model.delay.method
(undefined method) and with oauth_plugin adding oauthe
Hi!
With Rails 2 template.base_path and template.name were available in
views.
What are the Rails3 equivalents?
--
M.
--
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-t...@googlegroups.co
Hi.
Is there a way to disable the default xss escaping of everything in
rails3?
What's the proper way of doing string concatenations like below with
rails3 if xss escaping can not be disabled:
"something #{link_to('something else') if value == true}"
--
M.
--
You received this message because
Hi.
Is there a way to disable erubis auto escaping? I understand the
implications, and in our project everything in sanitized during input.
On the other hand, we use a lot of:
<%= "#{translate something} value #{translate another thing}
#{link_to ..}" if something else %>
Because of string inter
Hi,
Is there a way I can figure out which files are run for a specific
URL?
Given http://www.planet.com/countries files like: countries/
index.html.erb, countries/_country.html.erb, layouts/
application.html.erb and so on.
Thank You
--
M.
--
You received this message because you are subscribe
Hi,
Is there a way I can figure out which files are run for a specific URL
in a controller or a script?
Given http://www.planet.com/countries files like: countries/
index.html.erb, countries/_country.html.erb, layouts/
application.html.erb and so on.
Thank You
--
M.
--
You received this messa
Hi.
>
> > It's a high volume app, that's written as a standalone service.
> > Extending it as a hosted solution and keeping updates nice is a big
> > part of what the project is about.
>
> And all of that would be easier with one big DB, at least as far as
> you've described.
>
You are right, it w
Hi,
> Generally, you don't need a separate DB for each subdomain. One big DB
> is usually better.
It's a high volume app, that's written as a standalone service.
Extending it as a hosted solution and keeping updates nice is a big
part of what the project is about.
--
Cheers,
M.
--
You receive
Hi.
I'm in a situation where I have to provide a hosted Rails App
solution. I'm running Apache with passenger in the backend.
What is the proper way to change the DB depending on the subdomain?
Should I use data_fabric?
--
R.
--
You received this message because you are subscribed to the Googl
Hi,
I've been trying to implement a versioned API, I went through
different versions that I didn't like.
I am wondering if I can do something like this with routes, and if
it's possible how can it be implemented:
api.example.com/items/show.xml works, no version
api.example.com/v1/items/show.xml
Hi.
Is there any alternative to the theme support plugin? I know it has
been ported to 2.3 by James Steward(which did an awesome job).
At the same time I am worried that coming 3.0 everything in that code
will break. I am at the beginning of the dev cycle for themes so I
would prefer a newer, p
> With routing.
>
> Start off with api.startup.com/v1/session/create, then move on to
> api.startup.com/v2/session/create, etc.
>
Interesting. That would be a pretty solution.
What's the best way to provide backwards compatibility using this
model? Should I have XML views that implement:
if ver
Hi.
What's beautiful about Rails is that it provides the incredibly easy
system for API building.
At the same time once you grow and production test the application you
start finding that you can make the API interface even better. But you
have to break backward compatibility.
How do you handle
Hi,
When sending mails often enough they are sent to another party than
the current logged in user (like when commenting on a blog), and that
user can have another default i18n.
It would be nice to be able to specify a local I18n for ActionMailer.
There is a plugin that does this: http://github
Hi,
When sending mails often enough they are sent to another party than
the current logged in user (like when commenting on a blog).
It would be nice to be able to specify a local I18n for ActionMailer.
There is a plugin that does this: http://github.com/Bertg/i18n_action_mailer
In my case it
Hi.
Is it possible to catch globally missing translations?
I want to see if users arrive at a page without one or more
translations, and receive via email the missing key string and page.
--
M.
--~--~-~--~~~---~--~~
You received this message because you are subsc
Hi.
What is the proper way to handle situations where you need
pluralization with and without adding the count?
The best I could think of is to write it twice:
item:
one: 'item'
other: 'items'
c_item:
one: 'one item'
other: '{{count}} items'
It's not very DRY.
I guess there should be
Hi,
Is it possible to use "find_with_ferret" and GROUP BY together?
Count(*) doesn't return what will_paginate expects when using GROUP
BY, and AFAIK a workaround for that is to manually get total_entries
and pass it to Model.paginate.
However how does that work with find_with_ferret where I ha
Hi,
Has anyone encountered a problem where IE6 rejects all P3P policies
sent by Rails/Nginx?
I had a simple setup that worked in 2.2.2 and it doesn't anymore:
Server: nginx/0.6.32
Date: Fri, 10 Apr 2009 00:03:36 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie:
_app_
Hi,
AFAIK after_create is called after_save if the entry does not exist in
the DB.
Is there a way to tell if a specific model is new or not in
after_save?
I have to do something like:
def after_save
add_to_history 'save'
end
def after_create
add_to_history 'create'
end
However after_save
> With Ferret you can scale reads horizontally: you can have multiple read
> servers on a single index. You can only have one write server on a
> single index or you'll risk data corruption.
>
> Another strategy is partitioning: having separate indices for buckets of
> data. Each index could run o
Hi,
Does any have experience scaling full text search in RoR?
Right now our project is running a simple setup with ferret and
acts_as_ferret. We are thinking about deploying a feature that would
send 50x more search requests.
So we probably have to rethink our solution. How do services like
sea
Hi,
I have a model with a serialized field 'other_data'.
How can I add raw YAML data to that field?
If i try:
model[other_data] = yaml_formatted_data
yaml_formatted_data gets YAML formatted again.
--
cheers,
M.
--~--~-~--~~~---~--~~
You received this message bec
Hi.
I'm trying to add and validate objects using RJS.
I have a page where if a user clicks on a link a form partial is
inserted via javascript(depending on the click).
If that form is valid I would like to remove it and display the
object, otherwise rewrite the form with the errors inline(next
Hi.
Is there a way to stop rails from tokenizing a mysql query? I have an
association where I need to change :select to:
:select => "*, (select count(something_id) from second_table where
second_table.something_id = main_table.id ) as count"
It works OK without loading associations, however
Hi,
My project uses Date::MONTHNAMES and Date::ABBR_MONTHNAMES for
localization.
I've run into an issue where I need to use strptime to parse a
localized string.
Has anyone run into this? How did you fix it?
--
M.
--~--~-~--~~~---~--~~
You received this messag
gt;
> class MyObject < ActiveRecord::Base
> def helper_method(obj)
> "something-from-obj-#{obj.id}"
> end
>
> defto_xml
> xml = super
> close_tag = ""
> xml.gsub(close_tag, " #{self.helper_method(self)}\n#{close_tag}&
Hi,
I have an array with objects and I want to generate an XML like:
1
result 1
2
result 2
The helper method generates some urls and it needs as an arguments the
object.
What would be a proper way to include the result of that method call?
I guess bui
Hi,
Is there a way to temporarily disable attr_protected for create and
save method calls?
Something like save_without_protected...
--
M.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
Hi,
A call to to_xml(:only => [:field], :include => :association]) will
filter the association result too(the resulting association will only
have :field).
Is there a way around this?
I want to specify different filters for the main object and the
association.
--
M.
--~--~-~--~~---
Hi,
I've started the long task of adding an API to a project of mine.
Since I need to write a PHP library for it I will use for inspiration
the one for Basecamp(http://github.com/quirkey/basecamphp/).
However that library uses http authentication, and I have a setup with
restful_authentication(
> If you haven't read the docs for ActiveResource, I'd start there.
>
One of the tasks of my project is that I have to create a PHP library
that people can use to connect to this application.
Is there a library that implements a PHP - RoR XML connection?
--
M.
--~--~-~--~~--
Hi,
Is there a book or screencast or documentation that provides best
practices for creating an API for a RoR application?
I have to build an API from scratch and I have no idea where to start.
--
M.
--~--~-~--~~~---~--~~
You received this message because you are
35 matches
Mail list logo