search for: profilecontrol

Displaying 5 results from an estimated 5 matches for "profilecontrol".

2005 Oct 14
0
ImageMagick helper
Trying out the imagemagick helper by Gijs van Tulder, I''ve run into a bit of a problem. In environment.rb, I placed: require_gem ''actionpack-imagemagick'' I''ve set up my controller as such: class ProfileController < ApplicationController # ..SNIP.. class Photo < ApplicationController imagemagick_for ''/home/howardroberts/documents/pics/'' end end Then in views/profile/photo.rhtml I put: <%= imagemagick_tag ''image1.jpg'', ''resize(100x100)'' %...
2007 Oct 15
5
Very simple code throwing "uninitialized constant" error
This code works on an older version of Ruby and Rails but not with Ruby 1.8.6 and Rails 1.2.5. The code is so simple that I can''t figure out where the problem is. profile_controller.rb class ProfileController < ApplicationController def show @profile = Profile.find_by_school_id(params[:id]) end end ----------------------------------------------------------- profile.rb class Profile < ActiveRecord::Base belongs_to :school belongs_to :profile_type translates :text #<--- I''...
2008 Jun 25
0
Rspec routing_spec failing on nested singular resource
...solve; I''m trying to get an Rspec routing_spec working with a singular nested resource; map.resources :users do |user| user.resource :profile end All the tests in the profile_routing_spec seem to be failing because they can''t match the routes, for example; # The spec describe ProfileController do describe "route generation" do it "should map { :controller => ''profile'', :action => ''show'', :user_id => ''1'' } to /user/1/profile" do route_for(:controller => "profile", :action =>...
2012 Apr 06
3
I can't update data in table
...:user, :url => profile_path(current_user), :html=>{:method => :put}) do |form| %> <%= form.text_field :email, :class=>"input"%> <%= form.submit ''Update Profile''%> <% end %> ............................ In controller section ! class ProfileController < ApplicationController def edit @user = User.find(params[:id]) end def update @user = User.find(params[:id]) @user.email = params[:user][:email] @user.save respond_to do |format| if @user.save = @user.update_attributes(params[:user]) if @...
2006 Jan 25
6
Displaying based on hostname/subdomain
Ive tried multiple ideas to get this to work, but keep hitting a dead end. Has anyone done this before? I want joe.domain.com to display www.domain.com/profile/joe Im using lighttpd. Routes dont have access to the URL string and therefore I cant code in a conditional. lighttpd rewrite seems to really screw it all up. Is there a feasible solution? Thank you, Joe Noon