-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi all,
I'm trying to use url_for(:back) to create a redirect leading back to a previous page upon a user's logging in.
I've had it working successfully for when the user just goes to the login page on his or her own. However, when the user is redirected to the login page due to accessing a page…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm stumped on what's causing this. I get this error and stack trace in all my functional tests where I call 'post'. Here is the full stack trace:
7) Error:
test_should_validate(UsersControllerTest):
ArgumentError: wrong number of arguments (1 for 0)
/Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I recently installed a fresh development setup on my laptop and now notice that my instances of spork take several minutes to start up. This is also most likely of the RSpec and Cucumber tests start up times running super slow.
I ran in diagnostic mode with the -d flag and received the output below…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a simple rails 2.3.4 application I am trying to get running with rails 3.0.0-beta2. I have the server running and all my links and navigation showing, however for some reason the content of my views is not displaying.
When I navigate to Site/index the html in my index.html.erb in my site…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
The latest version of rails installed on my mac is 3.0.0.beta
gem list returns
rails (3.0.0.beta, 2.3.5, 2.3.4, 2.3.2, 2.2.2, 1.2.6)
I want to create a new project using version 2.3.5
So I run: rails _2.3.5_ myProject
But it returns the following error
$ rails _2.3.5_ photosbackup
/Library/Ruby/Site/1…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
i'm cropping images with paperclip.
i have a custom module which works great on my local machine (copied from railscast 182).
//file: lib/paperclip_processors/cropper.rb
module Paperclip
class Cropper < Thumbnail
def transformation_command
if crop_command
crop_command + super…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
UPD
class User < ActiveRecord::Base
Paperclip.options[:swallow_stderr] = false
has_attached_file :photo, :styles => { :square => "100%", :large => "100%" },
:convert_options => {
:square => "-auto-orient -geometry 70X70#",
:large => "-auto-orient -geometry…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I use Heroku for my app.
I want to auto-orient image and then to resize it. So I do:
class User < ActiveRecord::Base
Paperclip.options[:swallow_stderr] = false
has_attached_file :photo, :styles => { :square => "100%", :large => "100%" },
:convert_options => {
:square…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I use paperclip to add a file to my model.
I want to use the new feature of firefox 3.6, xhr.sendAsBinary, to send a file with an ajax request.
Here is how I build my request :
var xhr = new XMLHttpRequest();
xhr.open("POST", "/photos?authenticity_token=" + token
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
First off, we have this namespaced/sti'd structure for our different types of 'Media'
Media< Ar::Base
Media::Local < Media
Media::Local::Image < Media::Local
Media::Local::Csv < Media::Local
etc... etc..
This is excellent since a user can have many media, and how we display each piece…
>>> More