Phlip wrote:
[...]
So routes.rb is one of the files you must bounce the server
if
you edit.
Unless you're using Rails 2.3, which (in dev mode) immediately
incorporates changes in the routes file.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via
James West wrote:
James West wrote:
Sorry, I ommited to post the actual error which is now
Cannot modify association 'User#addresses' because the source reflection
class 'Address' is associated to 'UserRole' via :has_many.
Further investigation shows that the address record seems to have
Sijo Kg wrote:
Hi
Not only doing the above solves all..You have to edit a lot of
places. Rather than I explain all these and grab a lot more spaces here
you better read this
Read section Namespaced Routes in
pharrington wrote:
On Aug 7, 11:54�pm, Phlip phlip2...@gmail.com wrote:
Views should be dumb, Controllers thin, and Models fat.
If the deliver_ call were one line, it qualifies for the Controller. But...
The delivered template is itself a View. Hence it should be dumb. Hence
anything
hi
my controller has
def searchwithstatus
@agency=params[:agency][:agency_id]
@contract=params[:agency][:contracts_id]
@agencies=Agency.find(:all,:conditions={:deleted=1,:contract_id=@contract,:state_id=@state})
end
when i am executing the code in line 3 it is saying as
*Mysql::Error:
2009/8/7 Jason Burgett rails-mailing-l...@andreas-s.net:
I'm trying to figure out a way to create this relationship:
a user has many friends which are themselves users
I have an existing 'users' table in the database. I've created a
'friends' database with:
id: integer
user_id: integer
2009/8/8 Phlip phlip2...@gmail.com:
Paulo J. Matos wrote:
I am learning rails by going through 3rd ed of the Rails book.
In page 153, after creating the user scaffold it says:
Since this modified config/routes.rb, which is cached for performance
reasons, you will need to start the server.
Karthik Kantharaj wrote:
# *how can i access the contract_id which is in another table*
:contract_id=#...@contract.id}
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
Hello,
where can I find open source rails 2 books?
Thank you in advance.
Cheers,
--
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
Fla As wrote:
Hello,
where can I find open source rails 2 books?
Thank you in advance.
Cheers,
Go and buy the pdf AWDWR
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
Your software has cost you nothing, putting your hand in your pocket to
find £15
For what it's worth I am witrh Colin on this but this is covered in the
foot note on page 46 of the pdf
6. If instead you see a message to the effect of No route matches
/say/hello, try stopping and
restarting your server, because something you have done caused Rails to
cache your
On Sat, Aug 8, 2009 at 1:47 PM, James West rails-mailing-l...@andreas-s.net
wrote:
Karthik Kantharaj wrote:
# *how can i access the contract_id which is in another table*
:contract_id=#...@contract.id}
hi James West
Thank you
Ilan Berci wrote:
Alexei Lexx wrote:
I use memcahed sessions.
clear your memcached sessions prior to deployment to production..
development and production are using the same memcache?
No of course, development and productions are different servers.
I restarted memcached to clear
Hi All,
I have a doubt regarding join tables
I'm having 2 models
1)Fac
2)Cont
and both models have has and belong to many relationships
so there are 3 tables
1)facs
2)conts
3)conts_facs
then i'm fetching the data in controller as
@conts=Cont.find(:all])
@cfacs=Fac.all(:joins=:conts,
Hi --
On Fri, 7 Aug 2009, pharrington wrote:
On Aug 7, 11:54 pm, Phlip phlip2...@gmail.com wrote:
Ilan Berci wrote:
While not knowing your problem domain at all, I have a preference for
thin dumb controllers (that fit easily within REST), I would move the
mailer down into models/ or lib/
Hi --
On Fri, 7 Aug 2009, Phlip wrote:
Ilan Berci wrote:
While not knowing your problem domain at all, I have a preference for
thin dumb controllers (that fit easily within REST), I would move the
mailer down into models/ or lib/
hth
ilan
+1 (FWIW!)
Views should be dumb,
There was just a discussion about this over on the railsforum website
and someone seems to have figured it out. Check it -
http://railsforum.com/viewtopic.php?pid=106007#p106007, or more directly
- http://nmanzi.com/?p=39.
--
Posted via http://www.ruby-forum.com/.
I want to display date and time in view as August 7, 2009 at 10:22:02
am. Presently it is displaying in view as 2009-08-07 10:22:02 UTC.
Can anyone tell to format date and time.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this
Hello.
I installed ROR with InstantRails and it works fine.
But later, when I tried to access to localhost via wamp, wamp didn't
work.
(I have previous projects sitting in 'C:\wamp\www' folder, and I used
to access them via wamp's 'http://localhost/')
Wamp server starts up on the tray bar as
http://www.2dconcept.com/jquery-grid-rails-plugin
maybe help you.
On Aug 7, 12:49 pm, Rob Cash rails-mailing-l...@andreas-s.net wrote:
Anyone have a more extensive yaml file for jqgrid than the one that's
shown with the example Jqgrid Demos page?
Also, I've been successful in just using the
2009/8/8 Aashish Kiran rails-mailing-l...@andreas-s.net:
I want to display date and time in view as August 7, 2009 at 10:22:02
am. Presently it is displaying in view as 2009-08-07 10:22:02 UTC.
Can anyone tell to format date and time.
Have a look at strftime.
(Did you try googling for ruby
2009/8/8 JC jtothe...@gmail.com:
Hello.
I installed ROR with InstantRails and it works fine.
But later, when I tried to access to localhost via wamp, wamp didn't
work.
(I have previous projects sitting in 'C:\wamp\www' folder, and I used
to access them via wamp's 'http://localhost/')
Wamp
Hi,
I have a controller and two of the actions in it are as follows:
# GET /bids/new
# GET /bids/new.xml
def new
@bid = Bid.new
@auctionItems = AuctionItem.find(:all)
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml = @bid }
end
I want to start contributing to open source. I aim at ruby, with or
without rails.
1) What is the best way to find the right project? Github?
2) Is it better to work on something that has just started with
development, or perhaps to submit patches for bigger projects?
3) What is the process
It's going to be tough to answer your whole list of questions, because
open source projects vary so widely, as do their contributors. As a
rule of thumb, I've found most projects are more than willing to
accept help if you show them you can actually improve things.
One option for getting
Hi,
I have this in one of my models:
validates_format_of :amount, :with = /\A[0-9]{1,5}\.[0-9]{2}\Z/
If I enter an amount that ends with .00, eg. 123.00 or 300.00 it
fails, and I cannot understand why. It works with 123.11 or 300.01,
etc.
I have also tried:
validates_format_of :amount,
Because the definitions of certain objects in our models are growing
out of control, we're looking into the possibility of simply defining
some of our objects in XML, rather than using many models and having
to use complicated join queries that make our application quite heavy.
Basically, we're
Try telling ruby that a variable contains the value 300.00, it will
say:
a = 300.00
= 300.0
a
= 300.0
And there's your answer. You will have to tell Ruby that this is a so-
called double. to_d didn't work in my local environment, but that
Ruby version is quite old. Try to to find how to
THIS IS THE SOLUTION TRY THIS
%=DateTime.now.strftime(%B %d %Y)% %= DateTime.now.strftime(%I:
%M%P ) %
On Aug 8, 3:19 pm, Colin Law clan...@googlemail.com wrote:
2009/8/8 Aashish Kiran rails-mailing-l...@andreas-s.net:
I want to display date and time in view as August 7, 2009 at
James West wrote:
[...]
Go and buy the pdf AWDWR
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
I suspect the OP knows about AWDWR -- he was looking for open-source
books.
Your software has cost you nothing, putting your hand in your pocket to
find
jhaagmans wrote:
You will have to tell Ruby that this is a so-
called double.
I don't think that will help at all. However, I believe there's a
method called validates_numericality_of that may be of use...
Also, [0-9] is never necessary. Just use \d .
Best,
--
Marnen Laibow-Koser
Colin Law wrote:
2009/8/8 JC jtothe...@gmail.com:
Thank you.
You obviously won't be able to run them both at the same time as they
are both web servers.
That's untrue, unless Windows is even more broken than I thought. I
routinely have 4 Web servers running on separate ports on my Mac
Colin Law wrote:
[...]
I disagree with that, keep using the scaffold generator to add new
stuff, it is by far the easiest way of generating the files generally
needed. Then use this as the base on which to build your application
specific stuff.
Generally not, unless you happen to be
2009/8/8 Marnen Laibow-Koser rails-mailing-l...@andreas-s.net:
Colin Law wrote:
2009/8/8 JC jtothe...@gmail.com:
Thank you.
You obviously won't be able to run them both at the same time as they
are both web servers.
That's untrue, unless Windows is even more broken than I thought. I
Just as the title sais really. How should I go about reporting a bug in
Rails 2.3.2 and 2.3.3?
Thanks
James
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby
on Rails:
In my environment.rb I set a whole bunch of observers to be active by
default. In testing I don't want to do that, I want to turn observers on
and off as required so that I can isolate the things I'm testing.
How do I do it?
Ta
John Small
--
Posted via http://www.ruby-forum.com/.
Hi John,
On Sat, 2009-08-08 at 17:00 +0200, John Small wrote:
In my environment.rb I set a whole bunch of observers to be active by
default. In testing I don't want to do that, I want to turn observers on
and off as required so that I can isolate the things I'm testing.
How do I do it?
Marnen Laibow-Koser wrote:
James West wrote:
[...]
Go and buy the pdf AWDWR
http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition
I suspect the OP knows about AWDWR -- he was looking for open-source
books.
Your software has cost you nothing, putting your
That is exactly what I was looking for.
Thanks so much Colin.
On Aug 7, 5:17 pm, Colin Law clan...@googlemail.com wrote:
2009/8/7 CoolAJ86 coola...@gmail.com:
Ideally what I would like to have happen:
Contact.find (and .find_by_xyz, etc) will never return a contact
unless
https://rails.lighthouseapp.com/dashboard
On Sat, Aug 8, 2009 at 4:58 PM, James West rails-mailing-l...@andreas-s.net
wrote:
Just as the title sais really. How should I go about reporting a bug in
Rails 2.3.2 and 2.3.3?
Thanks
James
--
Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser wrote:
Why is it a no-brainer? It's not like the money goes to support the
Rails core team.
AWDWR is recommended reading on the Rails website.
Quote from the publishers The Pragmatic Bookshelf
Sam Ruby is a prominent software developer who has made significant
OK this is a Rails bug.
I have done extensive testing now and am able to prove that the code
works on a has many but has_many :through fails.
I'll report it as a bug if someone can tell me how?
Thanks
James
--
Posted via http://www.ruby-forum.com/.
Rocco Di Leo wrote:
https://rails.lighthouseapp.com/dashboard
On Sat, Aug 8, 2009 at 4:58 PM, James West
rails-mailing-l...@andreas-s.net
Thankyou :-)
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are
Good day,
Reading this
http://weblog.rubyonrails.org/2009/4/24/this-week-in-edge-rails
I understand the structure 'schema.table_name' for postgresql is
supported in Rails 2.3.x
but I'm still having errors like relation schema.table_name doesn't
exists
Any idea?
Best regards,
Ilya Dyoshin
First of all, I agree (and PLEASE listen) - DONT go web based. these
systems are unreliable, and you will REGRET your purchase decision after
a while, and your database will be DEAD and you will need to remake it,
and it will waste a LOT of time. These people are just $$$ greedy, and
computer
cmyk wrote:
I am having the exact same issue.
Any solutions yet?
you need to install mysql client headers first, and then [since it's
ruby 1.9] you'll need a newer version than what the gem provides
either download 2.8.1 or a different gem
http://isitruby19.com/mysql
GL.
-r
--
Posted via
Fernando Perez wrote:
Damn it failed again! So I have to restart the hunt from the scratch, I
might have not waited long enough to let it fail...
Some things to help with a frozen app:
strace
http://eigenclass.org/hiki/ruby+live+process+introspection
c:/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-x86-mswin32/rdoc --exclude ext
--main README --quiet ext README docs/README.html
(continuing with the rest of the installation)
ca c'est le message qui s'affiche quand je fait gem install mysql
que faire svp
c'est normal :)
-r
--
Posted via
bill walton wrote:
Hi John,
On Sat, 2009-08-08 at 17:00 +0200, John Small wrote:
In my environment.rb I set a whole bunch of observers to be active by
default. In testing I don't want to do that, I want to turn observers on
and off as required so that I can isolate the things I'm testing.
All of the above suggestions may be valid, however it does not explain
how, once the OP has managed by fair means or foul to get hold of the
member object that it manages to mutate between his two uses of it.
OK. I want to jump back in here to make sure that Bill doesn't think
that he did
Thanks, Marmen. I will give your undoubtedly good advice serious
consideration. As I said, I'm going to have to take a break from this
project for a couple of days anyway in order to tend to some other
things that have arisen. Thanks again.
... doug
Thanks a ton. This one:
http://dizzy.co.uk/ruby_on_rails/contents/self-referential-table-joins
did the trick!
Colin Law wrote:
2009/8/7 Jason Burgett rails-mailing-l...@andreas-s.net:
friend_id: ineteger
I would like to create relationship so I could do something like:
friends_array =
anyone?
On Aug 7, 3:55 pm, Me chabg...@gmail.com wrote:
I have thefileupload working, I have to place it outside my main
form.
Is there a way so I can have somewhere other than outside my form?
This below is all after the submit button:
div id=file %= render :partial = '/rsl/sitelist',
I used tinymce.
Will move onto ckeditor in next release.
Thanks a lot. :-)
On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net
wrote:
Ritvvij wrote:
Hi,
Which is the most advisable Rich Text Editor plugin / gem to use?
Please advise
I really liked tinymce, simple to use,
On Aug 8, 3:10 pm, Marnen Laibow-Koser rails-mailing-l...@andreas-
s.net wrote:
Colin Law wrote:
2009/8/8 JC jtothe...@gmail.com:
Thank you.
You obviously won't be able to run them both at the same time as they
are both web servers.
That's untrue, unless Windows is even more
2009/8/8 djolley ddjol...@gmail.com:
All of the above suggestions may be valid, however it does not explain
how, once the OP has managed by fair means or foul to get hold of the
member object that it manages to mutate between his two uses of it.
OK. I want to jump back in here to make sure
On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote:
I used tinymce.
Will move onto ckeditor in next release.
Thanks a lot. :-)
On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net
wrote:
Ritvvij wrote:
Hi,
Which is the most advisable Rich Text Editor plugin / gem to
On Aug 8, 1:34 pm, pharrington xenogene...@gmail.com wrote:
On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote:
I used tinymce.
Will move onto ckeditor in next release.
Thanks a lot. :-)
On Aug 8, 12:36 am, James West rails-mailing-l...@andreas-s.net
wrote:
Ritvvij wrote:
Cad Ho wrote:
First of all, I agree (and PLEASE listen) - DONT go web based. these
systems are unreliable, and you will REGRET your purchase decision after
a while, and your database will be DEAD and you will need to remake it,
and it will waste a LOT of time. These people are just $$$
James West wrote:
Marnen Laibow-Koser wrote:
Why is it a no-brainer? It's not like the money goes to support the
Rails core team.
AWDWR is recommended reading on the Rails website.
[...]
David Heinemeier Hansson is the creator of
the Rails framework.
I got confused about the
Marnen Laibow-Koser wrote:
James West wrote:
Marnen Laibow-Koser wrote:
Why is it a no-brainer? It's not like the money goes to support the
Rails core team.
AWDWR is recommended reading on the Rails website.
[...]
David Heinemeier Hansson is the creator of
the Rails framework.
I
Hi,
You can use fckeditor. It's very flexible..i used a lot.
2009/8/8 pharrington xenogene...@gmail.com
On Aug 8, 12:59 pm, Ritvvij ritvi...@gmail.com wrote:
I used tinymce.
Will move onto ckeditor in next release.
Thanks a lot. :-)
On Aug 8, 12:36 am, James West
Marta Daglow wrote:
Senior
Level
RoR Engineer - Backend
My
client
(located in SOMA) is a leading developer and provider of email
marketing
applications. This organization of 50 people is growing and has an
impressive
customer list.
This is an international list.
On Aug 7, 2:26 pm, Alpha Blue rails-mailing-l...@andreas-s.net
wrote:
Matt Jones wrote:
Maybe not directly relevant, but have you considered that you may have
normalized your database into nonfunctionality? From the queries
you've shown, most of the tables have one data field(?!), a
On Aug 8, 2009, at 2:16 AM, Kart wrote:
Hi All,
I have a doubt regarding join tables
I'm having 2 models
1)Fac
2)Cont
and both models have has and belong to many relationships
so there are 3 tables
1)facs
2)conts
3)conts_facs
then i'm fetching the data in controller as
Hi Matt,
Again, you bring up some solid points, and some I agree with and others
I don't. However, at this stage in my app (at least for this season) I
can't alter or test any of what you speak about.
I will definitely test a single table in development as the season
progresses and see how
Sorta OT, sorta not. :-)
I want to put a {something} in front of multiple app servers in order
to be able to do rolling updates by quiescing traffic to one, updating
it, starting it, sleep 'til ready, enable, //lather/rinse/repeat//.
I know I've done this before with Apache httpd but the
Because of some third party dependencies I'm trying to use a
date_select helper (actually datetime, but they behave the same)
whilst specifying an ID for each of the three selectors (day/month/
year).
%= f.date_select :start, {:order = [:day, :month, :year]}, {:id =
{:year = 'abc', :month =
On Aug 8, 9:41 pm, Lb2007 yor...@gmail.com wrote:
%= f.date_select :start, {:order = [:day, :month, :year]}, {:id =
{:year = 'abc', :month = 'de', :day = 'xy'}} %
The code above nearly works; the right selectors are generated in the
right order, however, the IDs of each selector are the
On Aug 8, 10:53 pm, Hassan Schroeder hassan.schroe...@gmail.com
wrote:
Sorta OT, sorta not. :-)
I want to put a {something} in front of multiple app servers in order
to be able to do rolling updates by quiescing traffic to one, updating
it, starting it, sleep 'til ready, enable,
im getting: undefined local variable or method `post' for
#ActionView::Base:0x2673624
where in my code i have the mistake ? please help..
code at index.html.erb
br/
h1welcome to my weblog!/h1br/
%= render :partial = posts/preview, :collection = @posts %br /
%= link_to 'New post',
Thanks all for your suggestions. It's definitely dropping the final 0
as Jaap suggested.
I think I can work around it by changing the regular expression to:
/\A[0-9]{1,5}\.[0-9]{1,2}\Z/
Also just as a side note I'm new to Ruby / Rails having previously
worked with ColdFusion and Java, and
On Sat, Aug 8, 2009 at 3:04 PM, Frederick
Cheungfrederick.che...@gmail.com wrote:
I haven't used it for exactly this but haproxy is generally pretty
good about this sort of stuff - definitely worth looking at.
Merci! Downloading now.
--
Hassan Schroeder
Hey Rob,
Just got a very simple version to work. Based on your code
def self.split_when(*value)
results = [[]]
each do |element|
results.last element
if value.include?(element)
In your partial, you use the variable post. But post doesn't exist. At
least not as far as I can see. You've sent along a variable @posts and
you will probably have to use that in some kind of for loop.
For example:
% for post in @posts do %
% div_for post do %
h2%= link_to_unless_current
jhaagmans wrote:
In your partial, you use the variable post. But post doesn't exist. At
least not as far as I can see. You've sent along a variable @posts and
you will probably have to use that in some kind of for loop.
For example:
% for post in @posts do %
% div_for post do %
i did not understand my error here its because im newbie in ruby ( :P )
(if _preview was _post everything was fine.. i think that is because
naming conventions right?)
I'm not sure why that works. I would have to look into the code.
I recommend you start your reading up on Rails using the
jhaagmans wrote:
i did not understand my error here its because im newbie in ruby ( :P )
(if _preview was _post everything was fine.. i think that is because
naming conventions right?)
I'm not sure why that works. I would have to look into the code.
I recommend you start your reading up
On Sat, Aug 8, 2009 at 12:17 PM, Normnormsche...@earthlink.net wrote:
Marta Daglow wrote:
Senior Level RoR Engineer - Backend
My client (located in SOMA) is a leading developer and provider of email
marketing applications. This organization of 50 people is growing and has an
impressive
Did you ever figure out this problem?
I have a working application and my code works on my laptop, but when I
try it on our production server I come up with this error, but for the
life of me I can't figure out why it is being thrown on one machine and
not the other.
NoMethodError: undefined
80 matches
Mail list logo