Displaying 20 results from an estimated 10000 matches similar to: "params vs @params"
2006 Apr 03
3
Ready to call this a bug
I''ve been trying to get a handle on AJAX today and am ready to call "BUG!"
I started with the code from Curt''s "AJAX on Rails". It used <ul="my_list"> and <li> and worked fine. Except I need a table instead of a list. So I did the simplest thing that I thought could possibly work.
In the view, I changed the :position attribute from
2006 Mar 29
4
Why doesn''t Rails 1.1 have all the Script.aculo.us 1.6 files?
Why aren''t builder.js, slider.js, and scriptaculous.js part of the
Rails 1.1 javascripts?
rab:javascripts $ pwd
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/html/javascripts
rab:javascripts $ ls -l
total 288
-rw-r--r-- 1 root wheel 148 Mar 28 08:56 application.js
-rw-r--r-- 1 root wheel 28036 Mar 28 08:56 controls.js
-rw-r--r-- 1 root wheel 23613 Mar 28 08:56 dragdrop.js
2008 Nov 17
7
super global dummy method for gettext + rails 2.2
Hi,
since rails 2.2 doesn''t work with gettext anymore I decided to use a
gettext dummy method until the gettext team relases a working version
for rails 2.2. My application doesn''t need any i18n support right now
and this way i figured it would be very easy to integrate gettext
later. Just setup the plugin and go.
So I need a method called _ which is available in alle models,
2010 Jan 31
6
Action path - syntax error, unexpected tIDENTIFIER, expecting ')'
I have a user controller with login as action.
When I access the index.html.erb file via application.layout file. I get a
error on the login link on the index.html.erb page. I think I am having
dfifficulty in setting up path to an action or even understanding how to set
REST path properly. Can someone please help me.
Here is the error on the home page:
2009 Oct 13
3
Site map
Hi All...
I am using generate_sitemap plugin to generate sitemap. It goes very
well and creates sitemap as well. My problem is I want some links that
are coming from vender/plugins. Can any one tell me how to get those
links???
Thanks all...
--
Posted via http://www.ruby-forum.com/.
2006 Oct 17
2
accessing args in worker
If, in the controller, I start a worker and pass in an argument like this:
session[:job_key] = MiddleMan.new_worker(:class => :foo_worker,
:args => {:emrec_id => @emrec.id})
How do I access the value in the worker? I can''t seem to figure it out ;-p
Thanks!
Bill
-------------- next part --------------
An HTML attachment was
2006 Apr 04
3
Keeping javascript in the <head>
Given that Rails has built in ways to do almost everything else :) , is
there a way to keep view specific javascripts inside the head tag of a
layout without having to include that javascript on every page?
--
Marlon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060404/65e9bb6d/attachment.html
2006 Oct 24
5
deployment issues?
Thanks to many of you, I''ve got my session management working with BackGrounDRb. Very cool. So now I need to deploy it. I''m on a shared hosting plan (at a2hosting in case that matters). Are there any issues I should expect to have to deal with in getting them to deploy the plugin? Anything special I need to do? I''m wondering in particular about the ''start
2006 Mar 31
6
BigDecimal + Float => Float?
I was just playing around in irb and noticed that while BigDecimal + Integer
=> BigDecimal, BigDecimal + Float => Float. Is there any reason for this?
It seems inconsistent and means you have to check the class of any number you
add to a BigDecimal, which looks very un-Ruby-like to me.
Ashley
2007 Nov 12
7
schema_info always wants to be 3, even when set to 7
Hi all,
I''m having a very odd problem with db:migrate. I''m using Rails 1.2.5
on Windows XP SP2 and Ruby 1.8.6
I have seven migrations. If I run them with an empty database, it
runs the first three, then halts. When I look in schema_info, the
version is 3.
If I run db:migrate VERSION=7, then it runs through the remaining 4
migrations, and the version is 7 in the DB.
2009 Mar 10
7
Managing migrations
I have a migration "x" that when it runs self.up it adds a new column
to a table, and of course when self. down is run it deletes said
table...
After I ran this migration I continued to work and in the process
added a couple other migrations. After a while I realized that the
column migration "x" created was a mistake and I no longer need it. So
I ran rake db:migrate:down
2010 May 03
7
rendering images dynamically
Hi,
I have a rails application where I respond to a request by fetching
image urls from various web api calls and need to display them as they
come available. I am able to display all the images once I get them
all, but that causes an unacceptable delay for my user.
One approach I am trying is, from my controller, set an @image
variable, and then pass in a block to the model that retrieves the
2007 Oct 19
14
Agile Web Development Book, need a bit of help
I''m working my way through the book Agile Web Development with Rails,
and I am in the section where the book has me creating a display_cart
method and the associated view. When I copied the code from the book
into the view, it threw this error. If anyone could give me some hints
where I should be looking I''d appreciate it.
NoMethodError in Store#display_cart
Showing
2006 Mar 30
3
simple migration problem
Hi:
I''m running RoR 1.1
I''m going through the Agile book Depot example and I want to generate my
next migration file so i''m typing
./script/generate migration depot
I was sort of expecting to get the file 002_depot.rb .. instead i''m
being informed that there already exists a migration named depot..and no
new file is generated..
should I be using a new
2006 Apr 02
1
Best method for extracting text from a longer text in Ruby
Hi Guys,
I need to extract a text string from a longer text string. Both strings
are variable in length and the text to extract is always between
recognizable characters or tags (or the text to extract is from a known
distance from said tags).
I''m not an expert at text manipulation in ruby so it would be great if
someone could recommend the best solution. I''m looking at the
2006 Apr 05
1
./script/console - disabling "records found.inspect"?
How do I disable console''s default behavior of automatically outputting
what appears to be an inspect of all records found? For example:
>> Item.find(:all).each do |item|
>> puts item.title
>> end
# bunch of text outputted that shows the contents of all fields in all
items...
Joe
--
Posted via http://www.ruby-forum.com/.
2006 Apr 08
1
control for acts_as_tree structure
Hi,
I am looking for a good javascript control to display an acts_as_tree
structure. Has anyone had good luck with an existing one or would it
be better to roll my own?
Thanks,
Dan
2006 Apr 12
2
Handle null item
Hi,
How to i handle a find that returns a null?
Say i put 40 into the paramter id below and there is no post with an id
of 40
i get an error saying no post exists with id
@post = Post.find(params[:id])
Anyone help??
--
Posted via http://www.ruby-forum.com/.
2006 Jun 05
5
Regexp - date validation
Can somebody tell me why the following RegExp doesn''t work for date
validation in Rails... It validates fine in RadRails -- using REgExp
panel. Intended format: (mm/dd/yyyy):
%r{^(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])(-|/)(19|20)([0-9][0-9])$}
If i try the following, it works in Rails:
%r{(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])}
When I add the last piece, it
2006 Apr 17
2
nesting layouts?
Hi all,
Currently I am working on a site which in principle consists of three
div''s, a menu, a left div and a right div. Now the content of the left
and right div can vary wildly but the overall ''feeling'' should be the
same.
Now I have one template, called ''index.rhtml'' which checks in a long
list of if-then-else what to render. This is of course