search for: is_act

Displaying 13 results from an estimated 13 matches for "is_act".

Did you mean: is_fact
2008 Mar 07
3
Boolean circles..
...ironment (Rails 2.0.2) >> c = Club.find(1) => #<Club id: 1, club_name: "Ume\214 Kuniba kai", logo: nil, currently_active: 1, created_at: "2008-03-07 12:52:35", updated_at: "2008-03-07 12:52:35"> >> m = c.members.find(:first, :conditions => "is_active = 1") => nil >> m = c.members.find(:first, :conditions => "is_active = true") ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: true: SELECT * FROM members WHERE (members.club_id = 1 AND (is_active = true)) LIMIT 1 from /Library/Ruby/Gems/1.8/g...
2006 Mar 01
6
How to retrieve attributes from HABTM?
We have tables Users and Communities linked by has_an_belongs_to_many. The join table Communities_Users has additional fields [ is_active, is_blocked, join_date] etc. These are populated using @user.push_with_attributes(:is_active => true,...). Later on how do we update or retrieve the attributes in the link table for a given user or a community with doing it explicitly using SQL? Thanks, Yash -- Posted via http://www.rub...
2007 May 11
3
is_active?
Hey all, i''m rather new to rails and was curious if ActiveRecord implemented anything like is_active where the delete functions would just mark records as inactive, vs deleting rows. (similar to created_at, etc). I need a history of transactions, and this is how I would code in other languages. Any advice? Is there are smarter way to implement this? Thanks in advance! -- Posted via http://ww...
2006 Aug 10
1
Convert datetime_select to Time object?
...:active_at(1i)] params[:product][:active_at(2i)] params[:product][:active_at(3i)] params[:product][:active_at(4i)] params[:product][:active_at(5i)] How do I convert this into a Time object? -------------------------- Question 2 -------------------------- What if I have another field called "is_active" and its just a boolean. If it''s set to false then active_at gets set to nil. Is there any easier way than just: if params[:client][:is_active] == "1" (1..5).each {|num| params[:product].delete("active_at(#{num}i)")} params[:product][:active_at] = nil end...
2006 Mar 21
8
How to avoid multiple submits/posts?
Hello, How do I prevent previously submitted form data from being reinserted into the database when the user presses the browser''s Refresh button? On Aughey''s advice in #irc I tried using `redirect_to'' a new `:action'' but this approach doesn''t seems to work. Any idea what might be wrong or how to tackle this problem? Thanks for your help. P.S.- I
2006 Jun 17
8
Application Design
Hey, I have a system that I am trying to design, it contains news articles, events, etc... There is model representing articles, one representing events, etc... Articles or events can be active or inactive, so I can do a query to return all active articles, all articles or all inactive articles. The question that I have is what would be the best way to design this. Right now I have each
2015 Oct 05
1
Dovecot don't erase mails from storage.
...d, CONCAT('*:bytes=', CAST(m.quota AS CHAR)) AS userdb_quota_rule, CONCAT(m.local_part, '@', d.name) AS user, m.password AS password FROM mailboxes AS m LEFT JOIN domains AS d ON m.domain_id = d.id WHERE m.local_part = 'carla.franjoso' AND d.name = 'xxxxxxx.xx' AND m.is_active AND d.is_active Oct 02 17:50:38 auth: Debug: client out: OK 1 user=carla.franjoso at xxxxxx.xx Oct 02 17:50:38 auth: Debug: master in: REQUEST 3537633281 11621 1 41ef179d4a37a603ce38c43fab768f78 Oct 02 17:50:38 auth: Debug: prefetch(carla.franjoso at xxxxxx.xx,xxx.xxx.xxx....
2006 Jan 16
0
belongs_to with has_and_belongs_to_many
...; ''Member'', :foreign_key => ''created_by'' has_and_belongs_to_many :members, :join_table => ''projects__members'' end And the DDL: create table members ( member_id serial primary key , email_address text not null unique , is_active boolean not null default true , is_admin boolean not null default false , can_produce boolean not null default false ); create table projects ( project_id serial primary key , project_name text not null unique , created_by integer not null references members (m...
2009 Jun 20
0
AssociationTypeMismatch
..._form.label :parent %><br /> <%= modul_form.text_field :parent %> </p> <% end %> <p> <%= chapter_form.label :chapter_type %><br /> <%= #@decodes = Decode.find(:all, :conditions => {:name => "Chapter_Type", :is_active => 1 }) @decodes = Decode.all(:conditions => {:name => "Chapter_Type", :is_active => 1 }) chapter_form.collection_select :chapter_type, @decodes, :internal_value, :display_value, :prompt => ''Select module type'' %> </p> <p> &lt...
2008 Jul 19
0
undefined method `table_name'
...ave worked. Hope someone can help. The code... MODELS: class Delivery < ActiveRecord::Base belongs_to :vehicle end class Vehicle < ActiveRecord::Base has_many :deliveries def self.find_all_active Vehicle.find(:all, :order => ''name'', :conditions => [''is_active = ?'', true]) end end CONTROLLER: @vehicles = Vehicle.find_all_active VIEW: <%= vehicle.deliveries.length %> The error... undefined method `table_name'' for Delivery:Class Notes... The problem seems to be the class method find_all_active. I tested the equivalent ca...
2007 Apr 30
0
[996] branches/wxruby2/wxwidgets_282: TopLevelWindow: add some 2.8 methods; document; add missing CentreOnScreen
...eticons </span><span class="cx"> * "TopLevelWindow#get_title":#TopLevelWindow_gettitle </span><ins>+* "TopLevelWindow#handle_setting_change":#TopLevelWindow_handlesettingchange </ins><span class="cx"> * "TopLevelWindow#is_active":#TopLevelWindow_isactive </span><ins>+* "TopLevelWindow#is_always_maximized":#TopLevelWindow_isalwaysmaximized </ins><span class="cx"> * "TopLevelWindow#iconize":#TopLevelWindow_iconize </span><span class="cx"> * &...
2008 Mar 07
2
Trouble using RESTful helper
...: <td><%= button_to "Deactivate", member_path(member.club, member), :method => :delete %></td> 43: The index action of the controller is just: def index @club = Club.find(params[:club_id]) @members = @club.members.find(:all, :conditions => ["is_active = ?",true]) @term = get_term respond_to do |format| format.html # index.html.erb format.xml { render :xml => @members } end end I can use the same code from the console ok, so the models should be connected properly: >> m = Member.find(:first) => #&...
2007 Mar 29
1
How to restart server programmatically?
I need to be able to restart my server based on a specific database change. I''ve been trying a call to system("script/process/reaper -a graceful -d dispatch.fcgi") but that raises a transaction error which rolls back the save. I wasn''t aware that after_save would rollback. That''s potentially useful but pretty much not right now. Here''s my code: def