Displaying 20 results from an estimated 10000 matches similar to: "Generate model from database"
2011 Oct 21
7
Error while install mysql2 in windows 7
hello i have problem while install gem mysql2 in windows 7 i have got
error
An error occurred while installing mysql (0.3.7), and Bundler cannot
continue. Make sure that ''gem install mysql2 -v ''0.3.7'''' succeeds before
bundling.
Please help me i want to codding with rails :)
--
Posted via http://www.ruby-forum.com/.
--
You received this message because
2010 Aug 12
10
Scaffolding working...kinda
Hello all. I''ve been working through some online tutorials, learning ROR
and have a question on scaffolding. Through the command promt i''ve ran
the command:
$ script/generate scaffold Albums
This created the controllers, helpers, models, and views.
I have a database table titled "albums" and have two records saved
within
The problem is that the scaffold command did
2012 Sep 23
2
Find by id in the view template dynamically
Rails 3.1.3
I have a model ''Airline'', whose STRING column is ''company'' only.
Also, another model ''Plan'' has an INTEGER column ''airline_id''.
I would like to show the ''company'' name (string) in a template like
<% @plans.each do |plan| %>
Airline: <%=
2011 May 04
6
Form without scaffold ?
Hi
Strange to Rails.Read the tutorial on Scaffold.Can i generate a
Simple form without using Scaffold?
John
--
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 from this group, send email to
2010 Jul 04
3
Generated By handling CRUD Scaffold
Good afternoon.
I have two questions:
First question:
Can be defined at the time that I''m generating the scaffold the size
of
a string?
For example name:string (50)?
Second question:
I wonder how to proceed correctly to include new
fields starting at a CRUD generated by scaffold.
Example:
First step (I use):
script/generate scaffold User name:string login:string
Second step (I add
2010 Aug 03
2
Strange error message when rendering the scaffold form
Hello everyone, I am developing my application and I created a
scaffold called listas, but when I acess /listas/new I get this error
message:
NoMethodError in Listas#new
Showing /home/rodrigo3n/code/listeiroo/app/views/listas/_form.html.erb
where line #15 raised:
undefined method `deep_symbolize_keys'' for nil:NilClass
Extracted source (around line #15):
12: <% end %>
13:
14:
2012 Mar 04
3
Which command run after change Models
Hi:
I''m reading and learning from the Rails tutorial at [1] but not building
the sample application instead I''m trying to build my own. After
generate all the migration and build the main classes for Models I made
some modifications to them in order to build relationship between tables
now I think that I need to run some command to generate the scaffold
again with proper
2012 Apr 26
3
Multiple references of Country table in single client table
Hi I am new to ruby on rails , i am trying to develop a form client
form having multiple refrences to country... i.e while adding a client
i can add two contact persons each have a country associated with
them. However with scaffolding iam unable to refer country
twice....could anyone of you shed some light as to where iam going
wrong or what could be the rite way....
--
You received this
2010 Apr 03
2
Specifying a decimal field precision/scale with scaffold requires 2 steps?
Hi,
It appears to me that the command:
ruby script/generate scaffold whatever money_field:decimal(10,2)
will not generate a valid migration.
Therefore it appears to me only two ways to achieve the desired result
is:
1.1 Omit the the precision/scale on the scaffold command
1.2 Edit the migration file by following the "do |t| ... end" with
the command:
change_column :whatever
2011 Jun 14
2
scaffold_controller generator
Hi:
I''m new to RoR and I apologize if this is a dumb question but I''ve
read the guides, searched the archives and found nothing.
If I generate a model object and then the scaffold_controller the
result is different than just running the scaffold generator (the
_form partial has no fields in the first case).
I did not expected this and I wanted to first create the models, tweak
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
2012 Dec 13
23
make rails connect with database
i''m newbie in rails. i have problem with how to connect rails with
database. before i can connect it with command
"rake db:create" to create database.
and "rake db:migrate" to migrate schema to database.
but, i want to connect rails with database that i have before, not
create it via rails. can you help me?
--
Posted via http://www.ruby-forum.com/.
--
You received
2010 Aug 24
3
can not execute ruby script/generate scaffold Product Admin
in my depot application, i need to execute this command correctly...but I
can not do anything! the command could not execute as it is stated and
figured in the book. if there is an equivalent command for creating and
Model Product under Admin controller, please let me know. Now I know how to
configure mysql with rails. So there is no problem.
--
Irfan Ahmed Rizvi
http://www.creativemake.com
--
2012 Mar 12
4
how to design a api?
hi,everyone.
now i start to design a api.
the url like this
http://localhost:3000/api?seckey=123&&post_id=1
the visitor need a seckey to access auth.and get info via json.
so i dont think thats a good api.
i need your answers.thx
--
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
2010 Jun 14
2
stylesheet_link_tag
I know that the following statement loads the scaffold stylesheet, but
what exactly does stylesheet_link_tag do here?
<%= stylesheet_link_tag ''scaffold'' %>
Thanks.
--
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
2012 Jul 19
5
ActiveScaffold Export file - Send as Email
I am using Rails 1.2.3 and Active scaffold 1.1.1
My requirement is to send the export of users data weekly to the admin
as email via cron.
How can i automate the process of exporting csv and storing it at a
place? So that i can pick it from there and attach to the email before
sending?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
2009 Dec 10
2
How to customize the default scaffold?
I know the scaffold generator is really only useful for beginners
and/or very the preliminary state of a project, but I find that I use
it a lot (especially, since I am still a beginner). There are a
couple of things I find myself tweaking (or wanting to tweak, but
never getting around to tweaking) each time I generate a new scaffold:
1) Change the layout from blah.html.erb to
2012 Nov 12
7
RSpec: controller POST create
Rails 3.1.3
rspec-rails (2.11.4)
rspec 2.11.1
I am new to rspec. I don''t quite understand tests for POST create part.
I have generated scaffold, and simultaneously it generated
controller_spec.rb as well.
it "assigns a newly created plan as @plan" do
post :create, {:plan => valid_attributes}, valid_session
assigns(:plan).should be_a(Plan)
2011 Apr 30
8
"uninitialized constant PostsController::Post"
This time i read scaffold tutorial very carefully and finally try to
generate a form without using the scaffold(just used a controller and
view ).what i have done till now ,is as follow.Using rails 3.0.7.
"rails generate controller posts
index"
1) post_controller.rb
class PostsController < ApplicationController
def index
@post=Post.new
2010 Aug 08
5
Ruby 1.8.7 and openssl failed compile
I got this error:
ossl_ssl.c: In function ?ossl_sslctx_get_ciphers?:
ossl_ssl.c:626:19: error: ?STACK? undeclared (first use in this
function)
ossl_ssl.c:626:19: note: each undeclared identifier is reported
only once for each function it appears in
ossl_ssl.c:626:25: error: expected expression before ?)? token
ossl_ssl.c:629:47: error: expected expression before ?)? token