Displaying 20 results from an estimated 8000 matches similar to: "Rails' scaffold controller generator - should it test json format also?"
2012 Sep 15
10
Versioning of Views; Our Approach
My friend Ben Willis and I have developed a gem for the versioning of Rails
views.
https://github.com/bwillis/versioncake
The versioning is done by the naming convention. Image the following
series of files :
show.v3.json.jbuilder
show.v2.json.jbuilder
show.v1.json.jbuilder
create.v2.json.jbuilder
create.v1.json.jbuilder
The developer pre-defines all view versions in their config. When a
2012 Sep 28
1
How to Include Associations in #as_json
Hi,
Does anyone know how to include nested associations when overriding a
model''s #as_json method?
Below is my attempt to include direct and nested associations.
NOTE: "office" is a direct association, "company" is nested association
via "office". I''d like both included in the generated json output.
def as_json(options={})
super(:include
2012 Sep 18
2
NoMethodError with rake db:migrate
Hi! First of all, this is my first application on Rails, and i''m stuck at a
migration. i created a demo app (the demo_app from michael hartl''s
tutorial) as usual: rails new demo_app, rails generate scaffold User
name:string email:string, and when i do rake db:migrate, this stack appears:
rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment
2010 Jan 31
3
Removing scaffold?
Hi,
I just created a new scaffold in my app using the nifty-scaffold plugin.
However, I messed up the syntax and forgot the model name, so it ended
up being called "Title:string".
I now can''t run any tasks from the terminal as I get the following
error:
vendor/rails/activesupport/lib/active_support/inflector.rb:352:in
`const_defined?'': wrong constant name
1999 Jan 20
1
JBuilder Reload buffers? confusion (any update?)
Hi,
We've got some Java projects that are being developed on both Unix and
NT and we're struggling with JBuilder 2.0 and its "File has been
externally updated, reload buffers?" messages. Has anyone found a fix?
Is it a bug in JBuilder? i.e should I save my hair and not spend any
more time investigating/trying to fix this problem?
More info:
Our NT machines access files from
1999 Jan 20
1
JBuilder Reload buffers? confusion (any update?) (PR#12876)
aideen@persimmon.co.uk wrote:
>
> Hi,
>
> We've got some Java projects that are being developed on both Unix and
> NT and we're struggling with JBuilder 2.0 and its "File has been
> externally updated, reload buffers?" messages. Has anyone found a fix?
> Is it a bug in JBuilder? i.e should I save my hair and not spend any
> more time investigating/trying
2004 Sep 21
1
windows program over a samba share
Hi,
I don't know if this is possible, but I'd like to install a window program (in
the specific JBuilder Personal) over a samba share, and then to mount a
network share as a disk from windows clients, so they can use the program. Is
it possible? Any idea on how to share windows programs from a linux server?
Thanks,
Luca
--
Luca Ferrari,
fluca1978@infinito.it
2013 Mar 14
0
Display custom links above top level arrays using Jbuilder
I have a custom JSON response in which I display a collection of 15
posts along with related data like comments etc., as part of an API
call. I am displaying the entire collection using Jbuilder .
json.array!(@posts) do |post|
..
..
end
I want to display pagination links above the response of the 15 posts,
in order to get the next set of posts with the appropriate next set of
next page and
2014 Mar 09
0
rails with mongodb
Hello viewers .. I'm Doing a project on rails with mongoDB as a backend
database. When we learn a new programming language we start with writing
a helloworld program . In the same way if we want to work with a web
application we usually do a simple database connection .. We just create
a page with a single text box and a simple button . When we click the
button the data should be fetched from
2012 Sep 18
4
"best practices" for Rails serving RESTful JSON services for use by AngularJS, Ember.js, etc.
I''ve been writing a gem to implement and extend common controller
functionality so that Rails can be used with Javascript frameworks like
AngularJS (which we are using), Ember.js, etc. in such a way that the user
doesn''t have to tweak a a bunch of rails g controller boilerplate code to
provide services for use in these frameworks that in turn would require
various changes to
2014 Apr 14
0
Foundation & Authlogic
Seems I can get either Foundation or Authlogic to work but not both -
After bundle install when I do a rails g foundation:install I get the
following:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-4.1.0/lib/acti
ve_record/dynamic_matchers.rb:26:in `method_missing': undefined local
variable o
r method `inheritable_attributes' for ActiveRecord::Base:Class
(NameError)
2012 Aug 13
10
Question about PATCH method, accepts_nested_attributes_for, and updates to association lists (has_many, HABTM)
Am interested in the new PATCH method that will be included in Rails 4, but
have a question/concern, and forgive me if I''m misunderstanding it.
So, if the request parameter _method is set to "patch", the update is
processed as a patch.
But, let''s say you have a model called Airplane and Airplane has a
collection of FlightCrewMembers which it
2011 Apr 29
1
Custom controller for scaffold generator
Hi,
i put my customized controller in
lib/templates/scaffold_controller/controller.rb
for using in scaffold generation.
The problem is that the original controller template is used!
Where do i put my custom controller template? Or maybe is this a bug?
I''m using Rails v. 3.0.7 (Ruby 1.9.2p180)
Thanks in advance,
ciao
iwan
--
Posted via http://www.ruby-forum.com/.
--
You received
2008 Jan 18
1
Announcing: Ext Scaffold Generator Plugin for Rails
The Ext Scaffold Generator Plugin can be viewed as a drop-in
replacement for Rails'' standard Resource Generator. Accepting the very
same options, it will generate views using data grid and form
components from the Ext JS Javascript GUI framework as well as a
controller acting as an Ext-compatible JSON web service. The generated
code can be used as a starting point for further
2007 Dec 07
1
format.json
Hi did anyone used format.json before..
If so pls, do let me know how to use it....
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2004 Dec 18
0
Still the big Icecast problem!
Easy... when I made this java applet :
http://rbg.online.stalig.net/jplayer/radio-bro-gwened.html
I used a signed lib from jorbis without modifying it. I just made a
subclass of JOrbisPlayer which change the behaviour for what I wanted.
I can provide my wall JBuilder project for those interested to use it.
Easy way:
- just change the html file to feed it with your ogg stream url
- do what you
2012 Oct 01
1
active_model_serializers, more than one level deep of associations, specifying serializers per association
I am assuming this an appropriate place to discuss this, but if it isn''t my
apologies- just let me know. Just a Rails 4-ish thing.
Am attempting to pull AMS (active_model_serializers), strong_parameters,
and the "permitter" strategy that Adam Hawkins is using:
http://broadcastingadam.com/2012/07/parameter_authorization_in_rails_apis/
Code so far is here (in the
2012 Nov 29
3
Proposal: faragment cache with :if / :unless conditions
Hi,
I''m wondering if it would be a good idea to have fragment cache to allow
options :if / :unless to determine whether or not to actually perform
caching on the given block.
It would actually be a good idea in my opinion right now, since I''m working
on a piece of code that would benefit by this feature.
The scenario is the following:
I have a partial, which is
2010 Jan 20
5
disable submit_tag after click
This code disables the ''Save'' button once clicked, but doesn''t seem to
send the form data.
<%= submit_tag ''Save'', :class => ''submit'', :onclick =>
"document.getElementById(''save_button'').disabled=true;", :id =>
"save_button" %>
This code sends the form data and a record is created,
2010 Feb 10
16
nil object - can anyone help?
Hi there,
I''ve been looking for a while now and can''t seem to find where I''m
going wrong..
I''m following a railscast tutorial to send invites out to people.
there''s n invitation.rb page:
class Invitation < ActiveRecord::Base
#attr_accessible :sender_id, :recipient_email, :token, :sent_at
belongs_to :sender, :class_name =>