similar to: Howto change @article.article.headline to @article.headline ?

Displaying 20 results from an estimated 1000 matches similar to: "Howto change @article.article.headline to @article.headline ?"

2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have article_groups as a jointable. Now I want to select every article who is a member of group with id ''1'' and id ''2''. Whats best way to get that? Extract from schemas: CREATE TABLE articles ( id int auto_increment, ingress text NOT NULL, story_text longtext, constraint fk_items_users
2006 Sep 25
2
@article.article_groups.delete_if... Dosn't work!
If I try: @article.article_groups.delete_if {|x| x.group_id == x.group_id } It does nothing. If I try: articletmp.article_groups.each{ |x| @article.article_groups.delete(y) } It deletes some of the groups. @article.article_groups.clear works. Why dosn''t the to first examples work as expected?? Do I have to put groups I don''t want to
2011 Jun 15
1
doveadm who: Please Headline to STDout, not to STDERR
hi, I've created a small script to get a sum from the users and sessions (table username and table "#"), but it is annoying that the headline "username # proto (pids) (ips)" goes to STDERR, but the normal output to STDOUT. It would be nice, if both goes to the same STD :-) cu denny -------------- next part -------------- A non-text attachment was scrubbed... Name:
2014 Mar 20
2
[Bug 2215] New: Key fingerprint headline slightly broken with ED25519
https://bugzilla.mindrot.org/show_bug.cgi?id=2215 Bug ID: 2215 Summary: Key fingerprint headline slightly broken with ED25519 Product: Portable OpenSSH Version: 6.5p1 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 Component: ssh Assignee: unassigned-bugs at
2011 Jul 11
1
Finding Confidence Intervals
This is a very basic question, so please bear with me. I've been learning about AB Testing, which is largely used in internet marketing to examine the effectiveness of certain aspects of ads, websites, etc. Here's a couple links to people who want to know more about AB Testing:
2005 Dec 19
3
created_on, created_at defaulting to 2000/01/01 00:00:00
Hello all, Rails 1.0.0 created_on is being set to 2000/01/01 00:00:00 Any ideas on this ? Thanks! Schema is create table user_login_history ( id int identity(1,1) not null, user_id int not null, created_on datetime default(getdate()) not null, created_at datetime default(getdate()) not null, updated_on datetime default(getdate()) not null, constraint pk_user_login_history primary key clustered
2006 Mar 23
1
YAML inconsistencies...
I figured I''d post here before submitting a ticket, but I''m seeing some confusing stuff when dealing with YAML now. I was using it to freeze objects in my database, and so i had some data already around to mess with. I upgraded both Ruby (1.8.3 -> 1.8.4) and Rails ( -> 1.1RC1) and this junk started. I''ve outlined the problem in two pastes, which I''ll
2006 Mar 31
2
A.R. Associations problem
Hello, I''m learning A.R Associations by creating a simple forum that consists of 3 tables: ahuthors, topics and posts. This is the schema: class AddAuthorAndTopicAndPostTables < ActiveRecord::Migration def self.up create_table :authors do |t| t.column :username, :string t.column :email, :string t.column :created_on, :datetime end create_table
2007 Aug 14
1
find_by_sql vs connection.select_all
I was trying to do SUM based mySQL query simliar to the following: SELECT SUM(updated_on - created_on) AS total from signups If I were to run this command in the mySQL console I would get a result. However, if I were to run it using the following command in Rails: Signup.find_by_sql("SELECT SUM(updated_on - created_on) AS total from signups") The query that is written to the log is:
2006 May 24
1
AR many-many join tables - can they have created_on, updated_on ?
Hello all, I''m creating a many-many join table between ''homes'' and ''users''. Can it contain created_on? will AR update created_on, updated_on on this table? CREATE homes_users ( home_id int not null, user_id int not null, created_on datetime null, updated_on datetime null ) Thanks for your advice! -- ------------------------------ Apple MacBook.
2007 Jul 05
1
how to search date with ferret and acts_as_ferret?
Hey all, How can I search date with ferret? Do I need to submit them in a special format? Right now I have in my Item model: acts_as_ferret :fields => [:created_on] with eg created_on = Thu May 11 17:00:00 -0500 2006 now when I do Item.find_by_content("created_on:<#{Time.now}") I get nil, I''m probably doing something wrong. Any idea how to fix it? thanx in advance
2006 Apr 20
5
Noobie problems with helper
I have the following helper method in application_helper.rb: def format_date(date) day = to_s(date.day) month = to_s(date.month) time = to_s(date.time) date = day + "/" + month + " - " + time return date end I am trying to call this method in a view like this: <%= format_date(bounty.created_on) %> create_on is a timestamp in mysql. I am
2006 Jul 26
4
can you pass data when you render :action
how can i do: render :action => "headline", :id => @user.id Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
4
"Selecting" a calculated row / Using :select in the paginate method
Hi, I was trying to use the :select parameter to select a calculated row, but it appears that the parameter is not picked up by the paginate method. I want to add the following to the select statement: timediff(now(), created_on) as age So I tried: @story_pages, @stories = paginate :stories, {:per_page => 10, :include => ''user'', :select =>
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2006 May 18
2
How to debug the rendering in Rails?
Hi, I have some controller code like this: def mailing_lists @ml = MailingList.find_by_identifier(@params[:id]) @messages = @ml.messages @headers["Content-Type"] = "application/atom+xml" @response.headers[''Last-Modified''] = @messages.last.created_on.httpdateunless @ messages.empty? minTime =
2006 Jun 27
6
Custom action on Active Record Validation Failure?
Instead of having it highlight the bad fields when you enter in a record that fails validation, is there a way to make it do an action? I''m looking for something like this: validates_uniqueness_of :user_id,:url => {:controller => "headline", :action => "index"} so that on failing the uniqueness check, it would go to the headline controller. --
2008 Sep 23
3
Finding distinct months using find_by_sql
Hello, I''m wondering if someone might be able to offer me a solution to the following problem that has so far stumped me. I''m trying to get the distinct months (and years) from a date field to display as a list in a view. For example, there might be a number of records stored with dates in the table ''headlines'': name date record1 21-09-2008 record2
2006 May 03
6
ActiveRecord and Lost Connection
This isnt totally a rails question; I am using ActiveRecord for storing some simple values into a database. My problem; I keep gettign MySQL Errors. On the Win32 machine it was off and on. Now on the linux machine (ubuntu) I can'' t connect at all. I have all the password settings correct. My only thought, I am working with Threads and thought that might cause the issue, but I
2007 Jun 06
1
"selected" in form.select
I have a search form in my navbar where a user can select in which area he wants to search. After clicking the submit-button the results get rendered but the previous selected area is no longer selected. <%= form.select (:suchfeld, [ [''Beschreibungen'',''description''], [''Headlines'',''headline'']] ) %> I was able to