Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5930487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:33:43+00:00 2026-05-22T14:33:43+00:00

A user can sign up as an artist. All the user needs to do

  • 0

A user can sign up as an artist. All the user needs to do now, is provide his email.

In Artist controller, def create. Is it normal to have something like:

  def create
    @artist = current_user

    respond_to do |format|
      if @artist.update_attributes(params[:user]) # params[:user] contains email
        @artist.is_artist = true
        @artist.save
....

In my User model, I have:

attr_accessible :email

Which means, I can’t simply do @artist.update_attributes(:is_artist => true). I would have to use the save method instead. Is this type of approach common? Or is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:33:44+00:00Added an answer on May 22, 2026 at 2:33 pm

    You can define before_create method in your model:

    class User < ActiveRecord::Base
      ...
      before_create :fill_fields
      def fill_fields
        is_artist = true
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A user can create a post. Posts have comments. A comment must belong to
Simply put, I have a website where you can sign up as a user
I'm developing a website where the user can either sign up creating his own
Scenario: User gives you an email address. Before they can sign up for services,
I am using devise for authentication and for now, I can sign-up a user
I have a signup page, which allows user to provide his information like (name,
I have a sql database that stores some documents. A user can sign into
The site user can sign-up on a site, and during sign-up he can provide
I am working with a wizard, where the user can sign up. There is
I have to sign a BlackBerry application so that I can load it onto

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.