search for: some_vari

Displaying 10 results from an estimated 10 matches for "some_vari".

Did you mean: some_var
2005 Nov 18
2
help with User.find() and rendering text
...isplayed. On line 3: (If this command works the way I think it works, the sad part is I always get it wrong) anyways, The entry in the data base with the given user name gets searched and the user info gets stored in the variable @user. On line 4: Now how do i print it out? Is it a variable. 1. @some_variable = @params[:user_name] 2. render_text @some_variable.to_s 3. @user = User.find(:all, :conditions => [ "user_name = ?", ''@some_variable'']) 4. render_text @user.to_s I''m very sorry for this long and anoying post. I''m new to this and really need...
2006 Jul 10
3
how to access a model from application.rb
Hi All How do I access a model from within the application.rb? What im tying to do is pull some data from a model (news in this case) that must be displayed on each page within the entire application. I know I could drop this into each controller, have each view pull it from the controller, but thats repeating myself... So whats the best way to do this (as I dont think models are visible
2005 Dec 19
6
custom find methods and pagination
i''ve got several methods in my models i use to find based on certain criteria...i''ve done this so the controller code is less cluttered, plus the DRY factor. example: class Foo < ActiveRecord::Base def find_by_something(something) find :all, :joins => ..., :conditions => ... end def find_by_something_else(something_else) find :all, :joins => ...,
2007 Sep 13
3
Templates and undefined variables
Using puppet 0.23.2, I have a template where I wish to do something like this: <% if defined? some_variable %> .... <% end %> Ideally I''d like to tell these three cases apart: a) defined to a non-empty value b) defined to an empty value c) undefined However case c) causes problems - in templatewrapper.rb::method_missing it causes an error to be thrown. I''ve changed my cop...
2006 Mar 13
7
Wilcard search
Hello, I''m writing a search function for my application, but I am unsure on how to search for all results that contain my search string; here''s what I''ve got: def search @products = Product.find(:all, :conditions => "date_available < now()", :conditions => [ "title ilike ?",
2006 Mar 18
3
paginate a collection
hi i want to paginate a collection found by complex sql query how can i do thanks -- Posted via http://www.ruby-forum.com/.
2010 Feb 17
1
Checking the assumptions for a proper GLM model
Hello, Are there any packages/functions available for testing the assumptions underlying assumptions for a good GLM model? Like linktest in STATA and smilar. If not, could somebody please describe their work process when they check the validity of a logit/probit model? Regards, Jay
2006 Feb 03
4
contoller code mysteries
In my controller...this code works def list2 first_name = params[:client][:first_name] @myclients = Client.find(:all, :conditions => ["first_name = :first_name", {:first_name => first_name}]) end this code doesn''t... def list2 first_name = params[:client][:first_name] if first_name searchstring = ''["first_name =
2006 Apr 09
7
Simple Search
I''m trying to implement a search system and I''m lost as to how to go about it. I''m searching the model "category", and I''m searching the "name" field. >From there I''ll use @categories.listings to display. But that''s the easy part. I assume I need to use a LIKE command in MySQL, but I don''t know how to do
2010 Sep 03
1
TinycoreLinux Install
...or MS-compatible name lister (nm) configure:4899: result: /usr/local/bin/nm -B configure:5029: checking the name lister (/usr/local/bin/nm -B) interface configure:5036: gcc -c -g -O2 conftest.c >&5 configure:5039: /usr/local/bin/nm -B "conftest.o" configure:5042: output 00000000 B some_variable configure:5049: result: BSD nm configure:5052: checking whether ln -s works configure:5056: result: yes configure:5064: checking the maximum length of command line arguments configure:5189: result: 512 configure:5206: checking whether the shell understands some XSI constructs configure:5216: re...