search for: curiousnewbi

Displaying 15 results from an estimated 15 matches for "curiousnewbi".

Did you mean: curiousnewbie
2010 Dec 01
10
How to Redirect from http://mysite.com to https://www.mysite.com on Herok
Hello I''m looking to learn how to redirect all non-www (mysite.com) to https://www.mysite.com I tried the following: class ApplicationController < ActionController::Base before_filter :check_uri def check_uri redirect_to request.protocol + "www." + request.host_with_port + request.request_uri if !/^www/.match(request.host) if Rails.env ==
2010 Dec 22
2
Rails - JSON object with an array?
Hello, I''m able to create and send a JSON object like so: @mylist << { :id => item.id, :name => name.id } render :json => { :result => ''success'', :mylist => @mylist } That works great. Problem I''m having now is that I need to include users which can be 1 or users per item. @mylist << {
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following: My Controller: def new . . @teammembers.each do |teammember| request = @request_thread.requests.build(:recipient_id => teammember.user_id, :full_name => ''Billy Bob T'') end My View: . . <%= f.fields_for :requests do |builder| %> <div class="field"> <%= builder.label
2010 Nov 20
2
This installation of RMagick was configured with ImageMagick 6.6.4 but ImageMagick 6.6.5-0 is in use
Hi all, just installed ImageMagick on my Mac, then added the gem rmagick, and not can''t launch the server on my local machine. Anyone experience this or have any ideas? rails s /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle: This installation of RMagick was configured with ImageMagick 6.6.4 but ImageMagick 6.6.5-0 is in use. (RuntimeError) from
2011 Mar 08
2
Rails - Acts as Nested - Impossible move, target node cannot be inside moved tree.
Hello, I''m using the Awesome Nested Set plugin: https://github.com/collectiveidea/awesome_nested_set And in my model I do the following: acts_as_nested_set after_save :ensure_max_nestedset_level private def ensure_max_nestedset_level if self.level > 2 self.move_to_child_of(parent.parent) end end I do this to keep the levels from getting
2010 Nov 01
2
paperclip Image Versioning
Hello. I''m hoping to hear your recommendations on using paperclip for images with versioning. Anyone know of any elegant paper_clip image, versioning implementation solutions? Thank you -- 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 Dec 21
8
Rails - escape_javascript without all the \n\n\n\n\n
Hello, I''m using escape_javascript to return a partial to the browser via ajax. Something like: $("#inject").html("<%=escape_javascript(render :partial =>"feed/ index")%>"); Problem is escape_javascript ends up outputing all kinds of wasted space like \n\n\n\n\n \n Is there anyway in Rails to escape_javascript more
2010 Dec 12
1
PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xa0
Hello, my app is reading emails with attachments and inserting the Email message into the database to be sent to delayed job for processing. When inserting an email with attachments into the database, I get the following error: PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xa0 Has anyone seen this before? There doesn''t seem to be much rails related via
2010 Oct 30
0
Will_Paginate — Set the Starting record ? IE, Photo 3, of 8
Hello. I''m working very hard to build projects > photo_albums > Photos But am Stuck on being able to implement it. Desired User Flow... #1 - User clicks their project #2 - User sees a list of photo albums #3 - Users clicks a Photo Album #4 - User see a list of photos in the album #5 - User views the clicked photo BUT has will_paginate showing in the nav for all
2010 Nov 17
0
Rails 3.0.3 - Error on Install
XXXXX-MacBook-Pro:cline xxxxxxx$ sudo gem install rails ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: nodename nor servname provided, or not known (http://rubygems.org/gems/railties-3.0.3.gem) Anyone else getting this? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2010 Dec 03
0
Rake Routes project_attachment_path
Hello, I''m trying to create a project_attachment_path In my routes I have: resources :projects do collection do get "attachments/:id/:style.:format" => "attachments#download", :as => :attachment end end **Problem is in RAKE ROUTES:** attachment_projects GET /projects/ attachments/:id/:style.:format
2010 Dec 05
0
Rails - Using Tempfile to write on Heroku?
Hello, I need to be able to write a temporary file for use during the request only. Locally I can use the following successfully: tempfile = File.open(a.original_filename,''w'') tempfile.write_nonblock(a.body) paperclip stuff........ tempfile.close That works great, but not on Heroku... How can I do the above with Heroku''s restrictions:
2010 Dec 11
0
Rails 3 - Delayed_Job (collectiveidea), trying to Delay Mailers - Error: NoMethodError (undefined method `delay' for UserMailer:Class):
Hello, I have the following in an observer: UserMailer.delay.msg_notification(record) In user_mailer.rb class UserMailer < ActionMailer::Base ... def msg_notification(record) mail( :to => "#{record.user.email}", :subject => "Notification" ) end .. end But this errors with: NoMethodError (undefined method `delay'' for
2011 Jan 25
0
Rails 3 - Helping with a Commenting Module
class CommentsController < ApplicationController def create @commentable= context_object() @comment = @commentable.comments.build(params[:comment].merge(:user_id => current_user.id)) if @comment.save respond_to do |format| format.js end else render :action => ''new'' end
2011 Feb 18
0
Acts as nested - Enforcing a Max Level
Hello, I''m currently using the gem ''nested_set'' for comment threading. What I want to do is prevent the comment level from going more than 2 levels deep. What I tired doing was something like this: class Comment < ActiveRecord::Base .... before_save :ensure_max_nestedset_level private # We don''t want comments to go