similar to: formtastic issue

Displaying 20 results from an estimated 1000 matches similar to: "formtastic issue"

2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users to click a reply link next to the parent comment. It will send in a parameter to the ''new'' comment view, like so: | <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %> The form will use the :in_reply_to parameter in order to save that id as the parent id, like so:
2010 Sep 11
10
Having difficulty with threaded comments, using acts_as_tree
I''ve been having problems making threaded comments for the last few days. Mainly with creating children and displaying the children. Currently, I have comments shown at the bottom of my articles show view. The top level comments work, but I do not really know how to implement a way for users to "reply" to the top level comments and take them to a form (the comment
2012 Sep 22
1
formtastic does not save at all
Rails 3.1.3 I am using Formtastic gem in order to deal with multi-select dependencies. <%= semantic_form_for(@give) do |f| %> <%= f.inputs do %> <%= f.input :departure, :collection => Departure.find(:all, :order=>:city).collect{ |c| [c.city,c.id]}, :required=>true %> <div id="destinationCity"> <%= render :partial =>
2010 Sep 21
25
Working in install acts_as_commentable, On create, error: "unknown attribute: book_id"
Hello, I''m working to install the acts_as_commentable plugin on my Rails 3 app. After adding "acts_as_commentable" to my book model, I then added a comment form on my book show view: <% form_for(@comment) do|f| %> <%= f.hidden_field :book_id %> <%= f.label :comment %><br /> <%= f.text_area :comment %> <%= f.submit "Post
2010 Sep 08
5
Adding a selected checkbox to a new nested model without polluting the model
Context: I have a GoodsReturn model with many ReturnedItem. For the new view, I create a new GoodsReturn with many new ReturnedItems from a sale (and its SoldItems). Problem: I want to have a Add/Selected checkbox with which the user can pick the items he wants to return. I know I could use a ''selected'' virtual attribute but I don''t want to pollute my model just for
2007 Nov 25
4
is notify resevered word?
Hi, When I added this association... class User < ActiveRecord::Base has_one :notify end ...and tried then to update column in User table it will call queries for notify table automatic? Output --------------------------------------------------------------- User Columns (0.041488) SHOW FIELDS FROM `users` User Load (0.001544) SELECT * FROM `users` WHERE (`users`.`nickname` =
2010 Sep 13
13
what I've missed in routes.rb?
In routes.rb I''ve put: resources :sessions controller is: class SessionsController < ApplicationController def destroy session[:id] = nil session.delete(:casfilteruser) CASClient::Frameworks::Rails::Filter.logout(self) end end In application.html.erb I have: <%= link_to ''Logout'', session_path(session[:cas_user]), :method => :delete %> I
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a thumbnail. So far so good. Except when I do: cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv" success = Paperclip.run(''ffmpeg'', cmd) Console is reporting: ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream, 16824,1.mpeg -f flv -s 320x240
2007 Nov 01
3
autotest debugger?
Hi, I keep facing problems with autotest, and I don''t know what''s happening in the background, is there anyway to know what''s happening while testing? Example: @user = User.new @user.email = "testcom" @user.errors.on(:email).should_not be_empty ...throws error failure - You have a nil object when you didn''t expect it! - You might have expected an
2010 Sep 06
5
how to call rails method from javascript method.
hi I wanna call rails method from the javascript method. It should be ajax call for rails method. please help me. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe
2010 Jan 16
3
Formtastic and Access to Variables of Nested Model
So I''m not even sure if I''ll be able to properly explain what I''m trying to do, but I''ll do my best. Let''s say that I have two models: Document and Option. A Document has many Options (and, by extension, an Option belongs to a Document). Each document may have a different number of options, hence why I made it a separate model. Each document has the
2007 May 06
2
render :action "call method first?"
Hi, I know when I call: render :controller => ''some'', :action => ''thing'' It doesn''t call the method ''thing'' before render the template ''thing.rhtml'', but I need some instance variable which are in the ''thing'' method, how can I let it call the method ''thing'' and then render
2010 Sep 12
11
Rails Commenting, Plugins?
Hello, I''m looking to add comments to records in my app like Books. So a user can view a Book and then comment on it... As a newbie, is this something that I should build from scratch, or are there any popular Commenting Plug-ins, (Ajax implemented) that might be worth utilizing? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2007 Mar 27
6
how does rails do this "find_by_?"
Hello there, I''m wondering how do they create functions on the fly? find_by_any_column_name ?? I want to do something similar with my models, but I don''t really know how to do it? user_current_nickname user_current_id user_current_role etc.? Regards, Jamal -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2007 Oct 02
3
Note on Rails 2.0 Preview
Make sure you get a relatively current version of rspec or you will get: /Users/me/rails/ubb/vendor/rails/activerecord/lib/../../activesupport/ lib/active_support/dependencies.rb:263:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper (NameError) Hope this helps someone.
2007 Sep 07
5
enforce mutual exclusivity
Hi, First post, please be gentle! I couldn''t find any mention of this already I''m using ActiveRecord and I want to enforce mutual exclusivity on a has_and_belongs_to_many. A concrete example: I have a User which can have one or more Roles (student, tutor, headmaster, administrator etc). However if a user is a student they cannot hold any other role. I was hoping to find
2012 Aug 07
9
How do I force link_to/form helpers to use the superclass name in the path instead subclass?
I want my helpers to generate paths using a superclass instead of the subclasses. Assuming I have Owner and Member that both inherit from User, rails will use the current objects class name when generating paths: Let''s say current_user is a mod: <%= link_to current_user.name, current_user %> will generate "/mod/:id". I want to force it to generate
2010 Oct 03
7
Rails 3, Validates, Custom Message
In Rails < 3, I could have a validation on model such as: validates_presence_of :name, :message => "some custom message here" If I try something similar in Rails 3: validates :name, :presence => true , :message => "some other custom message" obviously, it throws an exception. So the question is, in Rails 3, how to you give a simple custom message? Do I need to
2011 Mar 17
7
Beta Invitation in Rails 3, little problem
INVITATION BETA EMAIL I have in the email that the app send to friend''s email address ------------------------ You are invited to ExampleApp.com click below to signup http://localhost:3000/signup.efweiuvwnjernfwkefwebhsohj ------------------------ But I have a dot in the url beteween http://localhost:3000 and the token I wish the following url
2010 Jun 05
6
How do you update HABTM relationships or create.
Hi, I have a User model with a HABTM relation to a Role model and vice versa. So There''s a roles_users table that references :user and :role. I''m using formtastic, and in the user.edit.html.erb I have a line that outputs the roles as a multi-select list box. But the box is not showing the roles that have been assigned to the users. Another problem is that if I select a few