Displaying 20 results from an estimated 10000 matches similar to: "Two layouts in one mailer"
2011 Nov 21
0
How to use two different sets of mailer templates for two different Devise models?
I''m using Resque to send Devise emails. To do so I set:
devise.rb
config.mailer = "Mailers::Devise::DeviseMailer"
But I have 2 devise models -- User and Client. I want to send
different devise mailer templates for each.
devise.rb says "The first four configuration values can also be set
straight in your models.", and config.mailer is one of those first
four, but
2012 Feb 24
3
Devise generates Mailer by its own?
Rails 3.1.3
Hi. I''m a little confused with Devise and ActionMailer.
It seems that Devise has its own way of sending mails through
ActionMailer.
Does it generate Mailer class when "rails g devise..." command is
executed?
Or do I need to do some special command in order to generate Mailer?
I have certainly set up a devise User table but there is no Mailer class
for it,
2011 Jun 27
0
Devise Invitable mailer -- how to force text/plain e-mail?
I am using Rails 3.09 and the latest Devise and Devise Invitable. I am
able to make Devise send confirmation messages as text/plain just by
adding a view properly named to the views/devise/mailer folder.
Invitable keeps its views in views/users/invitations/mailer, but
changing the name of the file (and the contents) does not seem to
affect this at all. Instead, the view is being loaded
2010 Dec 17
1
flash[;notice] not display after redirection
I read all previous posts about the same subject in Devise group but
couldn''t find any answer, so iy may not be related to Devise , so
I debugged it ..
.
class Users::RegistrationsController <
Devise::RegistrationsController
..
# POST /resource/sign_up
def create
build_resource
if resource.save
if resource.active?
set_flash_message :notice, :signed_up
2012 Jan 26
0
Show action with Devise
Hi, Devise has edit and new views for registrations, I''d like to add a show
view to display that information.
How can I do that?
If I overwrite the controller RegistrationsController <
Devise::RegistrationsController, it says: "Missing template
registrations/show, ...", but I want to render the view that is inside
users/registrations (the generated view for "rails
2010 Nov 12
1
Devise after_sign_up_path_for - how to?
Hi,
I''m new to devise and I''m having a problem overwriting a controller.
After sign-up I want the user to go to a static page.
In the controllers folder I have created
users/registrations_controller.rb
class Users::RegistrationsController < Devise::RegistrationsController
def after_sign_up_path_for(resource)
puts "If I coould see this..."
2013 Oct 02
2
When overriding the registration controller from devise, is it possible to access the newly created
I''m trying to create a folder right after a user registers, so I override
the create action on the registration controller (devise) but I don''t know
how to access the newly created user in order to create the folder with
it''s name to upload files later.
So far I''ve got this:
class RegistrationsController < Devise::RegistrationsController
def new
2010 Aug 19
0
Rails - Devise - Warden and InvalidAuthenticityToken
Hi
I''ve just uploaded my new website to my server and, after a couple of
teething problems, seem to be hitting problems when I am using devise
and warden to authenticate users etc.
The following is the error message with sensitive information removed:
Processing RegistrationsController#create (for 81.111.90.194 at
2010-08-19 21:35:43) [POST]
Parameters:
2011 Aug 09
2
Devise AssociationTypeMismatch
My site is using Devise and Cancan. Currently I have 3 roles setup
I am testing creating a new user using the following command (role is
required):
curl -H "Content-Type:application/json" -H "Accept:application/json" -
d "{\"user\":{\"email\":\"test01-J0of1frlU80@public.gmane.org\", \"role\":\"2\", \"name\":
2012 Oct 06
1
Mailer (was: Error 0400)
On Sat, Oct 6, 2012 at 5:48 AM, Ady <ady-sf at hotmail.com> wrote:
>
> Date sent: 06 Oct 2012 10:37:00 +0200
> From: Hullen at t-online.de (Helmut Hullen)
> To: syslinux at zytor.com
> Organization: Hullen BS
> Subject: [syslinux] Error 0400
> Send reply to: helmut at hullen.de,
>
2014 Apr 21
0
Unpermitted Parameters - Rails 4
Hi,
I'm using Devise (3.2.4), Rails 4 and I'm trying to signup.
I have a Registration Controller where i do have:
"
def sign_up_params
params.require(:user).permit(:email,:first_name,
:last_name,:mobile, :birthday, :current_password,
:password,:password_confirmation)
end
"
and everytime i try to sign up I get the following message:
Processing by
2005 Dec 12
1
Comments please, how to set your mailer to read R-help in digest format
There are occasional comments on this list about how difficult it is to
read the digest format. Since it took me a few false starts to configure my
mailer to do it I have (with the encouragement of the list owner) put
together a few hints. All I need now is for people who use other mailers to
fill in the details in the same way as I have done for Eudora.
The draft is available at
2013 Jun 25
6
creating an account with a username in devise
Hello, all. I have followed these links and have enabled a (current)
user to login with a username:
http://railscasts.com/episodes/209-introducing-devise
http://railscasts.com/episodes/210-customizing-devise
https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address
I want to allow a user to sign up with a username but am getting these
2005 Nov 07
0
Using Layouts with ActionMailer when sending html formatted emails
Hello all, I''ve been spinning my wheels on a problem here, hope someone can
help me out. I''m pretty new to Ruby & Rails. I''ve added some email
capabilities to Typo. Its all finally working for the most part, however I
don''t know how to get the layout specified. I am calling the Mailer class
method to send the email from within the articles controller (for
2006 Jun 10
0
DRY Up Lots o'' Mailers
I have a heap of
fill-out-form/send-website-operator-mail/send-user-confirmation types of
forms. It''s daunting when you think about how many files it takes to do
this. I''m not coming up with an obvious "Rails" way to pull it off, so I
thought it''d be good to know if anyone else has worked through this (7 per
form!).
models/
my_form_data.rb
2006 May 01
0
Same .rhtml and partial in mailer and non-mailer contexts
I have an ActionMailer template that properly generates HTML email. It
contains a partial.
The mail action was called via the following in my controller:
def cmasend
@cmaform = Cmaform.find(params[:id])
Mailer.deliver_cma(@cmaform)
flash[:notice] = ''CMA Sent.''
redirect_to :action => ''list''
end
Then, in order to allow a
2007 Dec 20
4
Ruby on Rails mailer
Today I made a first attempt to make use of ruby mailer. A volunteer
fills out a form and the information is then sent to an administrator.
I generated a mailer called notifier and added the following:
class Notifier < ActionMailer::Base
def volunteer_signup(volunteer, sent_at = Time.now)
@subject = ''A new volunteer has signed up''
@body = { :title =>
2012 Dec 12
1
Devise route for confirmation error with :locale
Rails 3.1.3
I have setup devise and i18n . In routes.rb
scope "/:locale" do
devise_for :users, :controllers => { :registrations =>
''registrations'' }
...
end
But in the process of confirmation,
No route matches {:action=>"create",
:controller=>"devise/confirmations",
2011 Aug 28
3
rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered
I''m trying to test that "static" pages (they''re ERB, but get cached),
generated through rails, don''t render any stray flash notices left over by
the authentication system (Devise) or wherever else.
I''ve tried writing this controller spec, but it appears that response.body
only renders the template, not its layouts?
describe "so that static
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday.
I would go to the root of my site and I would get a Too Many Redirects
message. It seems like there was an infinite loop. After struggling for
over an hour yesterday late at night, it seemed like I fixed it.
But now, when I want to create a New User, it''s redirecting me to the
Sign In screen. Seems like I didn''t fix the problem completely.
I