1.
Open the *System Preferences*. This can be done by either clicking on
the *System Preferences* icon in the *Dock* or by going to *Apple Menu >
System Preferences*.
2.
Open the Security & Privacy pane by clicking *Security & Privacy*.
3.
Make sure that the *General* tab
make sure you add gems pg and rails_12factor to group :production do and
bundle install --without production... push to git and push heroku
master... That should work
On Wed, Dec 14, 2016 at 4:41 AM, fugee ohu wrote:
> what are the most common causes
>
> --
> You received this message because yo
You have to create a home controller and set your root_path in the routes.rb to
root 'home#index'i
Hope this helps.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send
You need to specify path
<%= link_to 'About', 'about_path' %> # or where your /about path
points to
On Saturday, October 8, 2016 at 2:35:29 AM UTC-4, kinoe - wrote:
>
> <%= notice %>
>
> Homes
>
>
>
>
> Title
> Text
>
>
>
>
>
> <% @homes.each do |ho
I would strongly recommend www.tryruby.org to get acquainted with ruby on
rails.
On Thursday, August 25, 2016 at 12:46:26 PM UTC-4, Faraz Mirza wrote:
>
> Hey Guys!
>
> I am a Computer Science student. I know basic programming and
> Object-Oriented concepts. I have some experience in web develop
Not sure how I deluded my self into believing that worked, but it
didn't.
I still can't figure out how to build this query.
Either Google doesn't want to be my friend or I'm asking the wrong
question. Does anyone know of any blogs/tutorials that cover Rails 3
has_many :through queries?
--
You
So I can achieve the desired behavior with the latest Arel:
ingredients = Ingredient.arel_table
Recipe.joins(:ingredients).where(ingredients[:name].matches_any("%chips
%", "%gravy%"))
Is this the cleanest way?
--
You received this message because you are subscribed to the Google Groups "Rub
I have the following models:
class Recipe < ActiveRecord::Base
has_many :ingredient_amounts
has_many :ingredients, :through => :ingredient_amounts
end
class Ingredient < ActiveRecord::Base
def self.named_like(name)
where('ingredients.name ILIKE ?', "%#{name}%")
end
end
How do I query
Instead of each maybe u should use times
for example
4.times
Ash
On May 21, 4:00 am, Marnen Laibow-Koser wrote:
> Ravi Dtv wrote:
> > undefined method `each' for 4:Fixnum
>
> > How can I solve this error.
>
> Don't call .each on a number.
>
>
>
good idea and could create lot of
issues...
Is there any approach that i can use to solve this issue better. Are
there any plugins available so far to show total number of views or
hits on each page.
Regards
Ash
--
You received this message because you are subscribed to the Google Groups "
I have the following associations.
class Document < ActiveRecord::Base
has_many :document_sections, :dependent => :destroy, :autosave => true
has_many :document_items, :through => :document_sections
end
class DocumentSection < ActiveRecord::Base
belongs_to :document
has_many :document_ite
Ash Rm wrote:
> I am using rails 2.3 and an existing oracle database with utf8 encoding.
> Also have the following tag content="text/html; charset=UTF-8"> in my layout.
> Can someone point me to any documentation for setting up my environment
> to save and display chines
I am using rails 2.3 and an existing oracle database with utf8 encoding.
Also have the following tag in my layout.
Can someone point me to any documentation for setting up my environment
to save and display chinese characters.
thanks much
--
Posted via http://www.ruby-forum.com/.
--
You receiv
I have the following association
class Document < ActiveRecord::Base
has_many :sections
has_many :items, :through => :sections
end
class Section < ActiveRecord::Base
belongs_to :document
has_many :items
end
class Item < ActiveRecord::Base
belongs_to :section
end
Here is the sample view
I have had success with simple_auto_complete[1]
I wrote a blog post[2] with the steps I went through using it.
Hope this helps,
Bryan
[1] http://github.com/grosser/simple_auto_complete
[2] http://bryan-ash.blogspot.com/2009/06/using-simpleautocomplete.html
--~--~-~--~~~-
David,
thank you so much, that was the correct answer.
My complete association extension is now:
class Dropzone < ActiveRecord::Base
has_many :transactions, :through => :accounts do
def limited_to(transaction)
scope = Transaction.scoped({ :conditions =>
['accounts.dropzone_id = ?',
In my application a user working at a dropzone can manipulate
transactions against customer accounts. Here's my models:
class Transaction < ActiveRecord::Base
belongs_to :account
end
class Account < ActiveRecord::Base
belongs_to :dropzone
has_many :transactions
end
class Dropzone < Act
This unfortunatly wasn't the problem, but I did manage to figure out I
only got it when running through mod_rails. We just deployed the app to
another server that was rebuilt from scratch and it is working now, so
no idea what the actual cause was.
Thanks for the help.
--
Posted via http://ww
Did you ever figure out this problem?
I have a working application and my code works on my laptop, but when I
try it on our production server I come up with this error, but for the
life of me I can't figure out why it is being thrown on one machine and
not the other.
NoMethodError: undefined
If I understand correctly, you'd like to output some information about
a selected group of taxes.
How about something like:
selected = @taxes.select { |tax| [24, 25, 26, 27, 36, 37, 38,
39].include? tax.taxauthid }
selected.each { |tax| puts "#{tax.taxamount} - #{tax.taxauthid}" }
Bryan
--~--
I like the javascript_include_tag helper to keep the javascript out of
the view.
In one of my views I have a collection of radio buttons with class
"our_aircraft" and a text field with class "other_aircraft". Then I
pull in some javascript:
= javascript_include_tag 'aircraft_selection'
In
There are Railscasts for both simple search and pagination.
Bryan
--~--~-~--~~~---~--~~
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@googlegroups.com
T
Alternatively, you could take the advise from:
http://www.ruby-forum.com/topic/136032
and
gem install sqlite3-ruby -v=1.2.3
Enjoy!
Bryan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
Railscasts has a nice screencast called Simple Search Form
Enjoy!
Bryan
--~--~-~--~~~---~--~~
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@googlegroups
In Ruby there is always "something called self". It's really worth
understanding what it is at any given time.
Dave Thomas gave a presentation on the Ruby Object Model at Scotland
on Rails this year. The video is available:
http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SOR.mp4
Enjo
I think of symbols as similar to numbers. How about:
>> 1
=> 1
>> my_variable = 1
=> 1
>> 1.class
=> Fixnum
>> 1.object_id
=> 3
>> my_variable.class
=> Fixnum
>> my_variable.object_id
=> 3
Is it Symbols that you're questioning, or is it that :my_symbol and
my_variable have the same object_id?
Tony,
If you're looking for super simple deployment, I'd recommend switching
to http://Heroku.com. It doesn't get any simpler and their entry
level service is free. You should have your application deployed in
less than 30 minutes.
Bryan
--~--~-~--~~~---~--~~
Yo
I fully suspect that I'm missing the point here somewhere so I promise
I won't be offended if you tell me I'm being daft.
My application rents equipment ... not equipments. So I have the
following:
map.resources :equipment, :singular => :equipment_instance
class Equipment < ActiveRecord::B
Thanks, that worked perfectly.
--
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@googlegroup
Hi, I am trying to get a remote_form_for to work, and I have it
currently making the request and updating the div etc... but when it
makes the request it is not passing the value of the collection select
in the parameters, it is only passing the id, action and controller.
Hopefully someone can tel
30 matches
Mail list logo