search for: muheim

Displaying 20 results from an estimated 85 matches for "muheim".

Did you mean: heim
2006 Apr 01
5
Upload a zip using a form and extract if afterwards on srv?
Hi all It like my visitors to be able to upload a zip file (or any other possible compressed file archive) to my server. After upload, my web app should extract the content to the server and delete the zip file. Is this possible somehow? I''m very thankful for help. Have a nice weekend, Joshua -- Posted via http://www.ruby-forum.com/.
2006 Jan 12
9
Scaffold shows all attributes altough I use attr_accessible!
Hi all I have a Model like this: class Member < ActiveRecord::Base attr_accessible :username, :email, :first_name, :last_name end I have created a scaffold using script/generate scaffold member members Using the URL localhost:3000/members/edit/1 I can edit all attributes, including created_at, lock_version etc.! But it should only show the attributes I listed in attr_accessible! What
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all n = Nokogiri::HTML("<h1>H1</h1>") n.to_s # => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html> Is there a method that only outputs the stuff I''ve read, and not the whole valid XHTML stuff?
2006 Jan 23
5
validates_uniqueness_of :username, :if => !self.new_record?
Hi all I want users to register on my page. To register, they only have to deliver an email and a password. Then a link with an activation token will be sent to them, and after clicking the link the user sees a page where he should fill in further details, means: a username. My model looks like this: class Member < ActiveRecord::Base validates_presence_of :username, :if =>
2008 Jul 30
4
AssociationTypeMismatch: Genre expected, got String
Hi all I have the following 2 models: class CompactDisc < ActiveRecord::Base belongs_to :genre end class Genre < ActiveRecord::Base has_many :compact_discs end I have created a select box for my form so I can choose a genre for every compact disc: <p> <b>Genre</b><br /> <%= f.select :genre, Genre.find(:all).collect{|p| [p.name, p.id]}, :selected =>
2006 Jan 11
7
before_filter: how to give :except more than 1 value?
Hi all I have the following class: class MemberController < ApplicationController before_filter :authorize, :except => :index def index ... end Now I want to give the before_filter more than one :except argument. I tried :except => {:index, :login}, but this didn''t work. How can i accomplish this? Thanks a lot and have a nice day, Josh -- Posted via
2006 Jan 24
9
ActionMailer: Mail isn''t delivered
Hi all I used the search for this, but I got an Application Error, so sorry for the newbie question. I have tried to send an e-mail using ActionMailer. I have to following config (environment.rb): ActionMailer::Base.server_settings = { :address => "mail.psyguide.org", :port => 25, :domain => "mail.psyguide.org", #:authentication => :login, #:user_name
2006 Mar 21
5
Use select_date for my model?
Hi all I have a model "party" that has a time field "starts_at". I have created a form to add new instances of this model. <%= select_date Date.today, :prefix => ''party'' %> Sadly I get the error: NoMethodError in Parties#add undefined method `month='' for #<Party:0x256a600> How can I fix this problem? I remember that I saw in
2006 Jan 19
5
123 * 3 => 123123123! But why?
Hi all I extended the Globalize Plugin the following way: -------- module Globalize class Currency def conversion_rate code = Locale.active.currency_code rates = { :USD => 1, :CHF => 0.75, :EUR => 1.1, :GBP => 3.1 } value = rates[code.to_sym] raise "No conversion rate found for currency
2007 Apr 01
7
database.yml: encoding: utf8 does not work
Hi all According to the Agile 2nd Ed book I added the line encoding: utf8 to my database.yml connections. But now when running rake I get plenty of errors: Character set ''utf-8'' is not a compiled character set and is not specified in the ''/usr/local/mysql/share/mysql/charsets/Index'' file What''s wrong here? I checked this Index file, but it seems to
2006 May 16
5
rake aborted! ActiveRecord::ConnectionNotEstablished
Hi all I''m just learning to use rake and ran into the following problem: chraftbuech:/Users/Josh/Webwork/CommentingSystem josh$ rake create_test_news (in /Users/Josh/Webwork/CommentingSystem) Create test news rake aborted! ActiveRecord::ConnectionNotEstablished The task''s code is: desc ''Creates some test news items with comments'' task
2006 Jan 29
9
Specify options with habtm
Hi all I have the following models: class member has_and_belongs_to_many :disc_jockeys end class disc_jockey has_and_belongs_to_many :members end The relation table is called disc_jockeys_members and has the following fields: disc_jockeys_members(disc_jockey_id, member_id, status) So far, the field status can have values like valid, invalid, locked etc., but it is not regarded yet by
2006 Jun 29
3
String: first character upcase?
Hi all Is there a function that makes the first character of a given string upcase? first_to_upper "canada" Thanks for help. :-) Joshua -- Posted via http://www.ruby-forum.com/.
2012 Jun 14
3
Selenium+Autotest: how to run browser in background?
Hey guys After hours of hard work I finally managed to set up my development environment to run cucumber scenarios using autotest and selenium. What''s a bit bugging is the fact that Firefox always jumps to the foreground when Autotest does its job. How can I keep Firefox in the background so that I can continue with my work without being interrupted? Thanks! -- Posted via
2006 Jan 11
4
Member.buddies.sort >> undefined method `<=>''
Hi all I have a model Member that has a habtm relationship to buddies (also members). Now I wanted to sort them using sort, but this ends in an error "undefined method <=>"! Where''s the problem here? Sorry, I''m still beginning to learn Ruby. ;-) Thanks Josh -- Posted via http://www.ruby-forum.com/.
2007 Apr 01
2
"-" instead of "_" in routes?
Hi all I''d like to have minus signs "-" instead of underscores "_" in my routes. Is there an easy to do that? my_controller/show_something/123 # <= not cool my-controller/show-something/123 # <= much cooler Thanks a lot Josh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2008 Oct 24
2
Verify that an email is sent?
Hi all I''m trying to get my actionmailer to work. I''ve set the following params in my environment.rb: config.action_mailer.smtp_settings = { :address => "mail.???.ch", :port => 25, :domain => "???.ch", :authentication => :login, :user_name => "???", :password => "???" }
2006 May 06
3
Storing additional data on join tables with Rails
...ed two possible methods: 1) push_with_attributes, as described by Justin Palmer [2]. Unfortunately, "this method is now deprecated" [3]. Even if it wasn''t, there seem to be inherent problems with that approach, for example with updating those additional attributes, though Joshua Muheim have provided us with a plugin for that [4]. 2) promote the join-table to a full module. This approach seems to integrate better with Rails, and even a newb like me can sense that it has a lesser chance of rubbing ActiveRecord''s magic the wrong way, thereby breaking something. Still, that...
2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all We all know the model-controller-paradigm: I have a model "News" which has a corresponding CRUD-controller "NewsController". But now I''m quite unsure about the following... Guess we have normal visitors that visit our site www.??.com/news and we have administrators that create and modify news items. The admin should see an "Edit" link and a