Displaying 20 results from an estimated 5000 matches similar to: "Email Exception"
2008 Apr 07
7
Saving attribute
Something is getting lost here.
def create
@home = Team.find_by_user_id(current_user.id)
for player in @home.players
player.update_attribute(:game_id, @game.id)
end
end
def show
@players = Player.find_all_by_game_id(params[:id])
end
view
<%= @players.size %> # mistakenly equals zero
Played with the console and everything should be working fine...
2012 Apr 06
3
I can't update data in table
In my edit page: url = profile/:id/edit
the content is !
<%= form_for(@user, :as => :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
2012 Apr 09
0
How I update Multi Tables In A Form
Hello Friend!.....
I wanna update tables in a forms.
I have two table
1. user table
( usertable has id , name, email, address)
2. game table
(gametable has id, description, game_date, gametiming , user_id)
for edit .. I can display all two table data...
Wanna update data params by userID.
I do update two table data in a form.
How I do it ? Give Me A Hand!
phoesan
--
Posted via
2005 Dec 14
5
inserting multiple rows
I have table which stores multiple entries. Each row has user_id,
game_id and a pick_id. On a page the user has to make load of choices.
All this gets submitted.
the html looks like so:
<input type="hidden" name="game_id" value="3">
<input type="hidden" name="user_id" value="19">
<select name="pick[3]">
....
2009 Dec 21
2
Multiple email recipients
I''m trying to call multiple email addresses from database. But dont
know how to get the logic into the recipients field.
#subscriptions_controller
def deliver
@subscription = Subscription.find(params[:id])
@users = @subscription.users
@subscription_recipients = @users.find(:all).collect { |user|
user.email }
@subscription.deliver
flash[:notice] = "Delivered
2013 Apr 03
1
validates uniqueness scope allow_blank/allow_nil -> validation error
I have this in a model:
class GenreBadge < ActiveRecord::Base
belongs_to :game, counter_cache: :genre_badges_count, touch: true
belongs_to :genre
validates :game_id, uniqueness: {scope: :genre_id}, allow_blank:
true
end
When I get one existing genre badge
genre_badge = game.genre_badges.first
genre_badge.game_id = nil
genre_badge.save!
It creates an validation exception:
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
2010 Feb 08
0
recommending friends, using RoR's Mailer
Hi there, I wan tto be able to allow users to invite friends...
The action below is exactly the same as the code used to send a user
their username. Only difference is, I need to change the ''''user =
User.find_by_email(email)'''' part as obviously, I dont want to only
email people who are already on the site.
def invite
@title = "Invitation"
2013 Jan 24
0
Again ACL Postgres dict trouble, no update and raw backtrace
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have ACL-dict-postgres trouble again. Eventually a session does not
update the ACL dictionary no longer.
I execute (for testing) this script:
for a in $(seq 1 ${1-4}); do
echo 3-$a deleteAcl Junk dvtest1
sleep 30
echo 3-$a SetAcl Junk dvtest1 kxilrsc
sleep 30
2007 Oct 08
6
spec''in controllers request for nested routes
describe PlayersController, "handling GET /saltmines/games/1/players" do
before do
@game = mock_model(Game, :to_param => "1")
@game.stub_association!(:players, :find => mock_model(Player))
end
def do_get
get :index, :game_id => @game
end
it "should be successful" do
do_get
response.should be_success
end
it "should
2012 Jul 16
0
ACL with MySQL dict => full table scans
Hi!
I'm just installing ACL support on 2.1.6.
When a user changes these ACLs, this results in a full table scan on
the dictionary, that tells dovecot who shares with whom.
Here's what queries I see when I run
$ doveadm acl delete -u user1 shared/user2/folder user=user1
1: SELECT dummy,to_user,from_user FROM imap_acl_shares
2: SELECT dummy,from_user FROM imap_acl_anyone
3: BEGIN
4:
2015 Jul 24
0
possible patch for ACL SQL ERROR: duplicate key value violates unique constraint "user_shares_pkey"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm using Postgres as dict backend now and then I get this error, when
someone changed ACLs, actually for some reason some users, who get
permission from other users, get this error quite often:
dict: Error: sql dict: commit failed:
ERROR: duplicate key value violates unique constraint "user_shares_pkey"
(query: INSERT INTO
2009 Apr 07
2
Is there any more detailed docs about dict configuration
Hi,
I am looking for some help on dict configration. I'm trying to config
shared and public mailbox, and use sql as acl backend.
Here is my config:
table:
CREATE TABLE `shared_dict` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`from_user` char(50) NOT NULL,
`to_user` char(50) NOT NULL,
`status` int(10) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `from_user` (`from_user`),
2011 Dec 12
1
Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production
I don''t know how to get more info about this issue on my remote server
( Linux/Debian6 - Qmail)
localhost testing is fine
, so my class UserMailer < ActionMailer::Base is rendering correctly
the email ( checked in the development log)
now, testing the remote SMTP server , via the production console,
using :
ActionMailer::Base.smtp_settings = {:address =>
2012 Aug 29
1
ACL MySQL dict: to_user==from_user entries
Hi!
We run dovecot 2.1.6 with ACL support and MySQL dict for
shared/shared-boxes/user/$to/$from.
When a user does a SETACL (via IMAP) to himself he is added as $to and
$from to the MySQL dict. Se for example this IMAP conversation:
5 GETACL INBOX
* ACL "INBOX" "user at domain" lrwstipekxacd
5 OK Getacl completed.
6 SETACL INBOX user at domain lrwstipekxacd
6 OK Setacl
2014 Dec 01
1
[PATCH] virtio_console: fix sparse warnings
CHECK drivers/char/virtio_console.c
drivers/char/virtio_console.c:687:36: warning: incorrect type in
argument 1 (different address spaces)
drivers/char/virtio_console.c:687:36: expected void [noderef]
<asn:1>*to
drivers/char/virtio_console.c:687:36: got char *out_buf
drivers/char/virtio_console.c:790:35: warning: incorrect type in
argument 2 (different address spaces)
2014 Dec 01
1
[PATCH] virtio_console: fix sparse warnings
CHECK drivers/char/virtio_console.c
drivers/char/virtio_console.c:687:36: warning: incorrect type in
argument 1 (different address spaces)
drivers/char/virtio_console.c:687:36: expected void [noderef]
<asn:1>*to
drivers/char/virtio_console.c:687:36: got char *out_buf
drivers/char/virtio_console.c:790:35: warning: incorrect type in
argument 2 (different address spaces)
2007 Oct 24
1
Attachment_fu and observers/emailing
Hi all,
I''m developing a site where a user can upload their CV/resume with a
profile, and am using restful_authentication for this with
attachment_fu to handle the file uploading.
When a user creates their profile/user account, I''ve got an observer
that will email the site admin with a copy of the uploaded CV. My
user_observer looks something like:
class UserObserver <
2011 May 20
0
delayed_job - Undefined method error even with Mongrel
Any delayed_job gurus out there? This is a known issue on the wiki as
described at the bottom here:
https://github.com/collectiveidea/delayed_job/wiki/Common-problems
However, even when running Mongrel (on Rails 3.0.3, ruby 1.9.2, Win7)
after replacing Webrick) I am still getting this issue. My delayed_job
handlers read:
--- !ruby/struct:Delayed::PerformableMailer
object: !ruby/object:Class
2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
In a nutshell, I''m using restful_authentication that emails the user
when they sign up for an account
The development.log file shows the body of the e-mail message being
prepped to send out, but doesn''t show confirmation that it made it.
When I use gmail''s SMTP server, a Rails exception is thrown because
gmail expects an encrypted connection. A different type of Rails