Hi.
I have a situation where the user is POSTing to the controller and the
controller will
1) send an email using a view template
2) respond xml over HTTP response without using a view template
The test contains a line with
assert_template ''
which verifies that no template is used for HTTP
If anyone is using Rails on eCryptFS then this Pull Request might have interest
Currently Rails fails (in a rare sistuation) on eCryptFS
The Pull Request solves that problem.
Jarl
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post
Jarl Friis j...@gavia.dk writes:
Thanks Xuan and Colin for your attention.
Xuan xua...@gmail.com writes:
You may try adding a default_scope :select='id, name, etc' to
your model. This would accomplish what you are looking for,
That was exactly what I was looking for.
My actual
Hi.
In many areas in the AR API you can specify a :select option to select
only a subset of columns.
Is there any way to change the default selected columns (which is *)
to a subset of columns for a whole model.
such that when I write Model.find(1) it gives me an instance with
only, say 3 (out
Hi.
I am looking for some reporting library for rails.
Does anyone have experience with such libraries, until now I have
found
* Ruport (Ruby reports) (http://www.rubyreports.org/)
* reportable (http://github.com/saulabs/reportable)
* ReportBuilder
Hi.
This may seem like an absurd request. However it is becausy I
integrate with a legacy system.
I am in the need to respond partial content (flush) before the action
is fully complete. This should prevent the legacy system to timeout.
I need to send HTTP headers and some content (to indicate
Hi.
I have an AR model named Order, and a field in the DB named expired. I
dont want this field to be modified from outside the model.
Therefore I have declared a private method expired=(value) in my Order
model.
This works fine in development and production; If I call o.expired =
nil I get a
pfs pontus.stromd...@gmail.com writes:
m. this is not a snow leopard issue, try running script/console
production and it will work. Because you need to have
config.cache_classes set to true in the environment, and development
you probably want to that turned off.
Take a look at this. Seems
Hi.
I am using rails 2.3.5
I just installed exception_notification 2.3.3.0 using 'sudo gem install
exception_notification'
I have add config.gem exception_notification in environment.rb and
'include ExceptionNotification::Notifiable' in application_controller.rb
Now I am trying it out in
Hi.
I would like to start using unit_record (in combination with shoulda
and mocha)
I would however like to share some experience and best practise about
this with others.
Does anybody else here on the list use this setup?
Jarl
--
You received this message because you are subscribed to the
I have a contrller that receives data (by POST requests) from an
external system. The external system formats the number according to
danish traditon, that is PI=3,1415, and 3/4 = 0,75.
This gives me problems in my activerecord when specifying these
attributes to numeric, that is using
Robert Walker li...@ruby-forum.com writes:
Jarl Friis wrote:
Philip Hallstrom phi...@pjkh.com writes:
CREATE TABLE properties (
add_index :properties, [:namespace, :name], :unique = true
After trying this and opening my interactive SQL prompt (psql), I can
see that this only creates
Philip Hallstrom phi...@pjkh.com writes:
Philip Hallstrom phi...@pjkh.com writes:
On Feb 24, 2010, at 11:17 AM, Jarl Friis wrote:
Hi.
This must be the most obvious thing to do, but I just can't seem to
find examples of how to do this. I would like to create a table
with a
table unique
Philip Hallstrom phi...@pjkh.com writes:
Hi.
This must be the most obvious thing to do, but I just can't seem
to
find examples of how to do this. I would like to create a table
with a
table unique constraint on database level.
In deed some migration code that would generate the following
Philip Hallstrom phi...@pjkh.com writes:
On Feb 24, 2010, at 11:17 AM, Jarl Friis wrote:
Hi.
This must be the most obvious thing to do, but I just can't seem to
find examples of how to do this. I would like to create a table with a
table unique constraint on database level.
In deed some
Hi.
This must be the most obvious thing to do, but I just can't seem to
find examples of how to do this. I would like to create a table with a
table unique constraint on database level.
In deed some migration code that would generate the following SQL
CREATE TABLE properties (
namespace
Thanks for your comment Philip.
Philip Hallstrom phi...@pjkh.com writes:
I am looking for a plugin to handle files (images actually).
Here is a list of features that I would like
1) I would like many images for a single model. (has_many)
2) I would like to store images in several
Hi.
I would like to make a performance test using rails 2.3.3
I see there is a generator called performance_test, but can someone
give me a link to a url that gives some examples.
I have read
http://guides.rubyonrails.org/performance_testing.html
To me however a test is something that either
Hi.
I hope I don't start a religiuos war now.
I am looking for a plugin to handle files (images actually).
Here is a list of features that I would like
1) I would like many images for a single model. (has_many)
2) I would like to store images in several resolutions (automatically)
3) I would
Jason Stewart jason.m.stew...@gmail.com writes:
You can do something like assert_select a[onclick=?], /regexp
here/
Yes, for now I have made like this:
assert_select a#{PUT}[href=?], order_path(order, :update_timestamp = true)
and I have declared PUT in test_helper like this:
PUT =
Thanks david.
David Angga carsmetic...@gmail.com writes:
1. (*) text/plain ( ) text/html
you can do it like this:
@headers ||= {}
@headers[HTTP_REFERER] = previous_link_url
get/put/post some_link_url, nil, @headers
hope this would help you.
Well I got that far my
Hi.
I can't be the only one in the world having the wonderful idea to have
a resource named image.
I have a controller named images_controller
I have a route named image, and therefore a helper called
image_path(id).
But using image_path in an action view erb file gives problems, there
Hi.
In my view I have a line like this:
link_to('Update timestamp', order_path(@order, :update_timestamp = true),
:method = :put
This generates HTML like this
a href=/orders/2131771394?update_timestamp=true onclick=var f =
document.createElement('form'); f.style.display = 'none';
Hi.
I would like to set @request.env[HTTP_REFERER] in an integration
test, but due to its nature, I would naturally set this value to the
previousle request url. How do I do that.
Thanks.
Jarl
--~--~-~--~~~---~--~~
You received this message because you are
Starr Horne st...@chatspring.com writes:
What does people do here? ignore the fact that the integration test
generate HTTP request which differs from what a broswer will do, or do
you use post (or post_via_redirect) and adding the _method parameter
manually.
I think you're just splitting
etienne pelap...@gmail.com writes:
That overwrites the cookie for the session. By the time they attempt
to login, a session has already begun for them. CookieStore is doing
the management behind the scenes. I want to amend the cookie to have
an expiration date which, it seems, it does not
Jarl Friis j...@gavia.dk writes:
Hi.
I try to create an integration test for a form that updates two models
(order and floorplan), Creating a functional test for this situation
works fine, however I cannot build an equivalent integration test.
I figured out that this was a bug in rails
Arthur Chan rails-mailing-l...@andreas-s.net writes:
Thanks guys,
I kinda understood the basic idea of the TSP. i wanna do something like
heuristic functions. Or, something like:
http://www.ruby-forum.com/topic/127031#new
I don't know if the grid method mentioned is applicable for
Conrad Taylor conra...@gmail.com writes:
First, I would highly recommend getting a good book. Thus, I would
recommend getting a copy of Agile Web Development with Rails 3rd
by Dave Thomas et al.
Yes, this is indeed a good book. Just one con: it develops the
application before writing the
Hi.
I try to create an integration test for a form that updates two models
(order and floorplan), Creating a functional test for this situation
works fine, however I cannot build an equivalent integration test.
My master model (order) contains
has_many :floorplans
Robert Anderson ranom...@gmail.com writes:
1. (*) text/plain ( ) text/html
Start here:
http://en.wikipedia.org/wiki/A*_search_algorithm
This algorithm finds shortest path from initial node to goal node. TSP
(Traveling SalesMan) is aobut visiting all nodes in a graph.
Hi.
I have a has_many relation with a hashed condition, taking from the RI
doc:
:conditions
Specify the conditions that the associated objects must
meet in order to be included as a WHERE SQL fragment, such
as price 5 AND name LIKE 'B%'. Record creations from
Jarl Friis j...@gavia.dk writes:
Hi.
Can any test-guru help me on this one.
Certainly there was.
Thanks for all the answers, also all the posts regarding alternatives.
I will have a look at all this.
Jarl
--~--~-~--~~~---~--~~
You received this message
Kad Kerforn wrote:
when setting it in my environment.rb
config.action_controller.session = {
:session_key = '_myapp_session',
:secret = '3a64394bb895f1f05e0c07f71127d93d'
}
I cannot get it back in the script/console ..
:session_key=_session_id !!!
why ?
Hi.
It seems like many people have had success using rails 2.3.0 with ruby
1.9.1. And as far as I know one of the goals of rails 2.3.0 was to
support ruby 1.9.1.
But on http://rubyonrails.org/download, ruby 1.8.x is still
recomended and ruby 1.9.1 is not even mentioned. Is that because the
Conrad Taylor conra...@gmail.com writes:
Jarl, the current release version of Rails is 2.3.2. Thus, you might to
take a look at the following:
http://guides.rubyonrails.org/2_3_release_notes.html#ruby-191-support
Next, if your rails application(s) requires certain gems and/or plugins,
Frederick Cheung [EMAIL PROTECTED] writes:
Does both as far as I know ( I only had an xsd anyway)
Thanks. the xmllint help says
--schema schema : do validation against the WXS schema
I have never seen WXS as an abreviation for XML Schema Definition
files.
I now made a small rails test helper
Hi.
I am working on a webservice producing xml content, In my rails
functional test I would like to assert that this generated xml
(@reponse.body) conforms to a specific XSD.
What is the best approach to do this?
Jarl
--~--~-~--~~~---~--~~
You received this
James Byrne wrote:
Yugui (Yuki Sonoda) announced the release of Ruby 1.9.1-preview 1:
This is a preview release of Ruby 1.9.1, which will be the first
stable version of the Ruby 1.9 series.
Ruby 1.9.0 was a developmental release only. That was always made quite
clear.
Thank
Ryan Bigg wrote:
Rails 2.0.2 uses sqlite3 by default. Either you:
1. Install sqlite and install the sqlite-ruby gem.
You probably mean sqlite3-ruby. At least that worked for me.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received
Frederick Cheung wrote:
On 12 Nov 2008, at 11:32, Jarl Friis wrote:
I have just created my first rails app
After having modified the generator script (see
http://rails.lighthouseapp.com/projects/8994/tickets/1176-scriptserver-make-an-error-in-ruby-19-because-of-defined-methods-change
)
I
I have just created my first rails app
After having modified the generator script (see
http://rails.lighthouseapp.com/projects/8994/tickets/1176-scriptserver-make-an-error-in-ruby-19-because-of-defined-methods-change
)
I have created controller and I now try to run the generated test, so I
do:
Thanks for the response.
Frederick Cheung wrote:
On 12 Nov 2008, at 14:12, Jarl Friis wrote:
so I
do:
ruby 1.9 is somewhat in flux. You'll want to be on edge rails to
use it.
Sorry english is not my native language and I am completely new ruby
AND
rails. What do you mean
43 matches
Mail list logo