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

  • Home
  • SEARCH
  • 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 3481932
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:30:07+00:00 2026-05-18T10:30:07+00:00

I made a Wysiwyg module where a user can create custom text areas for

  • 0

I made a Wysiwyg module where a user can create custom text areas for different sections of their website.

I do this by checking in the controllers if they have created one for this particular section yet. If they have, it redirects them :

def new
  if Wysiwyg.find_by_name(params[:name]) != nil
    redirect_to edit_admin_wysiwyg_path(Wysiwyg.find_by_name(params[:name]))
  else
    @wysiwyg = Wysiwyg.new(:name => params[:name])
  end
end

The trouble is is Rails still believes its a ‘new’ even though I have redirected the user to edit. How can I ‘clear’ the controller’s and make it really sincerely believe it is actually an ‘edit’ ?

Thanks!

  • 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-18T10:30:08+00:00Added an answer on May 18, 2026 at 10:30 am

    Ah my problem was in my form instantiation

    Old and Evil:

    <% form_for(@wysiwyg, :url => admin_wysiwygs_path, :html => { :method => :post}) do |f| %>
    

    Correct:

    <% form_for @wysiwyg, :url => admin_wysiwyg_path do |f| %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Made a much simpler example, hopefully someone can follow this and help me Here
I made a view to abstract columns of different tables and pre-filter and pre-sort
I made a discovery some time back. Just follow these steps: Create a .doc/.xls/.ppt
I made a custom TObjectList descendant designed to hold subclasses of a base object
I am setting up a own made wysiwyg plugin for jQuery. He is almost
I made a WPF/C# program and I am using the internet control for WYSIWYG
Made this community wiki :3 I'm developing a basic RPG, and one of my
Made this script to crawl certain links on a forum and extract the username,
I made my iphone app so it can be associated with PDF files. somehow
I made this windows forms application in .net 3.5 (VS c# express) . Now

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.