similar to: Rails form error message oddness...

Displaying 20 results from an estimated 300 matches similar to: "Rails form error message oddness..."

2006 Jun 08
9
find :order =>
Hi, I have the following find statment @client_pages, @clients = paginate :clients, :per_page => 20, :order => "organisation_id, surname" currently im ordering by organisation_id however I need to order by the field in the organisation table organisations.name how can this be done? Thanks Scott -- Posted via http://www.ruby-forum.com/.
2005 Dec 22
0
conditions on model
hey, this is the situation, an user may only access x clients (ex , 1, 5 ,6 ,7), so i make a string with those ids and paste it to the sql statement, the user is from the session #creating a list of all the client record ids the user may access and paste it in the sql statement if user.has_permission(''admin'') || user.view_all == 1 text = "" else text =
2006 Aug 02
3
find_by_column_name and for loop returns undef method `each''
I''m trying to understand how to select only certain rows in my database using RoR. As a test I try to find certain clients by adding this code in my list view... <% clientlist = Client.find_by_client_status_id(1) %> <% if clientlist %> <= This prevents me from getting nil errors. <% for client in clientlist %> <= This seems to try and call
2006 Apr 13
3
Why won''t this work - simple helper text ??
Trying to print this out and it fails, def cancel_toggle(element) ''<a href="#" onclick="new Effect.toggle("'' + element + ''","blind", {duration: 0.4}); return false;" >Add a New Client</a>'' end When called in my view like this: <%= cancel_toggle "newClient" %> It gets written to the browser
2003 Jul 02
0
Winpopup message to all user on a PDC
> > Il 01/07/2003, alle ore 14:19, Roberto Samarone Araujo (RSA) ha scritto: > > > It it possible to send messages to all users logged in a PDC at same > > time ? > > I didn't find a ready-to-use program, so I use something like this > inside an executable script: > > for i in $(cat /path/clientlist.txt) > do > echo message_text |
2009 Jan 23
4
getValue() in a Controller problem, help please.
Hello there, I''m trying to do something like: render :update do |page| page[:client_list].replace_html render(:partial => ''client_list'', :object => @clients_list) name = page[:name].getValue(); end but I''m not getting the value, or somehow use $("name").getValue() inside of the controller. How can I do that? tks, David Sousa --
2003 Jul 01
0
Re: Winpopup message to all user on a PDC
Ok that is pretty much what I do.. Except.. Most of my net sends don't end up working.. They fail unless I explicitly do a nmblookup and specify the broadcast to find that computer.. Seeing how im dealing with the entire contents of 10.x.x.x around 20,000 computers that I may have to contact for some reason.. Its easy for me to know there netbios name.. As its there login name.. However
2006 May 23
1
Re: Wierd pagination problem - Unknown options:
> Unfortunately I still get the same error. Here is my code now (the > commented line works): > > def list > @upload_pages, @uploads = paginate(:uploads, :per_page => > 20, :order > => ''id'') > # @upload_pages, @uploads = paginate(:uploads, :per_page => 20) > end You may have an older version, try using the order_by clause
2006 Mar 31
2
Silly question
Hi there, I know this is be a very minor issue, but considering @users = User.find :all, :order => ''name'' _AND_ @user_pages, @users = paginate :user, :order_by => ''name'' by simplicity, shouldn''t the symbols :order and :order_by be the same or both to both cases ? I stumbled on them a couple of times yet :) Thanks, Andre --
2006 Aug 07
4
Problem with Pagination
Hi Guys, I am trying to paginate the results from a search. When I use actual constants in the search conditions, it works fine: def query @k2_result_pages, @k2_results = paginate (:k2_results, :conditions => [''e_date >= ? AND e_date <= ?'', ''2006-07-12'', ''2006-08-12''],
2014 Jun 05
1
Icecast Release 2.4.0 Webm /Opus Support
Hello its me again :-P hope its appropriate to ask every 2 years if there is a simple method to stream a " live" Video stream via icecast2. I tryed rtmpd.com with Adobe Livemedia encoder with jplayer embeding into webpage and it worked fine, but my goal is to use icecast. From what i understand VCL or ffmpeg is the common method to stream video to a icecast2 server are there any
2007 Sep 13
2
Failing to raise an exception in a stub
I''ve come across rather strange behaviour when trying to raise an exception in a stubbed method. I''m speccing the behaviour of a Rails create action, where I''m using save! to catch failed saves. In the case of working save, I''m using the following stub: @client.stub!(:save!).and_return(true) which works fine. However, in the negative case,
2006 May 27
0
Typo 1055 created_at Vs. published_at
[Couldn''t post this to the Typo forum, hope it''s Ok here :-)] Before I go off and create a Typo ticket, I''d like to know if anyone else is experiencing this and what there thoughts might be on the subject? In Typo 1055, if you use the admin interface and change the published date for an article, you will get "post not found", when you click on the article
2006 Jun 14
4
Using now() to determine what should be displayed
I''m trying to create a paginated list that will take note of the "end_date" field in my table. This is what I have: @post_pages, @posts = paginate(:posts, :per_page => 10, :order_by => ''end_date'') in the controller. And for the view: <h1>Posts ending soon</h1> <ul><% for post in @posts do %> <strong>Post Title:
2006 Feb 08
7
DRY methodology
because I am a grasshopper... Now that I can sort my ''list''...is there a logical way of not repeating myself to having essentially the same list view with multiple sorts? i.e. def list_cl # ordered by clients last name @placement_pages, @placements = paginate( :placements, :include => [:client], :order_by =>
2006 May 14
4
searching on foreing keys
Hey all, I''m using a simple search function. It''s working great except for foreign keys. I have one table pets (id,name,owner_id) and another table people(id,name) owner_id being a foreign key of pet pointing to people name. here it is on the pet controller: @paginator, @pets= paginate(:pets, :conditions =>["name OR owner_id like
2006 Aug 02
3
newbie question, adding conditions to collection of sql objs
I have: @pictures=@c.pictures How do I add limit and order_by conditions. I have tried the following: @c.pictures.find_all(:limit=>5) @c.pictures, :limit=>5 @c.pictures :limit=>5 None of these work. -- Posted via http://www.ruby-forum.com/.
2005 Dec 31
3
Sort or Order a <Select> box.
Evening folks, I''m new to RoR, and have found some very useful info on this site, thanks. I have a select box that I need to sort. <select name="people[peoplekind_id]"> <% @peoplekinds.each do |peoplekind| %> <option value="<%= peoplekind.id %>" <%= '' selected'' if peoplekind.id == @people.peoplekind_id %>> <%=
2005 Mar 07
0
an escape from using find_all
Hi, I''ve got a form where I change and update the @cost values, I wanted to see a select tag showing all the clients names instead of inserting manually the code in the textbox... to do so I''ve used options_from_collection_for_select on another var @client (setted to find_all on the controller calling this viewer). <select name="client">
2006 Apr 26
2
two layers of has_many
Hi, There are many companies. Each company has many departments. Each department has many employees. The following find_by_sql method seems awful. What is the best way to get all the employees of a company? class Company < ActiveRecord::Base has_many :departments def employees Employee.find_by_sql("SELECT employees.* FROM companies, departments, employees