ahh sorry my bad. Im using rails 2.3.2 and ruby v1.87
--
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 from
>
> Can anyone confirm if this is a limitation of the framework?
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-t...@googlegroups.c
thanks guys for the replies.
I considered Ars suggestion but for the same reason as Marnen posted it
doesnt sit right.
But the problem is I created a new test project just to test the above
syntax out and its failing. We all make mistakes and blame the framework
but this time i honestly cant f
I cant seem to use :through to get the grandchildren objects when the
intermedetiate uses a has_one relationship with the grandchild model.
E.g.
class User < ActiveRecord::Base
has_many :sentences
has_many :corrections, :through => :sentences
end
class Sentence < ActiveRecord::Base
belong
Hi there,
Im wondering how to best go about this and would appreciate some general
pointers etc.
Background:
just a language learning site where users can can write posts both in
their native language and the language they are learning.
Users can view all the posts that are in their native langua
http://www.healths.110mb.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 from this group, send
Hi I have some protected methods in my application controller to handle
logging in users and Id like to be able to use them in my tests. But
whenever I try to run my tests i always get errors E.g.
NameError: undefined local variable or method `logged_in_user' for
#
how do i get round this. Heres
Thanks again.
Ok i know why your saying to have a consistent sorting method, its so as
to avoid a duplicate situation i.e. if i always sort by the letter and
id then i will always save as ab and not ba. If theres already an ab
there and i have some validations i can avoid reading in another ab.
Hi again, thanks so much for your help i really appreciate it. I wanted
to write another association like you said before but there is no
Alphabet_Partner class to write it in. Its just a self reference to
Alphabet table.
Alphabet_Partner is only defined in
class Alphabet < ActiveRecord::Base
"So A has an Ingredient_Partner B"
was a typo, should have read alphabet_partner
--
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 thi
> No, I am saying you would *not* have to have two pairs. Rather, when
> you construct a Pairing, pick an unambiguous way of sorting the two
> Alphabet objects so that ab and ba will map to the same thing. For
> example (untested):
>
> class Pairing < AR::B
> before_create do
> [...@
Hi Thanks for your reply and your suggestions. Im a bit confused, could
you help clarify the following -
>> Hi if i have one model say with objects for each letter of the alphabet
>> e.g a,b,c ... x,y,z and i want to allow users to create there own
>> favourite pairings of these e.g.
>>
>> ab,
Hi if i have one model say with objects for each letter of the alphabet
e.g a,b,c ... x,y,z and i want to allow users to create there own
favourite pairings of these e.g.
ab, cd, ef, gp and allow them to discuss via comments on each pairing,
whats teh best way to model this in rails?
the order o
sorry i meant "Im looking for a non AJAX solution"
--
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 rubyonr
Hi I want to present a list of ingredients in an A - Z format and also
offer a by category format as well in my ingredients index.
E.g.
A
apple apricot blahblah blahblah
blah blahblah blah
B
and by category
Fruit
apple apricot blahblah blahblah
blah blahblah bla
I have Results Controller. It has an index action with a corresponding
index view.
In the view their is a search form which is sent to a search action in
the same controller. I wanted to seperate this from the index action
because its pretty heavy and involves backgroundrb, scraping etc.
Once the
thanks andrew for that.
--
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
i dont know why but when i tried rails testproject without sudo it
worked fine... need to stop smoking crack guess.
Well now ive worked quite a bit on this sudo project so is there any way
to unsudo it quickly?
im guessing one way would be to send it to git and then grab it again
(ive never u
Hi Ive been googling around but cant get anything concrete on this.
Whenever I create a rails project or use a generate command I have to
use use the sudo command otherwise ubuntu complains about permissions.
However when I try to save some changes made to the files generated with
sudo in my edit
can they perform tasks dynamically i.e. a task is initiated on a users
mouse click. I thought i saw a railscast that said they were only good
for prescheduled tasks.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message becau
Hi im making a simple app which takes a users search term and scrapes
several sites rss feeds for relevant results. The scrape can take upto
10seconds. I want to make this a background process so I can update the
user with the scrapes status("currently scraping site x") and present
results as they
ok ive rerun the app and recreated the error. Ive attached the entire
log development.log file and pasted it below. If whats meant to be there
isnt there then its rails fault and not mine. Ive used the development
log plenty of times to find sources of errors.
Im pretty sure it has something t
hi guys, the error report above was taken from the development.log. Ill
rerun it later today when i get home and get more info for you.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
i thought id mentioned this already but for some reason i didnt (it was
late when i wrote the first post) - my linux environment is actually a
guest os via virtualbox and is being run on a vista 64 machine. This is
a new move for me and as id done a few test projects which worked fine
to test
Thats teh first thing i check and the code above is actually from the
development log.
--
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
still cant get anywhere with thisanyone help?
--
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 rubyonrai
i cant think what else i can supply that might help but if theres
anything you need supplied, explained or rephrased then just say the
word and ill get it to you...
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message becaus
How easy is it to do this. Is it simply a case of copying the project
directory over to the linux directory or does one have to create a new
project in the linux system and copy paste (due to the wonders of rails
magic)???
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~---
Hi Glennwest,sorry for the late reply. Id be up for chatting over skype
if you are. Let me know either here or via a message. Thank you for your
kind offer!
adam.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because
If i create in memory a hundred or so instances of a model, how do i go
about saving them to the database.
I have a Task Model
and say I have an array of Task obects
@tasks = [...]
how do i save them
do i
@tasks.each do |task|
task.save
end
?
--
Posted via http://www.ruby-forum.com/.
--~--
Excellent, lll go away and look into those methods. Many thanks!
--
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 em
pining the controller?
should have read
PINGING the controller.
sorry
--
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,
> Given that this is all client side, what would a rails implementation
> be (maybe the odd helper function but the lack of them certainly
> shouldn't stop you getting started).
>
> As far as your particular case goes all you need is something on the
> page that every however often pings your co
ive found that this pattern is called multi stage download. Its used by
kayak.com which is famous for its user interface. That site makes
finding cheap flights actually enjoyable.
Here are some general background links i found
this discusses the pattern in general
http://ajaxpatterns.org/Mult
Hi,
Im creating a screenscraper app that takes a users search term, scrapes
several 3rd party sites and returns the aggregated results after a few
seconds.
Rather than wait for all the sites scraping to be completed before
showing the results, I want to show the results as they are scraped, ie.
Thanks glennswest, im relatively new to rails. Whilst i think i
understood what you said can you (or anyone else) elaborate furhter on
the points below? I really appreciated your help.
> Just thinking, your scrape should probably be in a worker,
when you say a worker i take it you mean some t
Excellent thanks once again Andrew! Appreciate your advice.
--
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 t
Thanks Andrew for ruling out any doubts i had regarding using yaml.
I will cache the reuslts then for around 2 hours in a db.
Im now wondering how this will affect the performance of filtering.
My guess is that when a user selects some filters on the results screen,
these get passed as params
Hi thanks for your replies.
My main concern is performance. The data is not scraped beforehand in
advance, its scraped on demand by my users. They submit a search query
whch i then perform on several site, scrape their results and aggregate
them for the user. My site is basically a meta search
Given a users search query my app goes off and scrapes a few sites and
provides the results to the user. The user can also choose to filter
these results even further by category, age etc and this will be updated
via ajax without refreshing. All result items are not static. Except for
its title th
Ive done a lot of searching on this and found lots of topics on what
search tools to use but couldnt find something re: how you generally
implement search into your project regardless of the choice of tool
(ferret etc).
I want users to be able to do a basic search and if they want supply
some ext
Im learning rails now and what id like to do is aggregate data from
external sources on a daily basis into my database. Within my users can
searhc and filter through that data to their hearts content.
Assuming i can get this external data say via rss feeds or good old
screen scraping what tools c
Im new to rails and html and css. Ive read through tutorials but cant
get this to work.
I have a navbar which has the site name on the left and then some nav
links on the right ( for now the links are just text placeholders). The
site title font is larger than the nav link font and the two wont l
thanks fred, what im doing is pertty much like gmail. I have links on my
side nav equivalent to gmails "inbox" and "starred". When i click on
inbox in gmail it renders the list of emails in my inbox without a
refresh. Teh same with all "starred" etc. Id like that functionality.
So i guess id h
when a user clicks on a link_to_remote I would like to it to render a
view that i already have established. I know about page.redirect_to but
that would force a refresh. Id like to do something like page.replace
"an_existing_view"
is this possible or would i have to convert the view into a partial
hi vimal thanks but i dont think thats right. could you or someone show
a call to form
_remote_tag that will degrade if javascript is enabled in the browser?
if youd like something to work on how about his from railscasts
<% form_tag complete_tasks_path, :method => :put do %>
<% for task
can anyone help?:
--
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 unsu
i cant figure out how my syntax is wrong. Ive looked at various apis but
they dotn give examples using paths but a book im using does for a
simple case. Whats wrong with this
<% form_remote_tag :url => multi_complete_project_tasks_path(@project),
:method => :put,
:html => multi_c
thanks bill,
ill research into that more
--
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
im guessing this is somethign to do with prototype but i want a form
which comprises of one field to disapear if the user clicks anywhere
outside of that field. Ive seen this doen on rememberthemilk.com but not
sure how its done in rails.
if anyone could point me in the right direction id appreci
Hi thanks for the reply. What i did in the end was to type the "no
records" message into the view directly so that non javascript enabled
users could still see it. I then created some javascript code to handle
the situations above.
Thanks everyone for yoru help. it really helped me out
--
Pos
Thank you all for your input. Thank you hassan for answering some of my
doubts abou this methodology. Basically this is the result of my lack of
knowledge.
The rows in this table represent tasks in a todolist. Theres a delete
option for each task via ajax and the deleted row is taken out via
Im incorporating ajax / javascript stuff for the first time in my
project and im a bit confused by all various methods available, rjs,
prototype, javascript etc so please excuse me if this is an obvious
question.
Whilst looping though an array of model objects in my view I want to be
able to show
I want to do something like this in a link_to_remote call in a view
:before => '$$("tr#task_#{completed_task.id} >
td.task-title-cell").update("Reactivating")'
but the number of ' and " in the string are not allowing my
#{completed...} to work. Its just being read as characters and not as a
req
I want to provide the user with two ways to add a task. The quick way
and the detailed way pretty much like google calendar allows for its
events.
On clicking the "Add Quickly" link a form with just a title field
appears immediately below.
For "Add Detailed" the user is taken to a new page where
many thanks mad for your explanation. Im going to use the ajax call
method for now.
--
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
Ive googled this and searched here and other forums but not getting
appropriate reuslts. Perhaps someone on the board can help.
All i want to do is to have a button/link on a page such as "add task"
which when pressed will insert the appropriate form plus fields directly
under the button/link. Im
Thank you both for your responses.
Ive gone with Juans as it does what i need is shorter code. The only one
problem is that it results in the selected link still being selectABLE
ie. it can still be clicked on even though its the current page in view.
I can style it so that it looks like it is
MaD wrote:
> i don't see your code, but generally it works like this:
> <%= link_to "Link name", { :controller => 'controller_name', :action
> => 'action_name' }, :class => 'someclass' %>
>
> then you style your "someclass" via css.
Thanks for the reply, but doesnt the above add the class "som
I have four links on a page generated with link_to . I want to style the
currently active link differently than the other 3. I tried passing
:class => "selected" to link_to but it adds this tag to all 4 links, not
just the currently active one.
anyideas?
(this is for tabbed navigation)
--
Poste
I want to be able to view all the children resources in a nested
resoruce scheme.
Ie. if i have projects and tasks I want to be able to view every single
task like this /tasks
rather than
/project/1/task
Can anybody help?
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~--
I have a todo list involving projects and tasks and im using nested
resources. In Projects Show - i list all tasks associated with the
project. I also have a simple "add task" which allows the user to add a
task but only specify the title. Other attributes are set to default
(e.g. due date = None,
ahh i got confused between create and build. And the @task idea, dont
know why i didnt think about that.
Can i confirm that build doesnt actually add a blank task to @project
but rather just returns one?
Last im wondering how rest changes where i add code. In the above case
when a user adds
Hi I have nested resources i.e. projects which have many tasks and a
task belongs to a project.
In my project show view I show project info i.e. title and description
and then list all the tasks associated with it.
I want to have a simple non-javascript form which allows a user to add a
new task
Thanks everyone for your input. Yes I did only want to protect one of
the records so ill give your (roberts) method a shot!
thank you very much
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
thanks very much for that. I went away and researched teh api more about
hidden fields. I did try them out a while back but got an error and
thought i was heading down the wrong path but you confirmed i was indeed
looking in the right area.
thank you once again
--
Posted via http://www.ruby-
Is it possible to pass predefined arguments along with a form with
form_for? i.e. an id etc?
I have a task model with usual title, completed(bool), duedate and a
foreign key field called project_id (a project has many tasks). On one
view i want to have an "express add task" form i.e. there is onl
I want one record in my table to be undeletable by a user. I guess/know
i can achieve this by writing code in my controller and model to only
present the user with reocords which can be deleted but im wondering if
there are any magic rails methods that can do this in a concrete way?
background: I
solved, just found out about the url parameter for form_for. I can now
submit the form to any controller action i like woohoo
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
for multi model projects which have their own controllers and views plus
forms for editing and adding objects, how do you incorporate two
different models forms in one view
for example on a todo lists main hub (e.g. hub controller) index view
you could have a form for "Add new project" and anothe
rather
> Im praticing RAILS
;-)
--
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@googleg
Hi, this is probably a very easy problem to solve but ive googled and
searched this site no end and cant find a suitable solution - to be fair
im not really sure of the appropriate search terms.
Im praticing ruby by making a simple todo list. I have two tables
projects and tasks. In my main "inde
ahh thank you very much for your help on that. I dont remember seeing
that mentioned in the api. Ill have another look.
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
sorry, forgot to include that part
heres the result from the browser
==
NoMethodError in Task#add
Showing app/views/task/add.rhtml where line #14 raised:
undefined method `merge' for :get_title:Symbol
Extracted source (around li
Hi I have two tables Projects and Tasks each with their own respective
Ms Vs and Cs
In my add task view I want to have a drop down box with Project names. I
cant get it to work though. Ive read posts here, the api and i dotn
really understand what the use of the first two arguments are? Are they
> Sounds like your version of mysql was compiled without support for
> innodb.
>
> Fred
hmm i am using a version that came with the book - its version 5 though.
Ill try downloading it direct from the msql website. Why does mysql work
fine when i install the same version outside of the IR dire
Sorry I made a mistake that should have read a book based on rails 1.2*
--
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, s
Hi Im using a book based on 1.2* ruby and rather than using instal rails
to install all req. software it asks the user to do everthing
individually. Well i already had instant rails working fine so thought
id stick to it. The book wanted msql 5 to be installed and then select
various options i.e.
78 matches
Mail list logo