Hi,
i'm trying to send confirmation email to the user.
But i get following error:
Net::SMTPAuthenticationError (502 5.5.2 Error: command not recognized
Configuration in production.rb is following:
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.raise_delivery_errors = true
# set delivery metho...
I have migrated frameworks from prototype to jQuery in my Rails apps, and I'm running into a consistent problem which I need some advice on.
Often times I'll use an AJAX function that updates a portion of the page. When this happens, any other Javascript I use that relates to the section of the page that was updated no longer works. ...
I have this link in my code:
link_to "New question", new_question_url(:category_id => @category.id)
I have this code in my new question form:
<p>
<%= f.label :category_id %><br />
<%= f.collection_select :category_id, Category.all, :id, :name %>
</p>
How can I make Rails automatically select the category from the category_id qu...
I'm running into a problem viewing a list of 'category' checkboxes when I try to nest them in a fields_for form.
I have a 'product' model that 'has_many' 'photos' which 'has_and_belongs_to_many' 'categories'. I'm pretty sure all my associations in my models are correct, as is my joins table for the 'photos' and 'categories' relations...
I have a bit of code like so which works fine if the file in question doesn't already exist.
if AWS::S3::S3Object.exists? file_name, bucket.name + path_to_images
puts "file exists (deleting)"
AWS::S3::S3Object.delete file_name, bucket.name + path_to_images, :force => true
end
AWS::S3::S3Object.store file_name,
File.read(file_pa...
In new rails installation the rails application doesn't contain the /public/rails/ folder and you can't see application properties from the default index.html page
...
I have a table, with merge replication on it (SQL Server 2005).
There is a rowguid column. I want RoR to ignore this column, and not insert into this, and not include this when generating the INSERT statement.
...
This works:
Baseline Controller
@search = Baseline.search(params[:search])
@baselines = @search.paginate :page => params[:page], :per_page => params[:per_page]
baseline index view
<% form_for @search do |f| %>
<%= f.text_field :baseline_name_like_or_description_like %>
<%= submit_tag 'Search' %>
<% end %>
Where would I trim t...
[paperclip] identify '-format' '%wx%h' '/tmp/stream,3360,1.jpeg[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError>
[paperclip] identify '-format' '%wx%h' '/tmp/stream,3360,1.jpeg[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paper...
Hi
i have a simple record system in rails, it has customers, appointments and visits as models.
with visits and appointments belonging to customer.
i want a simple authentication plug-in for the owner of the application, to be able to log in and edit and create new data in the system (administrator user) and be able to add new admin ...
EDIT: looking for this: http://diminishing.org/extending-formtastic-with-a-sprinkle-of-jquery (If this works I'll answer my own question)
I've started to create an in and out type habtm (has many and belongs to many) form through formtastic. However I would like it to be more flexible to the user, meaning if you select a name on one si...
What are the main reasons or pros/cons somebody would choose to work in 1.8.6 over 1.8.7 or vice versa?
So far I can only find this answer, which is from the latest version of the Agile Rails beta e-book:
"Rails 3.0 requires requires Ruby version 1.8.7 or Ruby 1.9.2-preview3. (It is known not to work on Ruby versions 1.8.6, Ruby 1.9.1...
I want a search field to start outputting results once a user starts typing.
This is my view:
<%= observe_field 'keyword',
:url => { :action=> 'search_results' },
:frequency => 0.5,
:update => 'results',
:loading => "$('.spinner').show()",
:complete => visual_effect(:slide_down, "results", :d...
sorry, if my english so bad..
i created a simple auction app with RoR. in my app, if i create a new auction, i want my facebook status update with the new auction that i have created. how to do that?
nb: this is not facebook app.
what should be required? oauth? help me please
...
I have the following create action:
def create
@order = Order.new(params[:order])
if params[:same_as_above] == "1"
@order.billing_address.name = @order.shipping_address.name
@order.billing_address.number = @order.shipping_address.number
@order.billing_address.street = @order.shipping_address.town
end
...
... due to server-side rules.
Specifically, I have comments that nest, and I am forbidding the deletion of comments with children.
So when someone requests:
DELETE /comments/5
where the 5th comment has children, I do not allow the comment to be deleted. What is the appropriate HTTP status code? I use a 405 elsewhere on the site, but...
Hi,
I have a model, Foo, that has_many Bars. It has a virtual attribute, current_baz, that returns the baz attribute of the latest Bar from the association (if one exists). I'd like to define Foo.current_baz= so that one can say my_foo.update_attributes(:current_baz => 7), and in particular, I'd like it to work when a new Foo is created...
There is an action in the admin section of a client's site, say Admin::Analytics (that I did not build but have to maintain) that compiles site usage analytics by performing a couple dozen, rather intensive database queries. This functionality has always been a bottleneck to application performance whenever the analytics report is being...
I have a that contains two nested div's. One of the nested div's contains a javascript graph.
When the page renders, the javascript graph is at an incorrect location, outside of the 's area. Does anyone know what I am doing wrong?
Here are the css:
#graph_container{
width: 75%;
margin: 0 auto;
background-color: #FFF;
pa...
I have a rails app using attachment_fu for uploads. Is there any way to use a custom asset server with attachment_fu?
In the end, I want all of my file uploads to go to files.example.com. And example.com to pull all resources from there.
Any help is appreciated, thanks!
...