Hi,
I'm trying to find a descent solution for the following problem:
Lets say I have a model called List. When you create a list, a name is
required (validation is in place).
But when a user creates a list in the application, a simular object
needs to be created on a remote system through the use
@aldo, thanks for the info. I'll look into it. But it seems that I don't
find any problems atm.
Meanwhile, I've been playing a bit around to see what happens during the
precompilation task. (I used the task from rails head for testing, not
the buggy one included in rails 3.1).
I have noticed t
@jim: precompiling them locally seems indeed the best way at the moment.
But I'm still curious what the reason is that precompiling on server
takes that long. I'm setting up a test so I can investigate it a bit
further. But thanks for the tip, it's a nice workaround.
@aldo: I also use the defau
Hi all,
I'm just deploying a few rails apps after upgrading to rails 3.1. I
have implemented the asset pipeline and everything works ok.
I'm deploying using Capistrano with the pre fabricated deploy/assets
recipe.
The problem I encounter is that the rake task takes like forever to
precompile al
Hi,
I just upgraded my existing rails 3.0.10 app to 3.1 where I wanted to
try the new asset pipeline.
Everything seemed to work fine in development, all the assets are served
correctly.
But when I wanted to test in production, the paths to the assets changed
back to the old format without the di
7;Brussels'
end
But still it is unclear to me if this is the expected behavior.
Michael Rigart wrote in post #1011396:
> Hi,
>
> I have stumbled upon a small issue regarding the use of Railties
> (Engine) and setting the time_zone.
>
> It seems when I set the time_zone in
Hi,
I have stumbled upon a small issue regarding the use of Railties
(Engine) and setting the time_zone.
It seems when I set the time_zone in my engine like:
class Engine < Rails::Engine
config.time_zone = 'Brussels'
end
The actual time zone in the application is set back to the default 'U
Hi,
does anyone can help me by telling how you can properly test rails 3
engines? Since engines don't necessarily have db connections on its own,
how can you test your models?
I could use a test database, but how do you configure you test then to
create and use that connection?
Thank you in adva
Hi all,
I was wondering how you can test Rails 3 engines.
Looks like the rake test task is not available by default. So I added
the following in my rake task
require 'rake/testtask'
Rake::TestTask.new do |test|
test.pattern = 'test/**/*_test.rb'
test.libs << 'test'
end
In my test_helper.rb
it looks like it has something to do with my namespacing. When I create
a second generator without namespaces, everything seems to work fine.
Does anyone know what to do in case of namespacing?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to
Hi,
I'm having some problems running a self made generator. When I want to
list the generators with: rails g, my generator shows up in the list.
But when I want to run it, I get Could not find generator error.
module MyGem
module Core
class InstallGenerator < Rails::Generators::Base
Hi Ray, I fixed the problem some time ago, but I'm not sure anymore what
the problem was.
I know I had some other problems as well, And they where all related to
a conflicting javascript library that I developed. It was not
conflicting with rails.js but with prototype.js .
I know I also upgrad
Hi,
has anyone experienced any problems with the new link_to and
data-confirm in Rails3? It seems when you create a link with instead of
link text, an image, the confirm message isn't shown.
<%=
link_to(
image_tag("delete.png", :alt =>
t("helper
Art Shayderov wrote:
> I didn't see anything like that in Rails Guides.
> Of course you can overwrite resource routes but you will lose those
> helpers.
> I think you can either be Restful or not. You can't go both ways. If
> you are Restful, you obey the rules. That's the whole point IMHO.
> Other
Hi all,
this might be a dumb question, but how can you produce custom resource
routes?
Lets say you want to add extra parameters in your url but you want your
url to stay pritty?
edit_resource_path(:param1 => :value1, :param2 => :value2) => don't need
an id in edit.
new_resource_path(:param1 =>
Frederick Cheung wrote:
> On Mar 7, 7:56�pm, Michael Rigart wrote:
>> > Fred
>>
>> unfortunately is does
>>
>
> Is Foo defined in multiple places (some editors leave behind backup
> copies of files that Rails loads anyway) ? If you stick a breakpoint
> i
Colin Law wrote:
> On 7 March 2010 19:42, Michael Rigart wrote:
>> run it through the browser.
> Foo.bars is not valid as Foo is a class not an instance, or is that
> just a typo here? It should be something like
> foo = Foo.new
> then use foo.bars
>
> Colin
@Colin:
Frederick Cheung wrote:
> On Mar 7, 7:42�pm, Michael Rigart wrote:
>> run it through the browser.
>>
>> Now, when I do it through irb, it returns an empty array as expected.
>> Does someone here has any clue how this can happen and what I need to
>> look for
Hi all
I seem to have a small problem in Rails. Lets say I have a class Foo
with an habtm association to Bar. So Foo has_and_belongs_to Bars en vice
versa.
Now, when I do lets say
Foo.new
Foo.bars, I get an undefined method bars for # when I
run it through the browser.
Now, when I do it through
Brendon Muir wrote:
> Hi everyone, I've noticed an inconsistency in the way rails deals with
> uncountable resources and restful routes.
>
> Basically if you map an uncountable resource rails will append
> '_index' to the end of some routes to avoid route clashes between the
> routes that deal wit
anyone?
--
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 rubyonrails-talk@googlegroups.com
To unsubscribe fr
Hi everybody,
I'm having problems on a testcase that I'm working on. I hope that I can
explain the problem properly and that some of you can help me out
becouse I'm realy stuck on this one.
Ok, I have a Page model that needs to be multi lingual. Therefore I have
used a small but nice plugin: htt
Hi Marnen
thanks for the namespace advice. Going to look into that.
Sorry for the mistake about the model names. Has been a long day at the
office and need a small break ;)
Do you have advice on how do achieve this by modifying application code
to a plugin?
Thanks
--
Posted via http://www.
Hi,
this might be a stupid question, but is there like a naming convention
for base models? Lets say you develop an application where custom work
is possible. So you create a core for your application.
But for the custom development, you don't want to touch your core code,
you want to override /
Hi all
I'm having finding it difficult finding the proper way to route some
pages in my application. The application follows the rest architecture
and is closed for non authorized persons.
But their are some publicly available pages (normal content pages).
These content pages are build dynamical
Hi,
I'm going to take a look at the RailsTranslateColumnsPlugin. Maybe I can
get some ideas from there.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Ta
Francesc Esplugas wrote:
> Taking a look at the code, maintenance and test coverage in my opinion
> model_translations
> it's a better solution than translate_columns.
>
> http://github.com/janne/model_translations/tree/master
>
> On Wed, May 13, 2009 at 9:
Francesc Esplugas wrote:
> On Wed, May 13, 2009 at 8:56 AM, Michael Rigart
> wrote:
>
>> I need multilingual input in my models. Lets say you have a Product
>> model. That product contains title, description and price. The price is
>> allways the same, but the title
Hi
I'm looking for some insight in a small problem I have. I allready
posted this in the Rails I18n forum, but didn't got any respond, so
maybe it was just the wrong forum.
I need multilingual input in my models. Lets say you have a Product
model. That product contains title, description and pri
Hi,
How do you validate booleans? Normally, I validate them through
validates_inclusion_of :is_root, :in => [false, true]
But when I test the :is_root attribute against a string, it passes. Here
are some examples:
passes my test => [0, 1, true, false] (they should pass right?)
don't pass =>
Hi, (sorry for the double post).
I've been working on some standard methods to test model validations.
At this point, I can test on these validations:
* validates_presence_of
* validates_length_of
* validates_format_of
* validates_numericality_of
But how do you test on the rest of validations
Hi guys.
I've been working on my skills the last couple of days. I have shown
some improvements but as Colin stated, it is not something that you
develop over night. It takes time and practice. But I notice that I'm
making progress (maybe less then I expected, but still :) ).
Brien, thanks fo
Hi Philip
wel I started out by trying to create my tests first, but I just got
stuck so I decided to write the model validations.
Thats my biggest problem at the moment, I have never developed through
TDD.
And the main problem isn't realy whether to develop or test first, but
how to build my
Hi,
since I want to improve my Rails skills, I decided to start using the
Rails testing framework. But I find it a bit hard to start testing model
validations. Some of my tests don't pass, but I know they must, since I
have added the validation in the model.
Here is an example:
The migration:
Robert Walker wrote:
> Michael Rigart wrote:
>> I' running in production. I have noticed that development is slower then
>> production, but the production speed is still far from acceptable. The
>> diffrence between using ActiveRecord and ActiveResource is huge.
Robert Walker wrote:
> Michael Rigart wrote:
>> Hi all,
>>
>> I've been experimenting with sharing resources between 2 rails apps with
>> AR and I just love it. The only downside is that when using AR, my app
>> slows down dramastically.
>>
>&g
Hi all,
I've been experimenting with sharing resources between 2 rails apps with
AR and I just love it. The only downside is that when using AR, my app
slows down dramastically.
Is there a way to speed things up? Some special caching mechanisme that
needs to be enabled?
Thank you in advance for
.
>
> Instead of using plain Net::HTTP, you can use ActiveResource (http://
> api.rubyonrails.org/classes/ActiveResource/Base.html) or REST Client
> (http://rest-client.heroku.com/rdoc/).
>
> On Jan 16, 12:15�pm, Michael Rigart
Thanks for the input. I'm usering ActiveResource
Hi all
I'm having trouble finding info on how to tranfser data between 2 rest
appliations. I will try to scetch my problem as simple as possible. I
store data in my first application. In my first application, users need
to login to gain access. The users login with a login form:
# my session con
cassiozen wrote:
> You could try to use formatted_items_path(:pdf)
>
> On Jan 7, 6:30�pm, Michael Rigart
formatted_items_path nor, formatted_item_path seems to work. Both result
in a no method error.
--
Posted via http://www.ruby-
Hi all
I just upgraded a project of mine from rails 2.1 to 2.2. Becouse of this
upgrade, I have a link that doesn't work anymore. I get an error when
rendering the page:
outgoing_invoice_url failed to generate from {:action=>"show",
:override=>true, :controller=>"outgoing_invoices", :id=>"2297.p
Hi all,
I'm having problems with cloning an ActiveRecord Object. The object
consists of multiple child objects, so when I use the normal clone
method, it only clones the attributes of the parent object.
Could someone help me out telling me how I can clone the child objects
as wel? I have tried l
It looks like when the delete action is executed, rails first updates
the sub item id to null instead of deleting it :s
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
looks like I solved the problem myself. Looks like when you say delete
it sets the id to null. I needed to use destroy.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
Hi,
I managed to get the complex forms and nested resources described in
http://railscasts.com/episodes/75-complex-forms-part-3 to work.
But I'm having problems when deleting a sub item.
def existing_task_attributes=(task_attributes)
tasks.reject(&:new_record?).each do |task|
attrib
Hi
I have a question regarding using Rails as a REST web service. I
understand the concept and have implemented it into a project.
As far as I'm logged in into the application, I can pull out data in any
format that is specified in the application.
But lets say that I want to use it as a servic
46 matches
Mail list logo