similar to: Current date/time - how to store with comments?

Displaying 20 results from an estimated 7000 matches similar to: "Current date/time - how to store with comments?"

2006 Mar 17
1
RSS problem when trying to display ID - HELP
I want to append "#comment-1" or whatever, depending on the id to the end of my xml.link(" ... /#comment-1") attribute in my generated xml. Well, when I put: xml.link(" ... /#comment-" + comment.id) I get an Application error (rails) message when I look at the generated XML. This is what I''m doing without the id on the comments (its working fine):
2006 Mar 04
1
Saving current date/time upon comment submission - help!
I''m having trouble storing the date/time with my comments - I''m getting the MySQL error "posted_at is null". How do I setup my code to automatically store the current date/time in the ''posted_at'' column of my ''comments'' table? -- Posted via http://www.ruby-forum.com/.
2006 Mar 04
4
How to redirect_to the same page after comment posting?
How can I have the page redirect_to the same page after someone posts a comment? I know that you can do "redirect_to :action => ''index''", but the page is located at this URL: /posts/2006/02/01/individual_post/ So, the action is "individual" which is in the "posts" controller, but there is a custom URL mapped for the URL shown above. How can
2006 Mar 09
1
RSS testing on localhost?
If I were to figure out how to develop an RSS feed for my blog, I should be able to test that locally right? If I go to http://mydomain.com/posts/feed/, what should I see? The XML output? Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Jul 21
3
Interface with Flickr
Does anyone know how to get going with the flickr api WITHOUT using the ''flickr.rb'' gem? I''m wanting to just use the REXML and ''net/http'' stuff. I''m just wondering how to send requests to the api and handle the response. Any tips would be great! Thanks! -- Posted via http://www.ruby-forum.com/.
2006 Mar 05
2
Sending an email when a comment is posted
When a user posts a comment on my site, is there a way for me to be notified via email? I know this is pretty easy in php, i.e. mail() function, but I''m looking for the equivalent in Rails. Thanks! -- Posted via http://www.ruby-forum.com/.
2006 May 08
4
<%= text_field %> - how to set the value to session name?
I''m trying to automatically fill a "posted_by" text by with whoever is logged into the session. How do you set the value attribute using "<%= text_field ... %>"??? I''ve tried: <%= text_field ''post'', ''posted_by'', ''value'' => User.find(session[:user_id]).name.capitalize) %> But I get
2006 Mar 14
5
Dreamhost Database problems
I''m working on uploading my site to dreamhost. I just setup my production database, and gave it a host name. It said that it was successfully created. Now, it''s been like 25 minutes, and I still can''t connect to it. Is that normal? How can I get my tables created? Just wait it out? I''m trying to load it in the browser, and it says "server not
2006 Mar 29
7
Dreamhost upgraded 1.1 - app doesn''t work
Does anyone know how long it will be until Dreamhost get''s the Rails 1.1 install running correctly? My site has been down since last night at about 7:00 pm (I think). It''s annoying, and are a lot of others having this problem too? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Mar 05
2
RSS feed for blog entries...
Can someone guide me on the process of providing an RSS feed for my site? I''m not sure how to go about this. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Mar 14
7
Application error (Rails)
After I attempted to add ActionMailer functionality, it gave the "Application error (Rails)" and now, everything on my site works, except for the part where the Actionmailer ''would have'' sent the email. I took that out now, re-uploaded the file, and ran "killall -USR1 dispatch.fcgi" and still nothing. Everything else works, except that. Any idea what
2006 Mar 17
2
Security issue dealing with comment posting - anyone?
This is how I''m posting comments currently. This works, but I read somewhere that I shouldn''t inject params right into my sql query, because it makes it easy for people to hack in and ruin the db. I''m not sure if this even makes sense, but I''ve tried other things, and can''t get anything else to work. #currently def comments content =
2006 Mar 13
2
Dreamhost uploading
I haven''t had a chance to upload my app and configure dreamhost, but I did log in and create the folder using the "rails app_name" command. Now, my question is, I read online to do this: > cd domain.com > rails my_app_name So, I did just that. Rails will know what to do even though my application is in a sub-directory under "domain.com"? Essentially,
2006 Mar 17
1
How to handle errors - HELP
I''m having trouble with my Ajax comments, but only when someone clicks the submit button when there''s no comment. How can I handle this in my code? Do I use "rescue nil" or something? Here''s my controller: def comments content = Content.find(params[:id]) @comment = Comment.new(params[:comment]) content.comments << @comment
2006 Aug 15
4
Cookies and Ruby???
When someone comments on my site, I would like to store the user''s name as a cookie, and display it the next time they return. I really don''t know how to do this. Does this use the cgi library? As most things with ruby, I would imagine it to be quite simple... could anyone post a code snippet as to how this would work??? Thanks... -- Posted via
2006 Jul 19
3
Trouble with links in the layout - Help
I''m trying to get my del.icio.us links to appear in the layout, so it''s throughout the entire application. I have the interface to the API working, I just don''t know where to put the code (in what controller?) and layout to be application wide. I tried putting the code in "application.rb" and then the view stuff in "application.rhtml" but that
2011 Jul 30
2
Get the current user as Json with Devise
Hi! I use Devise and Basic HTTP Authentication to access user areas from a mobile app. When the user enters its details in the app and it tries to "login" (you don''t actually login with basic auth as you send the credentials with each request) I want to get a response back with the user info, like user ID, email (not password) etc. - So, is there a way to do this out of
2011 Oct 11
10
Create Two objects at the same time
I have user model and referral model. Referral model has user_id as field. Now when a new user is created, I need to call referral#create as well and pass it the id of the newly generated user to user_id of referral model. How can I do that. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2010 May 11
1
has_one/belongs_to -- accessing the subordinate
With a has_one/belongs_to relationship, what''s the best way to guarantee that the belongs_to object gets created and is accessible alongside the has_one object? I *think* the after_create callback is a good choice, but I discovered an oddity while trying it. F''rinstance, if every horse has a carriage: ============ ActiveRecord::Schema.define do create_table(:horses) {|t|
2011 Apr 27
2
Can not create model instance via params on specific model but can on others....
Anyone have an idea on this? Got a weird situation where on a specific model I can not create an instance using params, yet it works fine on other models. The model which does not work is a stock model, there is no logic in it. Ruby 1.8.7/Rails 3.0.5. Does not work: (rdb:1) PaymentTransaction.create(:purchase_id => 3) #<PaymentTransaction id: 2, purchase_id: nil, action: nil, amount: nil,