similar to: assign local variable instead of instance variable.

Displaying 20 results from an estimated 200 matches similar to: "assign local variable instead of instance variable."

2006 Apr 02
1
One to Many Relationship Issues
Hi, I am having issues with a one to many relationship(it never works :-)). Jokes aside, I am getting an error: Mysql::Error: #23000Cannot add or update a child row: a foreign key constraint fails: INSERT INTO adverts (`image_url`, `price`, `title`, `website_url`, `description`, `user_id`) VALUES(''bb'', 22.0, ''aa'',
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}%"}
2006 Apr 02
5
Showing current user''s information and saving
Hi, I am logging users in and keeping them in session. The problem I am having is showing only a certain logged in user''s information. In the Adverts_Controler: def show @advert = Advert.find(params[:id]) end I am also having issues with saving an advert for an user: def create @advert = Advert.new(params[:advert]) if @advert.save flash[:notice] = ''Advert
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views": <input type="button" onClick="newAlt()" value=" + "></nobr> The JavaScript for "newAlt()" is: // using DOM create new input box for alternate part function newAlt() { var html = "<input style=''background-color:#FFFFCC'' "; html +=
2008 Dec 21
1
flash fails to work on Los Angeles Times website - fix
Hello, I have a 32-bit install of C5.2 on my Intel Centrino Laptop (2005). The Adobe flash plugin works fine in Firefox in all cases except on the Los Angeles Times website http://www.latimes.com. I was baffled by this for a few months, since it works on another 32-bit C5.2 box. When I realized that the only real difference was that the laptop had no LAMP install, and both had the same elaborate
2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person who complained of problems specific to IE, but that''s what I''ve got. My environment is: Rails 1.0 + RJS Plugin Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support) Monkeypatched in_place_editor to support evalScripts I have just started using RJS, and I have two .rjs templates.
2010 Aug 01
1
authlogic and controlling the resources users can access
question re authlogic, all set up but now i''d ike to control access to a resource so only users who own that resource can control it, I figure I put this in the Advert controller - is this approach sound ? http://pastie.org/1069488 I also specify that an admin (just a boolean controlled user) can edit everything... is it good ? User, has many Adverts and Advert belongs to a User Just
2010 Dec 09
2
Skip validation on nested attribute
Hi, I have a two models, advert and address. An advert has one address. On my advert form I have a nested form of the address. But I only want to create the nested address depending on the adver kind. how can I skip the nested attribute validation? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Aug 12
2
Ferret Issues
Hi, I have installed the ferret gem (on WIN XP). My search and result view is working, but it comes back with empty results all the time. It seems like ferret is building the index (there is 3 binary files in the index directory). If I add the line: acts_as_ferret :fields =>
2012 Aug 09
3
Pop quiz: Where do you watch for job postings?
Hi all, I''m looking for some advice on where we should be putting an advert if we are looking to hire a full time rails developer? Or turning it around what websites (or mailing lists) do folks here use to if they feel the need for a change in view from their desk? A few details to narrow down scope since it might affect the advice, apologies in advance, trying to NOT make this an
2009 Aug 21
12
What to do before launching v1.0?
I’m launching a rails website, the app is written and works, undoubtedly it’ll be an unmitigated disaster when I launch but none the less I thought I’d least attempt to give myself the best chance of success by asking all the gurus here for some advice – pre launch advice if you like. In an ideal world I’d spend days and hours on all of these things and get it absolutely spot on, but as we all
2009 Mar 01
15
Ajax in Rails
Hi All, New to the group, and new to learning rails. I''m having some trouble, i''ve done a few tutorials on creating some small apps with rails and am now starting to play around myself. I''ve been trying to create a simple form which when a user enters any data that data is displayed as a preview elsewhere on the page instantly, just like when creating an advert with
2009 Jul 16
1
Statistics Data Manager in Novartis Spain - Barcelona
Dear All, I have been asked to forward to you this job advert. The advert is in Spanish as the role require knowledge of Spanish. If interested please contact Jimena at jimena.aldasoro-ext at novartis.com. Regards, Marco ######################################################################### - Puesto: Data Manager Estad?stico Marketing - N?mero de plazas: 1 - Tipo de contrato: Temporal
2006 Aug 12
4
Ferret Wierdness
Hi, I have installed the ferret gem (on WIN XP). My search and result view is working, but it comes back with empty results all the time. It seems like ferret is building the index (there is 3 binary files in the index directory). If I add the line: acts_as_ferret :fields => [''title'',''description'',''price'',''website_url'']
2010 May 12
1
Control what messages go into /var/spool/mail/root
Hi, I found some info messages below in /var/spool/mail/root. To reduce the size of that file, I'm wondering if there's a way to prevent those unimportant messages from entering /var/spool/mail/root. Thanks. 2010-05-10T10:32:27-05:00 <authpriv.info> se1 su: pam_unix(su-l:session): session closed for user root 2010-05-10T10:01:28-05:00 <local1.info> se1 Keepalived_vrrp:
2008 Nov 02
2
what if...
... Microsoft funded the wine project? it is within their interests as far as I can see, given that they are trying to sell their programs (office, development tools, licences, etc) to every user available? Mac OS, linux, who know what next.... If you cant beat them (them as in Linux) , join them ..! Imagine the next Office generation advert: Office, the most supported multi-platform suite. Take
2003 Nov 04
1
very odd behavior for concurrent file access in Samba3.0.0 with MS Word
Hello, I just installed Samba 3.0.0 on RH9 and began testing the concurrent file access behavior. Leaving all locks/oplocks by default, there is no way of preventing a second MSWord user from opening an already open file with no warning message (in a MS network the message would normally be " ..test.doc is already open by ...Do you want to make a copy?")!! No such thing with Samba,
2006 Jul 02
5
Pretty URLs -> Routes
Hi I am having issues with getting my pretty urls to work. routes.rb: map.connect '':user'' , :controller => ''front'' , :action => ''list'' , :filter => ''user'' front_controller.rb: def list @advert_pages, @adverts = paginate :adverts, :per_page => 10 @user =
2010 Feb 25
1
SambaXP conference in Göttingen, Germany (May 3rd - 7th, 2010)
Hi all, SambaXP is coming up in G?ttingen, Germany (May 3rd - 7th, 2010). http://sambaxp.org/ I know the economy sucks, and travel budgets are really hard to find, but if you're a Samba OEM, vendor or serious user you really should be there :-). Hack with the developers ! The SambaXP hack room is full of people solving problems with the same code you ship to customers. Benefit from intense
2010 Feb 25
1
SambaXP conference in Göttingen, Germany (May 3rd - 7th, 2010)
Hi all, SambaXP is coming up in G?ttingen, Germany (May 3rd - 7th, 2010). http://sambaxp.org/ I know the economy sucks, and travel budgets are really hard to find, but if you're a Samba OEM, vendor or serious user you really should be there :-). Hack with the developers ! The SambaXP hack room is full of people solving problems with the same code you ship to customers. Benefit from intense