I have an application I'm migrating from Rails 3.2 to 4.0. On my CI
environment, I'm getting ActionView::Template::Error: end of file reached
randomly in different controller specs pointing to a view in which I have
javascript_include_tag 'application'. Has anyone seen this before?
Relevant
Hi all,
I'm using Rails 3.0, and I have a model which validates if the
attribute :name is present. On my my views, I use Jquery to submit the
form which creates the model. If the name is not present, Rails
returns something like this Json:
['Name is a required value']
Is there a way to make it
Anyone?
What I want is to inform Rails somehow that the json I want for the
comment should also contain information from the Post.
On Apr 24, 2:42 pm, Fabio Kreusch fabi...@gmail.com wrote:
Hi all,
Supponsing I have this:
class Post ActiveRecord::Base
end
class Comment ActiveRecord
Hi all,
Supponsing I have this:
class Post ActiveRecord::Base
end
class Comment ActiveRecord::Base
belongs_to :post
end
How can I make (on Rails 3) on the CommentsController to respond with
a json object including the related Post?
Thanks!
--
You received this message because you are
I am still stuck with this. Does anyone knows if this is the expected
beavior for Rails? Should respond_with on update really return an
empty json object?
On Mar 23, 7:17 pm, Fabio Kreusch fabi...@gmail.com wrote:
No ideas?
On Mar 22, 7:42 pm, FabioKreuschfabi...@gmail.com wrote
No ideas?
On Mar 22, 7:42 pm, Fabio Kreusch fabi...@gmail.com wrote:
This is it (HAML):
#category-form
- form_for @category, :remote = true do |f|
%fieldset
%legend= t('activerecord.models.category')
%p
= f.label :name
%br
= f.text_field :name
(val);
});
form.attr('action', action);
On Mar 22, 2:05 am, Conrad Taylor conra...@gmail.com wrote:
On Sun, Mar 21, 2010 at 6:27 PM, Fabio Kreusch fabi...@gmail.com wrote:
Hi Conrad,
I have tried Rails console, and while trying to convert to json the
results were the expected
Hi all!
I'm playing with Rails 3, and on one of my controllers I have the
following update method defined:
def update
@category = @user.categories.find(params[:id])
@category.update_attributes(params[:ecategory])
@category.save
respond_with @category
end
I'm using Jquery to
Thanks Conrad, I have removed the save call from the code, but it
continues to return an empty JSON on success case.
Any more clues?
On Mar 21, 3:37 pm, Conrad Taylor conra...@gmail.com wrote:
On Sun, Mar 21, 2010 at 9:44 AM, Fabio Kreusch fabi...@gmail.com wrote:
Hi all!
I'm playing
) retrieve a category from the user's list of categories
c) convert the result in (b) into json
Next, what does the jQuery code look like?
-Conrad
On Mar 21, 3:37 pm, Conrad Taylor conra...@gmail.com wrote:
On Sun, Mar 21, 2010 at 9:44 AM, Fabio Kreusch fabi...@gmail.com
wrote
Any thoughts?
On Aug 28, 9:30 am, Fabio Kreusch fabi...@gmail.com wrote:
Hello all,
I'm trying to create the following:
There is a index page that lists some items, and 'new item' button. I
want the user to be able to click the button, and with ajax the page
will be refreshed to show
Hello all,
I'm trying to create the following:
There is a index page that lists some items, and 'new item' button. I
want the user to be able to click the button, and with ajax the page
will be refreshed to show the new item form.
For that, I added a format.js on my controller, and created a
12 matches
Mail list logo