Displaying 20 results from an estimated 10000 matches similar to: "passing variable between methods"
2008 Apr 19
4
Displaying external url's
I am a rails beginner and I am having trouble displaying external urls
on view.
This is what i have in DB for ex: www.rubyonrails.com, if i try to
construct the url on the page using link_to the url formed is -
http://localhost:3000/www.rubyonrails.com.
Can someone help me in fixing this issue.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using
select_tag into link_to ?
Basically I want to do something like:
<%= select_tag( "name", options_for_select(%w{John Doe Jane })) %>
<%= link_to "Delete",
{ :controller => "myname", :action => "add",
:id => name },
2008 Apr 20
10
Actionmailer not working [no errors]
hi,
I have a little problem with actionmailer 2.0.2
The problem is that I am trying to send mails and development.log says
that everything is ok but I can''t find any mails in my mailbox.
I checked my sendmail with PHP function "mail()" - works nice.
/var/log/mail.log don''t drop any lines when sending mails with
actionmailer.
So in conclusion no errors and no way to
2008 Feb 22
5
routing?
Hello RoR Developers
I want to create parameter in routes.rb which is wanted to be used in
javascript code in view page. there is select object in my view page and
this parameter will get value from select object however that my select
object is not in form.
how can I create parameter in routes.rb and equals to option value.
thank you very much for any commend.
--
Posted via
2008 Jun 15
7
Getting "no block given" on find method - rails 2.1
I am trying to do a simple find through the current_user but get an
exception. Either someone spiked my Starbucks coffee and I am screwing
up all over the place or there is something wrong.
def index
@league = current_user.leagues.find(13)
end
# Error
LocalJumpError in Admin/schedule todosController#index
no block given
If I pass a block to it it works fine, but it is just messy:
=====
2008 Apr 19
1
form_for question
I have a following snippt to make a form.
<% form_for :post, @post, :url => { :action => "create" } do |f| -%>
<%- end ->
What does ":post" and "@post" do respectively?
If my understanding is correct, @post is there because I set "@post =
Post.new" in the action. But I don''t know what ":post " is for.
Tek
2008 May 30
1
how to use RMovie
hello i''m new to rails,
actually working in Flex 3
i want to ask that how actually works RMovie to convert into flv on
rails which r i uploaded from flex.
Video r uploaded successfully , but how to convert it and happen
related work(like snapshots,etc).
thx you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2008 Jun 06
1
tinymce and Rails 2.0
is there some trick to installing tinymce w/ rails 2.xx ?? None of the
old intructions I''ve found seem to be working.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2008 Jul 08
1
Looking for a framework to report user feedback and form errors
We''re building our first Rails app and looking for a consistent way to
provide feedback messages; things like success messages like "your
password changed successfully" or form errors with the form field
highlighted in red (you know).
I''ve read that Rails provides a framework for this but we''ve diverged
in how we do this in our app and would to reign things in
2008 Apr 19
3
How to find nil object error in the rails application?
After I added some plugins to rails my application it begin to give
following error.
Error during failsafe response: You have a nil object when you didn''t
expect it!
The error occurred while evaluating nil.symbolize_keys
(originally You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.symbolize_keys)
But there is no stack trace I dont
2008 Jul 04
3
Linkt_to problems
I can''t explain where those differences come from.
In one Project I can use the link_to without any problems.
Like this:
<%= link_to "LINKNAME", :action => "destroy", :id => ID %>
But in another project... That happens
<%= link_to "delete", :action => "destroy", :id => ticket.id %>
<%= link_to "edit", :action
2011 Jul 11
36
has_many and belongs_to association
Hi ,
I want to test the one below but I got the problem
belongs_to :name, :class_name => "Phrase", :foreign_key => "name"
in my test
context "test"do
should have_many :phrases
end
in language.rb
belongs_to :name, :class_name => "Phrase", :foreign_key => "name"
error is
1) Failure:
test: check has_many and belongs_to
2008 May 18
2
Rendering data in tables
Hello all,
I am new to Rails.
I don''t know whether it is possible are not.
In my application, I need get data from one table , then arrange these
data in table in textfield, then I need to edit data in all rows in
single form.
At the end I need to save these data back to databse.
How can I do this
Is this possible
<%= tag("input" , {:type => '''',
2008 Jul 04
9
file upload
is there any link for step by step guide in file upload in database ...
im follwing the link
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm..
which shows file upload into folder not in database ..pls help..
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2008 Jun 09
4
YUI vs GWT vs ExtJS vs ????
I would like y''all''s opinions on ease of implementation into Rails,
quality and quantity of widgets etc between Yahoo User Interface and
Google Web toolkit and ExtJS. I am just getting ready to invest a
huge amount of effort into one of them and I would like to know what
the community''s experience has been with these toolsets. OR.. is there
a better open source set of
2008 Jul 03
6
mysql gem warning on ubuntu
i just deployed my app on ubuntu with passenger.
i installed the mysql gem as follows:
$ sudo gem install mysql
Select which gem to install for your platform (i486-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation
> 3
Building native extensions. This could take a while...
Successfully installed
2008 Apr 30
5
Quick Submit Button Question...
Hello,
Can I pass a variable from a submit button only? I have a form that the
user fills out and I need two different submit buttons - one for ''sync''
and one for ''full push''. I was thinking I could add some sort of param
to the button, but it''s not working... is there a way to do this? I have
this:
<%= submit_tag ''push to
2006 Mar 23
4
belongs_to more than one model
Suppose I have one table:
states
id
statename
And I have two other tables that contains states:
houses
id
color
state_id
places
id
place_name
state_id
How would my model relationships look like?
class State < ActiveRecord::Base
belongs_to house
belongs_to place
end
class House < ActiveRecord::Base
has_one state
end
class Place <
2006 Jan 06
4
Are migrations executed within a transaction?
Hi all,
Can I safely assume that each migration is excuted within a
transaction, so that''s it''s safe to have migrations executing failing
statements?
Thanks,
- Rowan
--
Morality is usually taught by the immoral.
2006 Jul 21
1
Passing a variable between methods
Hi,
I am trying to add search functionality to may application. I am
struggeling to pass my query to the controller and then show all my
search results in another view. How would I do this?
Model:
class Advert < ActiveRecord::Base
belongs_to :user
def self.search(query)
if !query.to_s.strip.empty?
tokens = query.split.collect {|c| "%#{c.downcase}%"}