Hi Im using image_submit_tag to submit my form. works fine.. but the
image is displayed with border.
I used border => 0 but no use.
This is my code.
<%= image_submit_tag "../images/upload.png", :border => 0 %>
any ideas??
Regards,
Srikanth
--
Posted via http://www.ruby-forum.com/.
--
You r
cheers :)
On Thu, Aug 19, 2010 at 11:47 AM, Priya Saini wrote:
> Hey thanks Rajeev.. It worked..
> Was doing a silly mistake..
>
> Priya Saini wrote:
> > Didnt help.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
Hey thanks Rajeev.. It worked..
Was doing a silly mistake..
Priya Saini wrote:
> Didnt 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-t..
On 19 Aug 2010, at 01:11, Mark Hamil wrote:
> Yeah I'm using the skip_before_filter method too,
> but still, it seems it would be better if you could specify a
> controller/action like your original posts suggests
>
> before_filter :custom_filter, :except => {:controler=>:action}
before_filte
Hi,
Be sure you have build the document for message before you use it.
On 8月19日, 下午1时08分, Tom Mac wrote:
> Hi
> Thanks for replying.I could do it partially with the following
> modifications to my models and views
>
> message_thread
>
> has_many messages
> accepts_nes
Didnt 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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-tal
I have a legacy db with the following simplified structure:
Table-A:
type_key, code_key, name, ... # PKs are type_key and code_key,
there is no id col and I cannot alter this db
Table-B: # each row has only the code as a foreign_key, the type_key
is hard-coded to "FOOKEY"
an_id, code, ...
hey what was that line please suggest
On Thu, Aug 19, 2010 at 10:49 AM, Jeff Wang wrote:
> Tim Teng wrote:
> > C:/rails/admin/app/controllers/application_controller.rb:2
>
> i comment out that line then it works, great.
>
> thx.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received
try this
*validate :striped_descriptions
def striped_descriptions
# striping_description
unless self.description.nil?
logger.debug 'self.description before strip'
logger.debug self.description
striped_description = (self.description).strip
self.description =
Hi
Thanks for replying.I could do it partially with the following
modifications to my models and views
message_thread
has_many messages
accepts_nested_attributes_for :messages
message
==
belongs_to message_thread
has_many :document_messages
has_many
Tim Teng wrote:
> C:/rails/admin/app/controllers/application_controller.rb:2
i comment out that line then it works, great.
thx.
--
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 g
Hi:
Its a simple form to create a job. FCKeditor has been placed with the
name job[description].
At the create event, it assigns the value to @job.description.
I was trying to strip it before saving like:
@job.description = params[:job][:description].strip, but it isnt solving
the purpose.
In t
Explain yours purpose here
put some lines of code i will tell you the way
do something in model
before_save : strip_description
def strip_description
unless !self.description.nil?
self.description = self.description.strip # or whatever please
check that how to
# impleme
Thanks for ur instant reply Rajeev. On irb strip is working exactly the
way i want but inside code it isn't solving the purpose.
rajeevsharma86 wrote:
> you may use strip
>
> http://ruby-doc.org/core/classes/String.src/M000820.html
> or any else as required .
>
> On Thu, Aug 19, 2010 at 9:59 AM
you may use strip
http://ruby-doc.org/core/classes/String.src/M000820.html
or any else as required .
On Thu, Aug 19, 2010 at 9:59 AM, Priya Saini wrote:
> Hi:
>
> I am using FCKeditor in one of my form, when i copy and paste something
> into it using WordPaste, it appends few newlines at the be
C:/rails/admin/app/controllers/application_controller.rb:2
--
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
rubyonrails-
Hi:
I am using FCKeditor in one of my form, when i copy and paste something
into it using WordPaste, it appends few newlines at the beginning and at
the end.
How can i strip just those \n without effecting the inbetween newlines
and the formatting.
TIA,
Priya
--
Posted via http://www.ruby-forum
Hi guys,
I am a completely ruby & rails newbie. i have being struggling on this
issue for almost 2 days, still can not figure out the problem.
there are two websites i'm trying to set up a development environment on
my pc running windows xp 32 bit version. a front-end customer facing
page & back-
Paul Harrington wrote:
> Jeffrey L. Taylor wrote:
>> Am I correct in assuming that the max length of a string is 65,535 on a
>> 32 bit
>> platform? Anyway around this, other classes, 64 bit platform?
>>
>> TIA,
>> Jeffrey
>
> What would make you assume this? Simplest demonstration:
>
> irb(m
Jeffrey L. Taylor wrote:
> Am I correct in assuming that the max length of a string is 65,535 on a
> 32 bit
> platform? Anyway around this, other classes, 64 bit platform?
>
> TIA,
> Jeffrey
What would make you assume this? Simplest demonstration:
irb(main):004:0> s = "a"*7;nil
=> nil
ir
Disregard, solution found.
--
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 this group, send email to
r
I am trying to create an association table using the ":through" option
in "has_many" but not having success. I have created the necessary
migrations of the association tables and run rake db:migrate
I have the following model:
class Group < ActiveRecord::Base
has_many :users, :through => :group
Open a terminal, navigate to the /opt/rubystack-2.0-0 folder, and run "sudo
./ctlscript.sh start"
On Wed, Aug 18, 2010 at 7:46 PM, Rich d wrote:
> I have virtual machine and virtual rails installed on my machine. I
> opened up a terminal to start the rubystack version of MySQL by typing
> the
Am I correct in assuming that the max length of a string is 65,535 on a 32 bit
platform? Anyway around this, other classes, 64 bit platform?
TIA,
Jeffrey
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send emai
I have virtual machine and virtual rails installed on my machine. I
opened up a terminal to start the rubystack version of MySQL by typing
the following:
/opt/rubystack-2.0-0
when I do this I get the following message:
bash: /opt/rubystack-2.0-0: is a directory
I am new to this and this is wha
Yeah I'm using the skip_before_filter method too,
but still, it seems it would be better if you could specify a
controller/action like your original posts suggests
before_filter :custom_filter, :except => {:controler=>:action}
that way you can include the filter on everything by applying it to t
Thanks. I understood the models and controllers. I'm not able to
understand how to add the code when it comes to enrolling students.
--
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 th
Mindtonic wrote:
> Hello. I have a database query I am trying to develop.
OK...but note that your question has absolutely nothing to do with
Rails, and would be better asked in an SQL forum.
>
> For the purpose of explanation, I am going to use a suit of playing
> cards in ascending order as a
sorry I misread your tables. The has_many :through is looking for a
join table with ids for both sides which is the cause of the error,
same kind of table as a HABTM join table.
class Author < ActiveRecord::Base
has_many :authorships
has_many :books, :through => :authorships
end
clas
On Aug 18, 10:44 pm, Mindtonic wrote:
> Requesting 2 => [2, 3, 4, 5, 6]
> Requesting K => [10, J, Q, K, A]
>
> If this query is run against a set with less than 5 records, it
> returns all 5 records.
>
> What function, approach or theory should I utilize to accomplish
> this? What would the que
> I ran into this issue when I backuped a database and restored it back
> into another system.
You might want to look into how that database got backed up. By default (at
least every where I've done it) pg_dump will include the statements necessary
to "reset" the sequences... that is, all my d
Hello. I have a database query I am trying to develop.
For the purpose of explanation, I am going to use a suit of playing
cards in ascending order as an example. The complete data set would
look like this: [2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A]
The WHERE clause would contain "suit = hearts"
Just in case you haven't solved this yet: Install the plugin from
http://github.com/jhaagmans/flotilla.git instead - FileUtils is now
'fileutils'.
-Matt
On Jul 6, 3:53 pm, Colin Law wrote:
> Hi
>
> I am attempting to install the Flotilla plugin for the flot javascript
> charting library.
>
> I h
Hussein B wrote:
> Hey,
> I want to create a Rails project that uses jQuery and DataMapper.
> Is it possible?
> If yes, would you please tell me how.
> Thanks all.
http://lmgtfy.com/?q=rails+jquery
http://lmgtfy.com/?q=rails+datamapper
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@ma
I ran into this issue when I backuped a database and restored it back
into another system.
--
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...@g
Parker Selbert wrote:
> Marnen Laibow-Koser wrote:
>>
>> What's the advantage of not using sudo for gems? And for Rails 2.x, why
>> would you want anything past 1.8.7?
>
> Aside from the security aspect, which isn't something I'm concerned
> about in this context, there is just the simplificat
Marnen Laibow-Koser wrote:
>
> What's the advantage of not using sudo for gems? And for Rails 2.x, why
> would you want anything past 1.8.7?
Aside from the security aspect, which isn't something I'm concerned
about in this context, there is just the simplification. Getting
identical, portable
IAmNan wrote:
> I've put the relevant code here: http://pastie.org/1100297
>
> So you know what's happening, the farmer creates a Production, which
> creates one or more Supplies, which may create one or more Exchanges
> if there are any Demands that match the Supply.
>
> The Exchange is supposed
On Aug 18, 6:24 pm, IAmNan wrote:
>
> On exchange.rb#18 where the debugger stops, the values of
> demand.available and supply.available have been correctly decremented.
> After I let the code continue, they are back to their original values.
>
It doesn't look your saving the supply & semand obj
On Wed, Aug 18, 2010 at 4:00 PM, Me wrote:
> oh you need to add the has_many for the join table
>
> has_many :meter_goup
> has_many :meters, :through => :meter_group
>
>
I take it you mean on the Subscription table? which currently looks like:
class Subscription < ActiveRecord::Base
belongs_t
Warren Seltzer wrote:
> I think the requirement to manually reset the index is a bug in
> postgresql. Either in
> implementation or design.
I've never needed to do that. I wonder why...would autovacuum help?
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via ht
Jan Kadera wrote:
> Hello,
> can sbdy please be so kind and tell me in a few words how to solve the
> following problem.
>
> I have just deployed an application.
> I generated controller home with an action show.
> In the view show I have the text "sample text"
>
> I want to add a language swich
Robby Russell wrote:
> On Apr 29, 2006, at 5:56 PM, Guido Sohne wrote:
>
>> Throws an exception due to the following SQL error: duplicate key
>> violates unique constraint.
>
> Your primary key index isn't in sync or something.
> SELECT MAX(id) FROM entities;
>
> SELECT nextval('entities_id_
> 4) Edited the models/course.rb to
> has_many :studets, :through => :enrollments
Check your spelling.
--
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 unsubscr
On Aug 18, 6:24 pm, IAmNan wrote:
> Thanks, Fred. I think you've helped me out before. I appreciate your
> effort.
>
> I've put the relevant code here:http://pastie.org/1100297
>
> So you know what's happening, the farmer creates a Production, which
> creates one or more Supplies, which may crea
oh you need to add the has_many for the join table
has_many :meter_goup
has_many :meters, :through => :meter_group
On Aug 18, 2:41 pm, Rick R wrote:
> On Wed, Aug 18, 2010 at 3:30 PM, Me wrote:
> > I would start by getting rid of the :foreign_key specifications
> > unless you are doing somethi
> Error executing the script2:
>
> `const_missing': uninitialized constant AvailabilityReport::DataLoad
> (NameError)
You'll need to require the file defining that module yourself
Fred
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To
On Wed, Aug 18, 2010 at 3:30 PM, Me wrote:
> I would start by getting rid of the :foreign_key specifications
> unless you are doing something non standard.
>
>
Ok, thanks. I removed them. (Didn't fix the issue but does look a lot
cleaner.)
> On Aug 18, 2:26 pm, Rick R wrote:
> > On Wed, Aug 1
I am executing some scripts from the script directory.
script files:
--
script1:
require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + '/../config/environment'
module DataLoad
end
-
script 2 being executed:
---
I would start by getting rid of the :foreign_key specifications
unless you are doing something non standard.
On Aug 18, 2:26 pm, Rick R wrote:
> On Wed, Aug 18, 2010 at 3:04 PM, Rick R wrote:
> > I'm a rails newb and have been Googling about this, but I'm still stumped.
>
> > Not showing everyt
On Wed, Aug 18, 2010 at 3:04 PM, Rick R wrote:
> I'm a rails newb and have been Googling about this, but I'm still stumped.
>
> Not showing everything here, but basically it should be a pretty common
> setup so I'm sure others know what I'm doing wrong.
>
> - A meter can belong to many meter_grou
I'm a rails newb and have been Googling about this, but I'm still stumped.
Not showing everything here, but basically it should be a pretty common
setup so I'm sure others know what I'm doing wrong.
- A meter can belong to many meter_groups
- A meter_group can have many meters.
- A user can 'subs
Hello,
can sbdy please be so kind and tell me in a few words how to solve the
following problem.
I have just deployed an application.
I generated controller home with an action show.
In the view show I have the text "sample text"
I want to add a language swich (better automatic recogniser) which
Jeffrey L. Taylor wrote:
> Try 'obs[0].touch'. Quoting the documentation at
> http://rails.rubyonrails.org/:
Jeffrey: That's a great idea, but didn't work:
irb(main):034:0> PremiseObservation.count
=> 0
irb(main):035:0> obs.touch
=> false
irb(main):036:0> obs.save!
=> true
irb(main):037:0> Prem
Thanks, Fred. I think you've helped me out before. I appreciate your
effort.
I've put the relevant code here: http://pastie.org/1100297
So you know what's happening, the farmer creates a Production, which
creates one or more Supplies, which may create one or more Exchanges
if there are any Demand
Parker Selbert wrote:
> Hussein B wrote:
>> Hey,
>> I have Rails 2.2.2 installed by default on Mac OS X 10.6
>> How to upgrade it to the latest Rails 2.x.x ?
>> Thanks for help and time.
>
> You can update to the latest version of rails, but I would very highly
> recommend install RVM (Ruby Versi
Quoting Fearless Fool :
> I don't like this. This makes me grumpy, and I've even already had my
> morning coffee.
>
> obs[0] is a PremiseObservation, save! completed without error, yet
> nothing was written to the db. This is a serious ass-biter:
>
> irb(main):057:0> PremiseObservation.count
>
Colin Law wrote:
[...]
>> [...]
>> I'd actually support a syntax for union queries such as
>> Person.union_scope(:scope_a, :scope_b). This makes it obvious that it
>> is not a simple scope chain, while still being simple to call.
>
> Is that not what the OP was asking for in the original post to
Hussein B wrote:
> Hey,
> I have Rails 2.2.2 installed by default on Mac OS X 10.6
> How to upgrade it to the latest Rails 2.x.x ?
> Thanks for help and time.
You can update to the latest version of rails, but I would very highly
recommend install RVM (Ruby Version Manager) as well. It will let y
Hussein B wrote:
> Hey,
> I have Rails 2.2.2 installed by default on Mac OS X 10.6
> How to upgrade it to the latest Rails 2.x.x ?
> Thanks for help and time.
sudo gem update --system
sudo gem install rails
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are
On Wed, Aug 18, 2010 at 8:04 AM, Hussein B wrote:
> I have Rails 2.2.2 installed by default on Mac OS X 10.6
> How to upgrade it to the latest Rails 2.x.x ?
`sudo gem update rails` ought to do it :-)
--
Hassan Schroeder hassan.schroe...@gmail.com
twitter: @hassan
--
On Aug 18, 3:58 pm, IAmNan wrote:
> I have a Production model, which represents a farmer's crop. After
> create (via after_save) I call a method that creates one or more
> Supply models, which represent a week of anticipated product harvest.
> After each of those are created, a class method gets
FYI: I'm using rails 3.0.0.rc + ruby 1.8.7 + sqlite3 for dev, postgre
for prod.
On Aug 18, 10:58 am, IAmNan wrote:
> I have a Production model, which represents a farmer's crop. After
> create (via after_save) I call a method that creates one or more
> Supply models, which represent a week of ant
Whats your rails version in windows and linux.
Rails 3 : rails new app
Rails 2: rails app
2010/8/18 Carl Jenkins :
> I installed Ruby 1.9 on my Ubuntu laptop and started working on the
> Depot application in the Agile Web Development with Rails book.
>
> After trying the same thing at work but,
Marnen Laibow-Koser wrote:
> lucky in ruby wrote:
>> I have a nested resource hotel_user and i wish to have
>> hotel_users_controller under hotel namespace.
>>
>> I want to use restful authentication here
> [...]
>
> No you don't. restful_authentication should never be used: it relies
> too mu
Hey,
I want to create a Rails project that uses jQuery and DataMapper.
Is it possible?
If yes, would you please tell me how.
Thanks all.
--
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...
Hey,
I have Rails 2.2.2 installed by default on Mac OS X 10.6
How to upgrade it to the latest Rails 2.x.x ?
Thanks for help and time.
--
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...@go
I have a Production model, which represents a farmer's crop. After
create (via after_save) I call a method that creates one or more
Supply models, which represent a week of anticipated product harvest.
After each of those are created, a class method gets called that tries
to match each new Supply w
On 18 August 2010 14:19, Bla ... wrote:
> Yeah, I'm sorry.
>
> Actually, I wrote it wrong here, in the forum.
>
> It's:
>
> [code]
> <%= error_messages_for :hi,
> :header_message => "Error." ,
> :message => "Check the following camps:"%>
The docs at
http://
Please disregard.
It turns out that I was using the wrong rails.js file with jQuery plus
the wrong version of jQuery. Please watch the latest RailsCast from
Ryan Bates to get around this problem.
Thanks.
Bharat
--
Posted via http://www.ruby-forum.com/.
--
You received this message because yo
On 18 August 2010 13:42, Marnen Laibow-Koser wrote:
> Colin Law wrote:
>> On 17 August 2010 23:02, Marnen Laibow-Koser
>> wrote:
>>> No. �Don't. �It's a bad idea. �It should never be necessary. �Did you
>>> read the link I posted?
>>
>> Marnen, I am not sure what you are saying should never be ne
this tag "[code]" and "[/code]" is just to let everyone know where
begins and where ends my code.
It's not in my controller...
--
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 gro
Marnen Laibow-Koser wrote:
> lucky in ruby wrote:
>> I have a nested resource hotel_user and i wish to have
>> hotel_users_controller under hotel namespace.
>>
>> I want to use restful authentication here
> [...]
>
> No you don't. restful_authentication should never be used: it relies
> too mu
lucky in ruby wrote:
> I have a nested resource hotel_user and i wish to have
> hotel_users_controller under hotel namespace.
>
> I want to use restful authentication here
[...]
No you don't. restful_authentication should never be used: it relies
too much on unmaintainable generated code that
UGH! I have Rials 2.3.8 not 3 ... :( my fault.
--
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 this g
I installed Ruby 1.9 on my Ubuntu laptop and started working on the
Depot application in the Agile Web Development with Rails book.
After trying the same thing at work but, on a Windows machine I notice
something strange.
When creating the depot applicaiton on Linux it is 'rails new depot'
but, w
On Tue, Aug 17, 2010 at 22:58, oliver torres wrote:
> it works great in the video but for me i get this error
> undefined method `password_confirmation' for #
>
> how come that password_confirmation method is not defined?
> any tips?
Most likely the method/data/whatever is not defined because th
On Aug 18, 2:19 pm, "Bla ..." wrote:
> Yeah, I'm sorry.
>
> Actually, I wrote it wrong here, in the forum.
>
> It's:
>
> [code]
> <%= error_messages_for :hi,
> :header_message => "Error." ,
> :message => "Check the following camps:"%>
> [/code]
>
What's
2.3.8 attempts to give deprecation notices for things which will go away in
Rails 3.0 & later. In this case it is saying that several of your plugins
should place their rake tasks into the lib directory. While this won't cause
any problems in your app, it is good to start resolving the warning
Here there is a tip:
http://rubyquicktips.tumblr.com/post/29282/display-activerecord-generated-sql-queries-in-the
In order to make it work for both Rails 2 and Rails 3, my ~/irbrc looks
like:
require 'logger'
if ENV.include?('RAILS_ENV')&&
!Object.const_defined?('RAILS_DEFAULT_LOGGER')
Yeah, I'm sorry.
Actually, I wrote it wrong here, in the forum.
It's:
[code]
<%= error_messages_for :hi,
:header_message => "Error." ,
:message => "Check the following camps:"%>
[/code]
--
Posted via http://www.ruby-forum.com/.
--
You received this me
Thanks for your replies.
The issue was as follows:
As I mentioned, I'm walking through an example in "Head First Rails". I
have used the book's version of "development.sqlite3" that contains some
data.
I used the name "advs" to create my application, and the table name in
the database version
Hi,
There is an example for nested file upload form by using paperclip.
The codes are similar to you, be attention to the usage of
accepts_nested_attributes_for.
Check it here:
http://rails-bestpractices.com/posts/45-use-sti-and-polymorphic-model-for-multiple-uploads
On Aug 18, 1:43 pm, Tom Mac
Colin Law wrote:
> On 17 August 2010 23:02, Marnen Laibow-Koser
> wrote:
>> No. �Don't. �It's a bad idea. �It should never be necessary. �Did you
>> read the link I posted?
>
> Marnen, I am not sure what you are saying should never be necessary.
> Suppose I have named_scope_a and named_scope_b.
What does your view look like?
--
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
rubyonrails-talk+unsubscr...@googlegroup
On 18 August 2010 13:02, Bla ... wrote:
> I'm having a problem, 'cause I wrote the following line in my model
> "Hi":
>
> [code]
> validates_numericality_of :phone, :only_integer => true, :allow_blank =>
> false, :message => "must be a number"
> [/code]
>
> And in my "new" view, I put:
>
> [code]
I'm having a problem, 'cause I wrote the following line in my model
"Hi":
[code]
validates_numericality_of :phone, :only_integer => true, :allow_blank =>
false, :message => "must be a number"
[/code]
And in my "new" view, I put:
[code]
<%= error_messages_for :oi,
:header_mes
On 18 August 2010 12:36, Abder-Rahman Ali wrote:
> I'm walking through an example in the "Head First Rails" book, but,
> instead doing the examples using Rails3.0.0.rc.
>
> But, I'm getting this error when browsing for example:
>
> http://localhost:3000/advs/1
>
> undefined method `eq' for nil:Nil
I'm walking through an example in the "Head First Rails" book, but,
instead doing the examples using Rails3.0.0.rc.
But, I'm getting this error when browsing for example:
http://localhost:3000/advs/1
undefined method `eq' for nil:NilClass
Provided that my advs_controller.rb is as follows:
http
On Aug 18, 5:18 am, AppleII717 wrote:
\>
> I don't know if that was possible in rails2 (e.g., @bar
> @foo.bars.find(:conditions => "xxx"))
>
> Not sure I have a use for it, but it was interesting that you can
> filter a nested has_many relationship.
I guess it was a learning experience for me.
I have a nested resource hotel_user and i wish to have
hotel_users_controller under hotel namespace.
I want to use restful authentication here and I want
hotel_users_controller, sessions_controller in hotel directory like
hotel/hotel_users_controller and hotel/sessions_controller. I tried with
th
the remote_function is still alive . I finally ended using it,
and it works
but the Rails 3 doc is not yet very clear about all this remote
stuff
On 18 août, 12:13, shahroon ali wrote:
> Well, why not try observe_field? like this i did
>
> <%= check_box :campaign, :use_global, {}, 1,0 %>
Hello Thani,
I tried that, but no luck. The edit link that goes with delete link
works fine. It is shown below:
= link_to 'Edit', :controller => controller_name, :action => 'edit', :id
=> rec.id
Corresponding routes.rb file snippet is shown below:
...
resources :clients do
member do
Rail3 Arel finders are just great, but you can't find a lot of example
on how powerful they really are.
I made a discovery, just experimenting with some chaining.
List say you have
Foo has may Bars
@foo = Foo.find(1)
@bar = @foo.bars
That would give you all the bars related to foo(1)
Bu
Well, why not try observe_field? like this i did
<%= check_box :campaign, :use_global, {}, 1,0 %>
<%= observe_field :campaign_use_global, :url => {:controller =>
"metakeys",:action => 'update_metakeys_flag', :id => parent_id, :type =>
"campaign"}, :with => "'val='+value", :method => :post %>
Than
Hi
I upgraded my rails application rails 2.3.8 from 2.3.5 like below
gem install rails -v=2.3.8
Now in environemnt.rb RAILS_GEM_VERSION changed to '2.3.8'. Now
when I tried to a previous migration like
rake db:migrate VERSION=20100714122104
I got warning like
DEPRECATION WARNING
On 18 August 2010 09:15, Sandip Ransing wrote:
Please don't top post, it makes it difficult to follow the thread.
> Franz,
> what you said i was doing this but it's not good performance wise as it
> fires 2 queries also
> purpose of pagination will be for toss bcoz it will load objects and then
The rails.js UJS file appears to handle only links/anchors or forms.
I went through a "I want to do this with UJS" about a week ago. While
I got it to work, I am not sure what I accomplished since I was not
doing AJAX - I just wanted to replace a non-working client-side
Javascript validation routi
I am trying to test the 'type' attribute' of some elements in my
page , but I don't get it right,
writing the following code in my .rj.rjs file
page.select('#user-list input').each do |e|
t = e.readAttribute('type')
page.alert(t)
end
just displays :
[object HTMLInputElement]
I'm wrong , su
Thanks Greg
I've already look at it.
My issue was related to the remote_function which seems to be still
available...
All that stuff in Rails 3 is not yet so clear for me...
I am using this on a checkbox tag, not on a tag (which is
well documented in the doc)
= check_box_tag("selection", "1",
1 - 100 of 108 matches
Mail list logo