In Ruby on Rails, say a Story object can has_many Vote objects (a
story is voted hot by many users).
So when we do a
s = Story.find(:first)
s is a Story object, and say
s.votes
returns []
and
s.votes.class
returns Array
So clearly, s.votes is an empty Array object.
At this
Hi,
I have a model with attachment_fu.
The model saves images but I didn't put validates_as_attachment.
I understand that it takes long time to create an object as it has to
process images.
But I don't understand why it takes long time to update the object (not
changing file but only modify
here i given my codes when i execute this remote_function rails give
me this error
ActionController::UnknownAction (No action responded to report_poem.
Actions: create, destroy, edit, index, new, show, update):
in my view
span class=report_button onclick=
On May 23, 7:10 am, Jian Lin li...@ruby-forum.com wrote:
So clearly, s.votes is an empty Array object.
Actually it's not. It's an AssociationProxy object pretending to be an
instance of Array
Fred
At this time, when
s.votes.create
is called, it actually invokes a method of the
On May 23, 12:59 am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
module Enumerable
def my_compress
... but when I visit the web page in question I get No method
'my_compress' for Array ...
I'm probably doing something fundamentally wrong - what could/should I
be
Frederick Cheung wrote:
On May 23, 7:10�am, Jian Lin li...@ruby-forum.com wrote:
So clearly, s.votes is an empty Array object.
Actually it's not. It's an AssociationProxy object pretending to be an
instance of Array
Fred
not like this?
irb(main):010:0 class Foo
irb(main):011:1 def
Hi there.
I have a problem with validating a form, where is foreign key present.
I have a table like this:
id
name
password
status_id
This is the way that status_id is implemented to the users table.
td%= select_tag ('status_id', options_for_select([['-- choose one
--', nil]] +
Frederick Cheung wrote:
On May 23, 12:59�am, Marnen Laibow-Koser li...@ruby-forum.com wrote:
... by putting it inside the controller like that you've
created a new module called LookupController::Enumerable rather than
extending Enumerable. If I were you I'd keep extensions to core
classes
Hi guys,
I'm having trouble getting named routes and form_for to play nicely in quite
the way I would expect. Here's a quick summary of what I've got going on:
Named route:
resources :thread, :class_name = forum_thread
Controller name:
forum_thread_controller
Model object:
Hi all,
I want to invite you to check out ResourceAwareness, a small gem that makes
available information about a Rails application's resources (as defined by the
'resource/s' routing DSL methods) at Rails.application.resources.
http://github.com/ingoweiss/resource_awareness
You can find a
--Original Message--
From: Rick DeNatale
Sender: rubyonrails-talk@googlegroups.com
To: rubyonrails-talk@googlegroups.com
ReplyTo: rubyonrails-talk@googlegroups.com
Subject: Re: [Rails] Rails acts_as_* plugins, with parameters
Sent: Feb 25, 2010 20:08
On Thu, Feb 25, 2010 at 7:32 AM, Paul
J
--Original Message--
From: Rick DeNatale
Sender: rubyonrails-talk@googlegroups.com
To: rubyonrails-talk@googlegroups.com
ReplyTo: rubyonrails-talk@googlegroups.com
Subject: Re: [Rails] Rails acts_as_* plugins, with parameters
Sent: Feb 25, 2010 20:08
On Thu, Feb 25, 2010 at 7:32 AM,
nirosh wrote:
write the function @ application_controller that can be access in any
controller.
for more info read abt application controller doc.
nirosh
Hey thanks for the response.
What about the image paths. This is in css and it's not linking to the
images folder:
background: #b8e5d1
I'v just install rails3 for try it out.
I was following getting started guide:
rm public/index.html,
change routes...
and then i try to open page i'v got an error.
OS: ubunto 10.04
Rails info:
dp...@dpush-desktop:~/rails_proj/blog/public$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249)
I'v just install rails3 for try it out.
I was following getting started guide:
rm public/index.html,
change routes...
and then i try to open page i'v got an error.
OS: ubunto 10.04
Rails info:
dp...@dpush-desktop:~/rails_proj/blog/public$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249)
I would, just in case, not being sure of the repercussions that
installing a prior version of the gem would have.
On May 22, 10:48 pm, Jian Lin li...@ruby-forum.com wrote:
pepe wrote:
Just in case it applies here is an extract from the Pickaxe book
(Second edition, page 217):
Threre's a
On Sun, May 23, 2010 at 5:07 AM, John Merlino li...@ruby-forum.com wrote:
nirosh wrote:
write the function @ application_controller that can be access in any
controller.
for more info read abt application controller doc.
Or create a utility controller, call it home or whatever, that handles
On Sun, May 23, 2010 at 12:09 AM, nirosh kunalan.kand...@gmail.com wrote:
ActionController::UnknownAction (No action responded to report_poem.
Actions: create, destroy, edit, index, new, show, update):
so anybody know what is the reason is?
Either the generated URL is wrong -- you can check
Rails Terrorist wrote:
[1] gem install mysql
[2] you will see like error syntac but dont pay attention to it
[3] find LIBMYSQL.DLL from your mysql/bin folder in your mysql folder
not ruby folder.
[4] copy paste that file to ruby/bin
[5] restart your server or console, if you are already
Victor Stan wrote:
I'm sure its simple on average. For me, deploying on Site5 was
simpler. I also use a blank repository from which i clone my
production site next to it on the server and my dev site on my local
machine through ssh. Same thing, git push, git pull, don't need heroku
for that,
John Merlino wrote:
Hey all,
Does any have suggestions to whether I should create a controller for
every web page on my site or just create an action for every web page in
same controller if those actions will never require database calls?
Do neither. Use a single controller action for your
On 21 Maj, 17:28, Hassan Schroeder hassan.schroe...@gmail.com wrote:
On Fri, May 21, 2010 at 8:25 AM, Marnen Laibow-Koser
li...@ruby-forum.com wrote:
No, first learn about HTML form syntax (hint: the name attribute is
significant here)
Heh. Beat me by a minute :-)
I was going to
Do you have the js includes in the application layout?
Happened to me a few times when playing with several projects.
On May 23, 3:09 am, nirosh kunalan.kand...@gmail.com wrote:
here i given my codes when i execute this remote_function rails give
me this error
ActionController::UnknownAction
The best book on learning Rails that I have ever read is Simply Rails
2 published by Sitepoint (http://www.sitepoint.com/books/rails2/?
historicredirect=rails1 ). It is laid out in a very good way and it's
the only book where I went through all the examples.
Later on I would recommend The Rails
There is also
validates_date_time plugin
http://agilewebdevelopment.com/plugins/validates_date_time
if you also want to allow entry in other formats
Tonypm
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send
On Sat, May 22, 2010 at 2:47 PM, pepe p...@betterrpg.com wrote:
Just in case it applies here is an extract from the Pickaxe book
(Second edition, page 217):
Threre's a subtlety when it comes to installing different versions of
the same application with RubyGems. Even though RubyGems keeps
Rick Denatale wrote:
That's actually not the whole story, and excerpt from the output of
gem help install:
Description:
The install command installs local or remote gem into a gem
repository.
For gems with executables ruby installs a wrapper file into the
executable
On Sat, May 22, 2010 at 8:35 PM, FrankMurphy sabir.a.ibra...@gmail.com wrote:
Okay, I got it to work on the domain root by editing /etc/apache2/
sites-available/default to point to the app's public directory. Is
that the right way to go about it, or is that just a hack? If that's
what I'm
On Sun, May 23, 2010 at 7:13 AM, Smok mariusz_waszc...@tlen.pl wrote:
On 21 Maj, 17:28, Hassan Schroeder hassan.schroe...@gmail.com wrote:
I was going to suggest that the OP has apparently never read this
http://www.w3.org/TR/html401/interact/forms.html and that it'd be
an excellent place to
yes and sort it out.
there is an entry missed in routes file
--
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.com.
To unsubscribe from this group, send email to
On Sun, May 23, 2010 at 9:12 AM, Marnen Laibow-Koser
li...@ruby-forum.comwrote:
John Merlino wrote:
Hey all,
Does any have suggestions to whether I should create a controller for
every web page on my site or just create an action for every web page in
same controller if those actions
With Heroku there's no git pull -- just push the code and it does
everything else.
The problem for me is that it wasn't that simple, the app didn't work.
While in an environment like shared hosting (if were comparing low
price things, Heroku has a small free option as well) I have control
over
I would recommend things by: The Pragmatic Bookshelf
http://www.pragprog.com/titles
Check out the Agile Web Development With Rails...
On May 22, 12:21 pm, goodchoi good...@gmail.com wrote:
Hi everybody~
Vey nice to meet you on this group.
I'm a only web service planner operating a site
I am using RoR 2.3.5.
I would like to have list of questions with three possible answers.
After having copleted a test I would like to update the database with
user's answers. At the bottom of the page I would also like to list
all selected answers for the user.
In a table answers I have columns:
Hello ,
I have a home work shown below i did most of the things , i wrote
rthml and database in netbeans but i cant run
Homework and code i wrote are below what is missing here i dont know
please help . I cant run it
Implement a WEB application using the RAILS framework for maintaining
an
Hi all,
I want to invite you to check out ResourceAwareness, a small gem that makes
available information about a Rails application's resources (as defined by the
'resource/s' routing DSL methods) at Rails.application.resources.
http://github.com/ingoweiss/resource_awareness
You can find a
Hi all,
I want to invite you to check out ResourceAwareness, a small gem that makes
available information about a Rails application's resources (as defined by the
'resource/s' routing DSL methods) at Rails.application.resources.
http://github.com/ingoweiss/resource_awareness
You can find a
On 23 May 2010 19:40, mustafacmpe mustafa.c...@gmail.com wrote:
Hello ,
Hello!
I have a home work shown below
Homework and code i wrote are below what is missing here i dont know
please help . I cant run it
Well, I'm not prepared to *do* your homework for you; if you pass the
course, and
On 23 May 2010 17:52, Smoq smoq...@gmail.com wrote:
In a table answers I have columns: question, a1, a2, a3 (these
columns are answers to the question),
a_u (user's answer), a_ok (correct answer). Below I have pasted the
view that I am using for listing questions.
Surely you have a Question
Victor Stan wrote:
With Heroku there's no git pull -- just push the code and it does
everything else.
The problem for me is that it wasn't that simple, the app didn't work.
Yes, Heroku has certain limitations. But they don't apply to most apps.
While in an environment like shared hosting
Hey all,
I have an application.js file in my javascripts folder of my Ruby on
Rails application. The javascript is just a typical hide/show tabs
effect, so when the user clicks on one link, the corresponding div is
revealed and the other divs are hidden. Two pages require the
javascript. However,
I've also tried
%= form_for @thread, :as = :thread %
and this results in the error:
undefined method `forum_threads_path' for
##Class:0x0103a45098:0x01039575a0
That would seem to be a bug to me. Shouldn't form_for be using :as = :thread
to name that route appropriately?
-M
On May
On Sun, May 23, 2010 at 2:21 PM, John Merlino li...@ruby-forum.com wrote:
document.getElementById(tabs) is NULL
var tabListItems = document.getElementById(tabs).childNodes;
I think the issue is I'm calling multiple functions on page load (and
hence since the one page doesn't have a tabs id
In my initial post, I did say there was an element with an id of tabs,
but that it was part of another page and not the page the error occured
on. However,the same js file is being used for both pages. So that's the
issue I'm trying to resolve here.
--
Posted via http://www.ruby-forum.com/.
--
On Sun, May 23, 2010 at 3:27 PM, John Merlino li...@ruby-forum.com wrote:
In my initial post, I did say there was an element with an id of tabs,
but that it was part of another page and not the page the error occured
on. However,the same js file is being used for both pages. So that's the
Also I don't think the getElementById() method was around in 1997.
--
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-t...@googlegroups.com.
To
On Sun, May 23, 2010 at 3:31 PM, John Merlino li...@ruby-forum.com wrote:
Also I don't think the getElementById() method was around in 1997.
? Uh, well. I explicitly referenced the line
window.onload = init;
so, that has what now to do with getElementById ? :-)
--
Hassan Schroeder
chewmanfoo wrote:
I have an index page showing a table of network hosts with IP
addresses, roles, hostname etc. Is it trivial to render that page to
the browser as a csv file instead of html and link to that rendering
on the index page?
Yes.
How is that done?
The same way as you would
Hello,
So I have an Attribute model with lists the attributes of an object.
The attributes can be of different types so I have derived classes as
well, in this case I have a derived SubjectiveAttribute. The problem
I'm having revolves around my User model. A user is allowed to give
each attribute
goodchoi wrote:
Hi everybody~
Vey nice to meet you on this group.
I'm a only web service planner operating a site
http://topics.co.kr/categories?q=iphone
developed by Ruby-on-Rails engineers through payment.
But I'm trying to do study Ruby on Rails by myself from now on.
[...]
I
Hi
I did not get a reply to this. Any comment please?
Tom
--
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-t...@googlegroups.com.
To unsubscribe
This is my output. I don't know what to do to make this work. I have
installed other gems without any problems.
Suggestions?
debian:/home/kevin# gem source -a http://www.rubygems.org
http://www.rubygems.org added to sources
debian:/home/kevin# gem install merb -V
GET 302 Found:
I did
gem update --system
This seems to have fixed the problem. Who knows :)
On May 24, 1:17 am, sso strongsilent...@gmail.com wrote:
This is my output. I don't know what to do to make this work. I have
installed other gems without any problems.
Suggestions?
debian:/home/kevin# gem
53 matches
Mail list logo